Changeset 22491 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/win
- Timestamp:
- Aug 26, 2009 9:44:20 PM (15 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxNetFlt/win
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/NetAdpUninstall.cpp
r22485 r22491 44 44 if(hr == S_OK) 45 45 { 46 hr = VBoxNetCfgWinUninstallInfs (&GUID_DEVCLASS_NET, L"sun_VBoxNetAdp" );46 hr = VBoxNetCfgWinUninstallInfs (&GUID_DEVCLASS_NET, L"sun_VBoxNetAdp", 0/* could be SUOI_FORCEDELETE */); 47 47 if(hr == S_OK) 48 48 { -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/WinNetConfig.cpp
r22485 r22491 81 81 #define VBOX_NETCFG_LOCK_TIME_OUT 5000 82 82 83 typedef bool (*ENUMERATION_CALLBACK) (LPWSTR pFileName, PVOID pContext); 83 typedef bool (*ENUMERATION_CALLBACK) (LPCWSTR pFileName, PVOID pContext); 84 85 typedef struct _INF_INFO 86 { 87 LPCWSTR pPnPId; 88 }INF_INFO, *PINF_INFO; 89 90 typedef struct _INFENUM_CONTEXT 91 { 92 INF_INFO InfInfo; 93 DWORD Flags; 94 HRESULT hr; 95 } INFENUM_CONTEXT, *PINFENUM_CONTEXT; 96 97 static bool vboxNetCfgWinInfEnumerationCallback(LPCWSTR pFileName, PVOID pCtxt); 84 98 85 99 class VBoxNetCfgStringList … … 398 412 } 399 413 400 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinUninstallInfs (const GUID * pGuid, LPCWSTR pPnPId )414 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinUninstallInfs (const GUID * pGuid, LPCWSTR pPnPId, DWORD Flags) 401 415 { 402 416 VBoxNetCfgStringList list(128); … … 404 418 if(hr == S_OK) 405 419 { 420 INFENUM_CONTEXT Context; 421 Context.InfInfo.pPnPId = pPnPId; 422 Context.Flags = Flags; 423 Context.hr = S_OK; 406 424 int size = list.size(); 407 425 for (int i = 0; i < size; ++i) 408 426 { 409 Log(L"inf : %s\n", list.get(i)); 427 LPCWSTR pInf = list.get(i); 428 const WCHAR* pRel = wcsrchr(pInf, '\\'); 429 if(pRel) 430 ++pRel; 431 else 432 pRel = pInf; 433 434 vboxNetCfgWinInfEnumerationCallback(pRel, &Context); 435 // Log(L"inf : %s\n", list.get(i)); 410 436 } 411 437 } … … 461 487 } 462 488 463 typedef struct _INF_INFO 464 { 465 LPCWSTR pPnPId; 466 }INF_INFO, *PINF_INFO; 467 468 typedef struct _INFENUM_CONTEXT 469 { 470 INF_INFO InfInfo; 471 DWORD Flags; 472 HRESULT hr; 473 } INFENUM_CONTEXT, *PINFENUM_CONTEXT; 474 475 static bool vboxNetCfgWinInfEnumerationCallback(LPCWSTR pFileName, PINFENUM_CONTEXT pContext) 476 { 489 static bool vboxNetCfgWinInfEnumerationCallback(LPCWSTR pFileName, PVOID pCtxt) 490 { 491 PINFENUM_CONTEXT pContext = (PINFENUM_CONTEXT)pCtxt; 477 492 // Log(L"vboxNetCfgWinInfEnumerationCallback: pFileName (%s)\n", pFileName); 478 493 … … 525 540 Context.Flags = Flags; 526 541 Context.hr = S_OK; 527 hr = vboxNetCfgWinEnumFiles(InfDirPath, (ENUMERATION_CALLBACK)vboxNetCfgWinInfEnumerationCallback, (PVOID)&Context);542 hr = vboxNetCfgWinEnumFiles(InfDirPath, vboxNetCfgWinInfEnumerationCallback, &Context); 528 543 Assert(hr == S_OK); 529 544 if(hr == S_OK) … … 1655 1670 // 1656 1671 hr = S_FALSE; 1657 Log(L"vboxNetCfgWinRemoveAllNetDevicesOfIdCallback: !!!REBOOT REQUIRED!!!\n" , winEr);1672 Log(L"vboxNetCfgWinRemoveAllNetDevicesOfIdCallback: !!!REBOOT REQUIRED!!!\n"); 1658 1673 } 1659 1674 } … … 2357 2372 { 2358 2373 memset(DeviceInstallParams.DriverPath, 0, sizeof(DeviceInstallParams.DriverPath)); 2359 int pathLenght = wcslen(pInfPath) + 1/* null terminator */;2374 size_t pathLenght = wcslen(pInfPath) + 1/* null terminator */; 2360 2375 if(pathLenght < sizeof(DeviceInstallParams.DriverPath)/sizeof(DeviceInstallParams.DriverPath[0])) 2361 2376 {
Note:
See TracChangeset
for help on using the changeset viewer.