Index: /trunk/include/VBox/VBoxNetCfg-win.h
===================================================================
--- /trunk/include/VBox/VBoxNetCfg-win.h	(revision 36486)
+++ /trunk/include/VBox/VBoxNetCfg-win.h	(revision 36487)
@@ -59,7 +59,4 @@
 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRemoveAllNetDevicesOfId(IN LPCWSTR lpszPnPId);
 
-VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinInfInstall(IN LPCWSTR lpszInfPath);
-VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinInfUninstallAll(IN const GUID * pGuidClass, IN LPCWSTR lpszClassName, IN LPCWSTR lpszPnPId, IN DWORD Flags);
-
 VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinGenHostOnlyNetworkNetworkIp(OUT PULONG pNetIp, OUT PULONG pNetMask);
 
Index: /trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk	(revision 36486)
+++ /trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk	(revision 36487)
@@ -160,4 +160,5 @@
 NetFltInstall_SOURCES  = win/tools/VBoxNetFltInstall.cpp
 NetFltInstall_LIBS     = $(TARGET_WinNetConfig) \
+    $(TARGET_VBoxDrvCfg) \
  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
 	$(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
@@ -172,4 +173,5 @@
 NetFltUninstall_SOURCES  = win/tools/VBoxNetFltUninstall.cpp
 NetFltUninstall_LIBS     = $(TARGET_WinNetConfig) \
+    $(TARGET_VBoxDrvCfg) \
  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
 	$(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
@@ -183,4 +185,5 @@
 NetAdpInstall_SOURCES  = win/tools/VBoxNetAdpInstall.cpp
 NetAdpInstall_LIBS     = $(TARGET_WinNetConfig) \
+    $(TARGET_VBoxDrvCfg) \
  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
 	$(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
@@ -195,4 +198,5 @@
 NetAdpUninstall_SOURCES  = win/tools/VBoxNetAdpUninstall.cpp
 NetAdpUninstall_LIBS     = $(TARGET_WinNetConfig) \
+    $(TARGET_VBoxDrvCfg) \
  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
 	$(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
Index: /trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp	(revision 36486)
+++ /trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp	(revision 36487)
@@ -15,4 +15,5 @@
  */
 #include "VBox/VBoxNetCfg-win.h"
+#include "VBox/VBoxDrvCfg-win.h"
 
 #define _WIN32_DCOM
@@ -54,465 +55,4 @@
 #define VBOX_NETCFG_LOCK_TIME_OUT     5000
 
-class VBoxNetCfgStringList
-{
-public:
-    VBoxNetCfgStringList(int aSize);
-
-    ~VBoxNetCfgStringList();
-
-    HRESULT add(LPWSTR pStr);
-
-    int size() {return mSize;}
-
-    LPWSTR get(int i) {return maList[i];}
-private:
-    HRESULT resize(int newSize);
-
-    LPWSTR *maList;
-    int mBufSize;
-    int mSize;
-};
-
-VBoxNetCfgStringList::VBoxNetCfgStringList(int aSize)
-{
-    maList = (LPWSTR*)CoTaskMemAlloc( sizeof(maList[0]) * aSize);
-    mBufSize = aSize;
-    mSize = 0;
-}
-
-VBoxNetCfgStringList::~VBoxNetCfgStringList()
-{
-    if (!mBufSize)
-        return;
-
-    for (int i = 0; i < mSize; ++i)
-    {
-        CoTaskMemFree(maList[i]);
-    }
-
-    CoTaskMemFree(maList);
-}
-
-HRESULT VBoxNetCfgStringList::add(LPWSTR pStr)
-{
-    if (mSize == mBufSize)
-    {
-        int hr = resize(mBufSize+10);
-        if (SUCCEEDED(hr))
-            return hr;
-    }
-    size_t cStr = wcslen(pStr) + 1;
-    LPWSTR str = (LPWSTR)CoTaskMemAlloc( sizeof(maList[0][0]) * cStr);
-    memcpy(str, pStr, sizeof(maList[0][0]) * cStr);
-    maList[mSize] = str;
-    ++mSize;
-    return S_OK;
-}
-
-HRESULT VBoxNetCfgStringList::resize(int newSize)
-{
-    Assert(newSize >= mSize);
-    if (newSize < mSize)
-        return E_FAIL;
-    LPWSTR* pOld = maList;
-    maList = (LPWSTR*)CoTaskMemAlloc( sizeof(maList[0]) * newSize);
-    mBufSize = newSize;
-    memcpy(maList, pOld, mSize*sizeof(maList[0]));
-    CoTaskMemFree(pOld);
-    return S_OK;
-}
-
-/*
- * inf file manipulation API
- */
-typedef bool (*PFNVBOXNETCFG_ENUMERATION_CALLBACK) (LPCWSTR lpszFileName, PVOID pContext);
-
-typedef struct _INF_INFO
-{
-    LPCWSTR lpszClassName;
-    LPCWSTR lpszPnPId;
-} INF_INFO, *PINF_INFO;
-
-typedef struct _INFENUM_CONTEXT
-{
-    INF_INFO InfInfo;
-    DWORD Flags;
-    HRESULT hr;
-} INFENUM_CONTEXT, *PINFENUM_CONTEXT;
-
-static HRESULT vboxNetCfgWinInfQueryKeyValue(HINF hInf, LPCWSTR lpszSection, LPCWSTR lpszKey, DWORD iValue, LPWSTR *lppszValue)
-{
-    INFCONTEXT InfContext;
-    DWORD winEr;
-
-    if (!SetupFindFirstLineW(hInf, lpszSection, lpszKey, &InfContext))
-    {
-        winEr = GetLastError();
-        Log(__FUNCTION__ ": SetupFindFirstLine failed WinEr (%d) for Section(%S), Key(%S)\n", winEr, lpszSection, lpszKey);
-        return HRESULT_FROM_WIN32(winEr);
-    }
-
-    DWORD cbValue;
-    if (SetupGetStringFieldW(&InfContext, iValue, NULL, 0, &cbValue))
-    {
-        Assert(0);
-        /* SetupGetStringField succeeded when it should not */
-        DbgLog(__FUNCTION__ ": SetupGetStringField succeeded when it should not, for Section(%S), Key(%S), iValue(%d)\n", lpszSection, lpszKey, iValue);
-        return E_FAIL;
-    }
-
-    winEr = GetLastError();
-    Assert(winEr == ERROR_INSUFFICIENT_BUFFER);
-    if (winEr != ERROR_INSUFFICIENT_BUFFER)
-    {
-        Log(__FUNCTION__ ": SetupGetStringField failed WinEr (%d) for Section(%S), Key(%S), iValue(%d)\n", winEr, lpszSection, lpszKey, iValue);
-        return HRESULT_FROM_WIN32(winEr);
-    }
-
-    LPWSTR lpszValue = (LPWSTR)CoTaskMemAlloc(cbValue * sizeof (lpszValue[0]));
-    Assert(lpszValue);
-    if (!lpszValue)
-    {
-        Log(__FUNCTION__ ": SetCoTaskMemAlloc failed to alloc mem of size (%d), for Section(%S), Key(%S), iValue(%d)\n", cbValue * sizeof (lpszValue[0]), winEr, lpszSection, lpszKey, iValue);
-        return E_FAIL;
-    }
-
-    if (!SetupGetStringFieldW(&InfContext, iValue, lpszValue, cbValue, &cbValue))
-    {
-        winEr = GetLastError();
-        Log(__FUNCTION__ ": SetupGetStringField failed WinEr (%d) for Section(%S), Key(%S), , iValue(%d)\n", winEr, lpszSection, lpszKey, iValue);
-        Assert(0);
-        return HRESULT_FROM_WIN32(winEr);
-    }
-
-    *lppszValue = lpszValue;
-    return S_OK;
-}
-
-static HRESULT vboxNetCfgWinInfQueryFirstPnPId(HINF hInf, LPWSTR *lppszPnPId)
-{
-    LPWSTR lpszModels;
-    LPWSTR lpszPnPId;
-    HRESULT hr = vboxNetCfgWinInfQueryKeyValue(hInf, L"Manufacturer", NULL, 1, &lpszModels);
-    if (hr != S_OK)
-    {
-        DbgLog(__FUNCTION__ ": vboxNetCfgWinRegQueryKeyValue for Manufacturer failed, hr = (0x%x)\n", hr);
-        return hr;
-    }
-
-    hr = vboxNetCfgWinInfQueryKeyValue(hInf, lpszModels, NULL, 2, &lpszPnPId);
-    /* free models string right away */
-    CoTaskMemFree(lpszModels);
-    if (hr != S_OK)
-    {
-        Log(__FUNCTION__ ": vboxNetCfgWinRegQueryKeyValue for models failed, hr = (0x%x)\n", hr);
-        return hr;
-    }
-
-    *lppszPnPId = lpszPnPId;
-    return S_OK;
-}
-
-static bool vboxNetCfgWinInfEnumerationCallback(LPCWSTR lpszFileName, PVOID pCtxt);
-
-static HRESULT vboxNetCfgWinInfCopyEx(IN LPCWSTR lpszInfPath, IN DWORD fCopyStyle, OUT LPWSTR lpszDstName, IN DWORD cbDstName, OUT PDWORD pcbDstNameSize, OUT LPWSTR* lpszDstNameComponent)
-{
-    WCHAR aMediaLocation[_MAX_DIR];
-    WCHAR aDir[_MAX_DIR];
-
-    _wsplitpath(lpszInfPath, aMediaLocation, aDir, NULL, NULL);
-    wcscat(aMediaLocation, aDir);
-
-    if (!SetupCopyOEMInfW(lpszInfPath, aMediaLocation, SPOST_PATH, fCopyStyle,
-            lpszDstName, cbDstName, pcbDstNameSize,
-            lpszDstNameComponent))
-    {
-        DWORD winEr = GetLastError();
-        Log(__FUNCTION__ ": SetupCopyOEMInf fail winEr (%d)\n", winEr);
-        return HRESULT_FROM_WIN32(winEr);
-    }
-
-    return S_OK;
-}
-
-static HRESULT vboxNetCfgWinInfCopy(IN LPCWSTR lpszInfPath)
-{
-    return vboxNetCfgWinInfCopyEx(lpszInfPath, 0, NULL, 0, NULL, NULL);
-}
-
-VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinInfInstall(IN LPCWSTR lpszInfPath)
-{
-    return vboxNetCfgWinInfCopy(lpszInfPath);
-}
-
-VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinInfUninstall(IN LPCWSTR lpszInfPath, DWORD fFlags)
-{
-    if (!SetupUninstallOEMInfW(lpszInfPath, fFlags, NULL /*__in PVOID Reserved == NULL */))
-    {
-        DWORD winEr = GetLastError();
-        Log(__FUNCTION__ ": SetupUninstallOEMInf failed for file (%S), winEr (%d)\n", lpszInfPath, winEr);
-        Assert(0);
-        return HRESULT_FROM_WIN32(winEr);
-    }
-    return S_OK;
-}
-
-
-static HRESULT vboxNetCfgWinCollectInfs(const GUID * pGuid, LPCWSTR pPnPId, VBoxNetCfgStringList & list)
-{
-    DWORD winEr = ERROR_SUCCESS;
-    int counter = 0;
-    HDEVINFO hDevInfo = SetupDiCreateDeviceInfoList(
-                            pGuid, /* IN LPGUID ClassGuid, OPTIONAL */
-                            NULL /*IN HWND hwndParent OPTIONAL */
-                            );
-    if (hDevInfo != INVALID_HANDLE_VALUE)
-    {
-        if (SetupDiBuildDriverInfoList(hDevInfo,
-                    NULL, /*IN OUT PSP_DEVINFO_DATA DeviceInfoData, OPTIONAL*/
-                    SPDIT_CLASSDRIVER  /*IN DWORD DriverType*/
-                    ))
-        {
-            SP_DRVINFO_DATA DrvInfo;
-            DrvInfo.cbSize = sizeof(SP_DRVINFO_DATA);
-            char DetailBuf[16384];
-            PSP_DRVINFO_DETAIL_DATA pDrvDetail = (PSP_DRVINFO_DETAIL_DATA)DetailBuf;
-
-            for (DWORD i = 0; ; i++)
-            {
-                if (SetupDiEnumDriverInfo(hDevInfo,
-                        NULL, /* IN PSP_DEVINFO_DATA DeviceInfoData, OPTIONAL*/
-                        SPDIT_CLASSDRIVER , /*IN DWORD DriverType,*/
-                        i, /*IN DWORD MemberIndex,*/
-                        &DrvInfo /*OUT PSP_DRVINFO_DATA DriverInfoData*/
-                        ))
-                {
-                    DWORD dwReq;
-                    pDrvDetail->cbSize = sizeof(SP_DRVINFO_DETAIL_DATA);
-                    if (SetupDiGetDriverInfoDetail(
-                            hDevInfo, /*IN HDEVINFO DeviceInfoSet,*/
-                            NULL, /*IN PSP_DEVINFO_DATA DeviceInfoData, OPTIONAL*/
-                            &DrvInfo, /*IN PSP_DRVINFO_DATA DriverInfoData,*/
-                            pDrvDetail, /*OUT PSP_DRVINFO_DETAIL_DATA DriverInfoDetailData, OPTIONAL*/
-                            sizeof(DetailBuf), /*IN DWORD DriverInfoDetailDataSize,*/
-                            &dwReq /*OUT PDWORD RequiredSize OPTIONAL*/
-                            ))
-                    {
-                        for (WCHAR * pHwId = pDrvDetail->HardwareID; pHwId && *pHwId && pHwId < (TCHAR*)(DetailBuf + sizeof(DetailBuf)/sizeof(DetailBuf[0])) ;pHwId += _tcslen(pHwId) + 1)
-                        {
-                            if (!wcsicmp(pHwId, pPnPId))
-                            {
-                                Assert(pDrvDetail->InfFileName[0]);
-                                if (pDrvDetail->InfFileName)
-                                {
-                                    list.add(pDrvDetail->InfFileName);
-                                }
-                            }
-                        }
-                    }
-                    else
-                    {
-                        DWORD winEr = GetLastError();
-                        Log(__FUNCTION__": SetupDiGetDriverInfoDetail fail winEr (%d), size(%d)", winEr, dwReq);
-//                        Assert(0);
-                    }
-
-                }
-                else
-                {
-                    DWORD winEr = GetLastError();
-                    if (winEr == ERROR_NO_MORE_ITEMS)
-                    {
-                        break;
-                    }
-
-                    Assert(0);
-                }
-            }
-
-            SetupDiDestroyDriverInfoList(hDevInfo,
-                      NULL, /*IN PSP_DEVINFO_DATA DeviceInfoData, OPTIONAL*/
-                      SPDIT_CLASSDRIVER/*IN DWORD DriverType*/
-                      );
-        }
-        else
-        {
-            winEr = GetLastError();
-            Assert(0);
-        }
-
-        SetupDiDestroyDeviceInfoList(hDevInfo);
-    }
-    else
-    {
-        winEr = GetLastError();
-        Assert(0);
-    }
-
-    return HRESULT_FROM_WIN32(winEr);
-}
-
-VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinInfUninstallAll(IN const GUID * pGuidClass, IN LPCWSTR lpszClassName, IN LPCWSTR lpszPnPId, IN DWORD Flags)
-{
-    VBoxNetCfgStringList list(128);
-    HRESULT hr = vboxNetCfgWinCollectInfs(pGuidClass, lpszPnPId, list);
-    if (hr == S_OK)
-    {
-        INFENUM_CONTEXT Context;
-        Context.InfInfo.lpszClassName = lpszClassName;
-        Context.InfInfo.lpszPnPId = lpszPnPId;
-        Context.Flags = Flags;
-        Context.hr = S_OK;
-        int size = list.size();
-        for (int i = 0; i < size; ++i)
-        {
-            LPCWSTR pInf = list.get(i);
-            const WCHAR* pRel = wcsrchr(pInf, '\\');
-            if (pRel)
-                ++pRel;
-            else
-                pRel = pInf;
-
-            vboxNetCfgWinInfEnumerationCallback(pRel, &Context);
-//            Log("inf : %S\n", list.get(i));
-        }
-    }
-    return hr;
-}
-
-static HRESULT vboxNetCfgWinEnumFiles(LPCWSTR pPattern, PFNVBOXNETCFG_ENUMERATION_CALLBACK pfnCallback, PVOID pContext)
-{
-    WIN32_FIND_DATA Data;
-    memset(&Data, 0, sizeof(Data));
-    HRESULT hr = S_OK;
-
-    HANDLE hEnum = FindFirstFile(pPattern,&Data);
-    if (hEnum != INVALID_HANDLE_VALUE)
-    {
-
-        do
-        {
-            if (!pfnCallback(Data.cFileName, pContext))
-            {
-                break;
-            }
-
-            /* next iteration */
-            memset(&Data, 0, sizeof(Data));
-            BOOL bNext = FindNextFile(hEnum,&Data);
-            if (!bNext)
-            {
-                int winEr = GetLastError();
-                if (winEr != ERROR_NO_MORE_FILES)
-                {
-                    Log(__FUNCTION__": FindNextFile fail winEr (%d)\n", winEr);
-                    Assert(0);
-                    hr = HRESULT_FROM_WIN32(winEr);
-                }
-                break;
-            }
-        }while (true);
-        FindClose(hEnum);
-    }
-    else
-    {
-        int winEr = GetLastError();
-        if (winEr != ERROR_NO_MORE_FILES)
-        {
-            Log(__FUNCTION__": FindFirstFile fail winEr (%d)\n", winEr);
-            Assert(0);
-            hr = HRESULT_FROM_WIN32(winEr);
-        }
-    }
-
-    return hr;
-}
-
-static bool vboxNetCfgWinInfEnumerationCallback(LPCWSTR lpszFileName, PVOID pCtxt)
-{
-    PINFENUM_CONTEXT pContext = (PINFENUM_CONTEXT)pCtxt;
-    DWORD winEr;
-//    Log("vboxNetCfgWinInfEnumerationCallback: pFileName (%S)\n", pFileName);
-
-    HINF hInf = SetupOpenInfFileW(lpszFileName, pContext->InfInfo.lpszClassName, INF_STYLE_WIN4, NULL /*__in PUINT ErrorLine */);
-    if (hInf == INVALID_HANDLE_VALUE)
-    {
-        winEr = GetLastError();
-        Assert(winEr == ERROR_CLASS_MISMATCH);
-        if (winEr != ERROR_CLASS_MISMATCH)
-        {
-            DbgLog(__FUNCTION__ ": SetupOpenInfFileW err winEr (%d)\n", winEr);
-        }
-
-        return true;
-    }
-
-    LPWSTR lpszPnPId;
-    HRESULT hr = vboxNetCfgWinInfQueryFirstPnPId(hInf, &lpszPnPId);
-    if (hr == S_OK)
-    {
-        if (!wcsicmp(pContext->InfInfo.lpszPnPId, lpszPnPId))
-        {
-            if (!SetupUninstallOEMInfW(lpszFileName,
-                        pContext->Flags, /*DWORD Flags could be SUOI_FORCEDELETE */
-                        NULL /*__in PVOID Reserved == NULL */
-                        ))
-            {
-                winEr = GetLastError();
-                Log(__FUNCTION__ ": SetupUninstallOEMInf failed for file (%S), winEr (%d)\n", lpszFileName, winEr);
-                Assert(0);
-                hr = HRESULT_FROM_WIN32( winEr );
-            }
-        }
-
-        CoTaskMemFree(lpszPnPId);
-    }
-    else
-    {
-        DbgLog(__FUNCTION__ ": vboxNetCfgWinInfQueryFirstPnPId failed, hr = (0x%x)\n", hr);
-    }
-
-    SetupCloseInfFile(hInf);
-
-    return true;
-}
-
-static HRESULT VBoxNetCfgWinInfUninstallAll(LPCWSTR lpszClassName, LPCWSTR lpszPnPId, DWORD Flags)
-{
-    WCHAR InfDirPath[MAX_PATH];
-    HRESULT hr = SHGetFolderPathW(NULL, /*          HWND hwndOwner*/
-            CSIDL_WINDOWS, /* int nFolder*/
-            NULL, /*HANDLE hToken*/
-            SHGFP_TYPE_CURRENT, /*DWORD dwFlags*/
-            InfDirPath);
-    Assert(hr == S_OK);
-    if (hr == S_OK)
-    {
-        wcscat(InfDirPath, L"\\inf\\oem*.inf");
-
-        INFENUM_CONTEXT Context;
-        Context.InfInfo.lpszClassName = lpszClassName;
-        Context.InfInfo.lpszPnPId = lpszPnPId;
-        Context.Flags = Flags;
-        Context.hr = S_OK;
-        hr = vboxNetCfgWinEnumFiles(InfDirPath, vboxNetCfgWinInfEnumerationCallback, &Context);
-        Assert(hr == S_OK);
-        if (hr == S_OK)
-        {
-            hr = Context.hr;
-        }
-        else
-        {
-            Log(__FUNCTION__": vboxNetCfgWinEnumFiles failed, hr = (0x%x)\n", hr);
-        }
-    }
-    else
-    {
-        Log(__FUNCTION__": SHGetFolderPathW failed, hr = (0x%x)\n", hr);
-    }
-
-    return hr;
-
-}
 
 static HRESULT vboxNetCfgWinINetCfgLock(IN INetCfg *pNetCfg,
@@ -773,5 +313,5 @@
     for (; i < cInfPaths; i++)
     {
-        hr = VBoxNetCfgWinInfInstall(apInfPaths[i]);
+        hr = VBoxDrvCfgInfInstall(apInfPaths[i]);
         Assert(hr == S_OK);
         if (hr != S_OK)
@@ -796,5 +336,5 @@
         for (UINT j = i-1; j != 0; j--)
         {
-            VBoxNetCfgWinInfUninstall(apInfPaths[j], 0);
+            VBoxDrvCfgInfUninstall(apInfPaths[j], 0);
         }
     }
@@ -2404,6 +1944,6 @@
     }
 
-    VBoxNetCfgWinInfUninstallAll(L"NetService", VBOXNETCFGWIN_NETFLT_ID, InfRmFlags);
-    VBoxNetCfgWinInfUninstallAll(L"Net", VBOXNETCFGWIN_NETFLT_MP_ID, InfRmFlags);
+    VBoxDrvCfgInfUninstallAllF(L"NetService", VBOXNETCFGWIN_NETFLT_ID, InfRmFlags);
+    VBoxDrvCfgInfUninstallAllF(L"Net", VBOXNETCFGWIN_NETFLT_MP_ID, InfRmFlags);
 
     return hr;
Index: /trunk/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpUninstall.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpUninstall.cpp	(revision 36486)
+++ /trunk/src/VBox/HostDrivers/VBoxNetFlt/win/tools/VBoxNetAdpUninstall.cpp	(revision 36487)
@@ -17,4 +17,5 @@
 
 #include <VBox/VBoxNetCfg-win.h>
+#include <VBox/VBoxDrvCfg-win.h>
 #include <stdio.h>
 
@@ -40,5 +41,5 @@
         if(hr == S_OK)
         {
-            hr = VBoxNetCfgWinInfUninstallAll(&GUID_DEVCLASS_NET, L"Net", L"sun_VBoxNetAdp", 0/* could be SUOI_FORCEDELETE */);
+            hr = VBoxDrvCfgInfUninstallAllSetupDi(&GUID_DEVCLASS_NET, L"Net", L"sun_VBoxNetAdp", 0/* could be SUOI_FORCEDELETE */);
             if(hr == S_OK)
             {
Index: /trunk/src/VBox/Installer/win/InstallHelper/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Installer/win/InstallHelper/Makefile.kmk	(revision 36486)
+++ /trunk/src/VBox/Installer/win/InstallHelper/Makefile.kmk	(revision 36487)
@@ -37,5 +37,6 @@
 VBoxInstallHelper_LIBS     = $(PATH_SDK_W2K3DDK_LIB)/Msi.lib
 ifdef VBOX_WITH_NETFLT
- VBoxInstallHelper_LIBS   += $(PATH_LIB)/WinNetConfig.lib \
+ VBoxInstallHelper_LIBS   += $(TARGET_WinNetConfig) \
+    $(TARGET_VBoxDrvCfg) \
  	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
 	$(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
Index: /trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp
===================================================================
--- /trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp	(revision 36486)
+++ /trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp	(revision 36487)
@@ -18,4 +18,5 @@
 #ifdef VBOX_WITH_NETFLT
 # include "VBox/VBoxNetCfg-win.h"
+# include "VBox/VBoxDrvCfg-win.h"
 #endif /* VBOX_WITH_NETFLT */
 
@@ -899,5 +900,5 @@
     if(!!pInfPath && bIsFile)
     {
-        HRESULT tmpHr = VBoxNetCfgWinInfInstall(pInfPath);
+        HRESULT tmpHr = VBoxDrvCfgInfInstall(pInfPath);
         Assert(tmpHr == S_OK);
     }
@@ -949,5 +950,5 @@
     if(hr == S_OK)
     {
-        hr = VBoxNetCfgWinInfUninstallAll(&GUID_DEVCLASS_NET, NETADP_ID, L"Net", 0/* could be SUOI_FORCEDELETE */);
+        hr = VBoxDrvCfgInfUninstallAllSetupDi(&GUID_DEVCLASS_NET, NETADP_ID, L"Net", 0/* could be SUOI_FORCEDELETE */);
         if(hr != S_OK)
         {
Index: /trunk/src/VBox/Main/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Main/Makefile.kmk	(revision 36486)
+++ /trunk/src/VBox/Main/Makefile.kmk	(revision 36487)
@@ -378,5 +378,6 @@
  src-server/win/NetIf-win.cpp_INCS.win += $(PATH_TOOL_$(VBOX_VCC_TOOL)_INC)
  VBoxSVC_LIBS.win += \
-	$(PATH_LIB)/WinNetConfig.lib \
+	$(TARGET_WinNetConfig) \
+	$(TARGET_VBoxDrvCfg) \
 	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
 	$(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
@@ -610,5 +611,6 @@
 
 ifdef VBOX_WITH_NETFLT
- VBoxC_LIBS.win += $(PATH_LIB)/WinNetConfig.lib \
+ VBoxC_LIBS.win += $(TARGET_VBoxDrvCfg) \
+    $(TARGET_WinNetConfig) \
 	$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
 	$(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
