Changeset 51908 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg
- Timestamp:
- Jul 7, 2014 5:44:56 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
r51871 r51908 593 593 594 594 typedef BOOL (*VBOXNETCFGWIN_NETENUM_CALLBACK) (HDEVINFO hDevInfo, PSP_DEVINFO_DATA pDev, PVOID pContext); 595 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinEnumNetDevices(LPCWSTR pwszPnPI D,595 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinEnumNetDevices(LPCWSTR pwszPnPId, 596 596 VBOXNETCFGWIN_NETENUM_CALLBACK callback, PVOID pContext) 597 597 { 598 NonStandardLogFlow(("VBoxNetCfgWinEnumNetDevices: Searching for: %S\n", pwszPnPI D));598 NonStandardLogFlow(("VBoxNetCfgWinEnumNetDevices: Searching for: %S\n", pwszPnPId)); 599 599 600 600 HRESULT hr; … … 610 610 DWORD winEr; 611 611 612 DWORD dwDevI D= 0;613 size_t cPnPId = wcslen(pwszPnPI D);612 DWORD dwDevId = 0; 613 size_t cPnPId = wcslen(pwszPnPId); 614 614 615 615 PBYTE pBuffer = NULL; … … 621 621 Dev.cbSize = sizeof(SP_DEVINFO_DATA); 622 622 623 if (!SetupDiEnumDeviceInfo(hDevInfo, dwDevI D, &Dev))623 if (!SetupDiEnumDeviceInfo(hDevInfo, dwDevId, &Dev)) 624 624 { 625 625 winEr = GetLastError(); … … 629 629 } 630 630 631 NonStandardLogFlow(("VBoxNetCfgWinEnumNetDevices: Enumerating device %ld ... \n", dwDevI D));632 dwDevI D++;631 NonStandardLogFlow(("VBoxNetCfgWinEnumNetDevices: Enumerating device %ld ... \n", dwDevId)); 632 dwDevId++; 633 633 634 634 if (pBuffer) … … 677 677 } 678 678 679 PWSTR pCurI D= (PWSTR)pBuffer;680 size_t cCurId = wcslen(pCurI D);681 682 NonStandardLogFlow(("VBoxNetCfgWinEnumNetDevices: Device %ld: %S\n", dwDevI D, pCurID));679 PWSTR pCurId = (PWSTR)pBuffer; 680 size_t cCurId = wcslen(pCurId); 681 682 NonStandardLogFlow(("VBoxNetCfgWinEnumNetDevices: Device %ld: %S\n", dwDevId, pCurId)); 683 683 684 684 if (cCurId >= cPnPId) 685 685 { 686 pCurI D+= cCurId - cPnPId;687 if (!wcsnicmp(pCurI D, pwszPnPID, cPnPId))686 pCurId += cCurId - cPnPId; 687 if (!wcsnicmp(pCurId, pwszPnPId, cPnPId)) 688 688 { 689 689 if (!callback(hDevInfo, &Dev, pContext)) … … 693 693 } 694 694 695 NonStandardLogFlow(("VBoxNetCfgWinEnumNetDevices: Found %ld devices total\n", dwDevI D));695 NonStandardLogFlow(("VBoxNetCfgWinEnumNetDevices: Found %ld devices total\n", dwDevId)); 696 696 697 697 if (pBuffer) … … 2549 2549 { 2550 2550 /* get the device instance ID */ 2551 TCHAR devI D[MAX_DEVICE_ID_LEN];2551 TCHAR devId[MAX_DEVICE_ID_LEN]; 2552 2552 if (CM_Get_Device_ID(DeviceInfoData.DevInst, 2553 devI D, MAX_DEVICE_ID_LEN, 0) == CR_SUCCESS)2553 devId, MAX_DEVICE_ID_LEN, 0) == CR_SUCCESS) 2554 2554 { 2555 2555 /* compare to what we determined before */ 2556 if (wcscmp(devI D, lszPnPInstanceId) == 0)2556 if (wcscmp(devId, lszPnPInstanceId) == 0) 2557 2557 { 2558 2558 found = TRUE;
Note:
See TracChangeset
for help on using the changeset viewer.