Changeset 57306 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg
- Timestamp:
- Aug 13, 2015 8:16:33 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
r57192 r57306 2974 2974 SetErrBreak(("SetupDiOpenDevRegKey failed (0x%08X)", GetLastError())); 2975 2975 2976 if (!SetupDiGetDeviceRegistryPropertyW(hDeviceInfo, &DeviceInfoData,2977 SPDRP_FRIENDLYNAME , /* IN DWORD Property,*/2978 NULL, /*OUT PDWORD PropertyRegDataType, OPTIONAL*/2979 (PBYTE)DevName, /*OUT PBYTE PropertyBuffer,*/2980 sizeof(DevName), /* IN DWORD PropertyBufferSize,*/2981 NULL /*OUT PDWORD RequiredSize OPTIONAL*/))2982 {2983 int err = GetLastError();2984 if (err != ERROR_INVALID_DATA)2985 {2986 SetErrBreak (("SetupDiGetDeviceRegistryProperty failed (0x%08X)",2987 err));2988 }2989 2990 if (!SetupDiGetDeviceRegistryPropertyW(hDeviceInfo, &DeviceInfoData,2991 SPDRP_DEVICEDESC, /* IN DWORD Property,*/2992 NULL, /*OUT PDWORD PropertyRegDataType, OPTIONAL*/2993 (PBYTE)DevName, /*OUT PBYTE PropertyBuffer,*/2994 sizeof(DevName), /* IN DWORD PropertyBufferSize,*/2995 NULL /*OUT PDWORD RequiredSize OPTIONAL*/2996 ))2997 {2998 err = GetLastError();2999 SetErrBreak (("SetupDiGetDeviceRegistryProperty failed (0x%08X)",3000 err));3001 }3002 }3003 2976 3004 2977 /* Query the instance ID; on Windows 10, the registry key may take a short … … 3015 2988 else 3016 2989 break; 2990 } 2991 2992 /* 2993 * We need to query the device name after we have succeeded in querying its 2994 * instance ID to avoid similar waiting-and-retrying loop (see @bugref{7973}). 2995 */ 2996 if (!SetupDiGetDeviceRegistryPropertyW(hDeviceInfo, &DeviceInfoData, 2997 SPDRP_FRIENDLYNAME , /* IN DWORD Property,*/ 2998 NULL, /*OUT PDWORD PropertyRegDataType, OPTIONAL*/ 2999 (PBYTE)DevName, /*OUT PBYTE PropertyBuffer,*/ 3000 sizeof(DevName), /* IN DWORD PropertyBufferSize,*/ 3001 NULL /*OUT PDWORD RequiredSize OPTIONAL*/)) 3002 { 3003 int err = GetLastError(); 3004 if (err != ERROR_INVALID_DATA) 3005 { 3006 SetErrBreak (("SetupDiGetDeviceRegistryProperty failed (0x%08X)", 3007 err)); 3008 } 3009 3010 if (!SetupDiGetDeviceRegistryPropertyW(hDeviceInfo, &DeviceInfoData, 3011 SPDRP_DEVICEDESC, /* IN DWORD Property,*/ 3012 NULL, /*OUT PDWORD PropertyRegDataType, OPTIONAL*/ 3013 (PBYTE)DevName, /*OUT PBYTE PropertyBuffer,*/ 3014 sizeof(DevName), /* IN DWORD PropertyBufferSize,*/ 3015 NULL /*OUT PDWORD RequiredSize OPTIONAL*/ 3016 )) 3017 { 3018 err = GetLastError(); 3019 SetErrBreak (("SetupDiGetDeviceRegistryProperty failed (0x%08X)", 3020 err)); 3021 } 3017 3022 } 3018 3023 RegCloseKey (hkey);
Note:
See TracChangeset
for help on using the changeset viewer.