mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[NETSHELL]
CORE-4949 Fix the network adapter name retrieval code. Adapter names should be visible again. Retest please. svn path=/trunk/; revision=61272
This commit is contained in:
parent
602a8fa908
commit
d0d5cf63bb
1 changed files with 7 additions and 4 deletions
|
@ -604,12 +604,15 @@ CNetConnectionManager::EnumerateINetConnections()
|
|||
}
|
||||
RegCloseKey(hSubKey);
|
||||
}
|
||||
if (SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DEVICEDESC, NULL, (PBYTE)szNetCfg, sizeof(szNetCfg)/sizeof(WCHAR), &dwSize))
|
||||
|
||||
/* Get the adapter device description */
|
||||
dwSize = 0;
|
||||
SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DEVICEDESC, NULL, NULL, 0, &dwSize);
|
||||
if (dwSize != 0)
|
||||
{
|
||||
szNetCfg[(sizeof(szNetCfg)/sizeof(WCHAR))-1] = L'\0';
|
||||
pNew->Props.pszwDeviceName = (LPWSTR)CoTaskMemAlloc((wcslen(szNetCfg)+1) * sizeof(WCHAR));
|
||||
pNew->Props.pszwDeviceName = (LPWSTR)CoTaskMemAlloc(dwSize);
|
||||
if (pNew->Props.pszwDeviceName)
|
||||
wcscpy(pNew->Props.pszwDeviceName, szNetCfg);
|
||||
SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DEVICEDESC, NULL, (PBYTE)pNew->Props.pszwDeviceName, dwSize, &dwSize);
|
||||
}
|
||||
|
||||
if (pCurrent)
|
||||
|
|
Loading…
Reference in a new issue