mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 16:53:45 +00:00
SetupDiGetDeviceInstanceId returns size in characters not in bytes
svn path=/trunk/; revision=30606
This commit is contained in:
parent
2b14de3b3c
commit
0fdacaa71e
2 changed files with 2 additions and 2 deletions
|
@ -150,7 +150,7 @@ UpdateDriverForPlugAndPlayDevicesW(
|
|||
TRACE("SetupDiGetDeviceInstanceIdW() failed with error 0x%x\n", GetLastError());
|
||||
goto cleanup;
|
||||
}
|
||||
else if ((Buffer = HeapAlloc(GetProcessHeap(), 0, BufferSize)) == NULL)
|
||||
else if ((Buffer = HeapAlloc(GetProcessHeap(), 0, BufferSize * sizeof(WCHAR))) == NULL)
|
||||
{
|
||||
TRACE("HeapAlloc() failed\n", GetLastError());
|
||||
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
|
|
|
@ -236,7 +236,7 @@ PopulateCustomPathCombo(
|
|||
{
|
||||
HKEY hKey = NULL;
|
||||
DWORD dwRegType;
|
||||
DWORD dwPathLength;
|
||||
DWORD dwPathLength = 0;
|
||||
LPWSTR Buffer = NULL;
|
||||
LPCWSTR Path;
|
||||
LONG rc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue