Index: VBoxDrvCfg.cpp
===================================================================
--- VBoxDrvCfg.cpp	(revision 38938)
+++ VBoxDrvCfg.cpp	(working copy)
@@ -418,6 +418,9 @@
     return vboxDrvCfgInfCopy(lpszInfPath);
 }
 
+// vmlite
+static BOOL (WINAPI *g_SetupUninstallOEMInfW)(__in PCWSTR InfFileName, __in DWORD Flags, __in PVOID Reserved ) = NULL;
+
 VBOXDRVCFG_DECL(HRESULT) VBoxDrvCfgInfUninstall(IN LPCWSTR lpszInfPath, DWORD fFlags)
 {
     WCHAR DstInfName[MAX_PATH];
@@ -425,7 +428,16 @@
     HRESULT hr = vboxDrvCfgInfCopyEx(lpszInfPath, SP_COPY_REPLACEONLY, DstInfName, cbDword, &cbDword, NULL);
     if (hr == VBOXDRVCFG_S_INFEXISTS)
     {
-        if (!SetupUninstallOEMInfW(DstInfName, fFlags, NULL /*__in PVOID Reserved == NULL */))
+		if (g_SetupUninstallOEMInfW == NULL)
+		{
+			HMODULE setupapiMod = LoadLibraryA("setupapi.dll");
+			if (setupapiMod)
+				*(void **)&g_SetupUninstallOEMInfW = GetProcAddress(setupapiMod, "SetupUninstallOEMInfW");
+		}
+		if (g_SetupUninstallOEMInfW == NULL)
+			return ERROR_CALL_NOT_IMPLEMENTED;
+
+        if (!g_SetupUninstallOEMInfW(DstInfName, fFlags, NULL /*__in PVOID Reserved == NULL */))
         {
             DWORD winEr = GetLastError();
             NonStandardLogRelCrap((__FUNCTION__ ": SetupUninstallOEMInf failed for file (%S), oem(%S), winEr (%d)\n", lpszInfPath, DstInfName, winEr));
@@ -651,7 +663,15 @@
     {
         if (!wcsicmp(pContext->InfInfo.lpszPnPId, lpszPnPId))
         {
-            if (!SetupUninstallOEMInfW(lpszFileName,
+			if (g_SetupUninstallOEMInfW == NULL)
+			{
+				HMODULE setupapiMod = LoadLibraryA("setupapi.dll");
+				if (setupapiMod)
+					*(void **)&g_SetupUninstallOEMInfW = GetProcAddress(setupapiMod, "SetupUninstallOEMInfW");
+			}
+			if (g_SetupUninstallOEMInfW == NULL)
+				hr = ERROR_CALL_NOT_IMPLEMENTED;
+            else if (!g_SetupUninstallOEMInfW(lpszFileName,
                         pContext->Flags, /*DWORD Flags could be SUOI_FORCEDELETE */
                         NULL /*__in PVOID Reserved == NULL */
                         ))
