Uninstaller could not load DLL
Folks,
I used the InstDrv plugin to operate my driver, but it doesn't uninstall it for some purpose and doesn't throw up any error.
So I decided to add to the plug-in my own function. Here is its code:
NSISFunction(RemoveDevice)
{
BOOL NeedReboot = false;
char resultBuf[200];
DWORD Flags, result;
EXDLL_INIT();
popstring(paramBuf); //DriverPackageInfPath
if (strcmp(paramBuf, "") == 0)
{
pushstring("Invalid Driver Path!");
return;
}
Flags = SUOI_FORCEDELETE;
if( SetupUninstallOEMInf(paramBuf, Flags, NULL) )
{
wsprintf(resultBuf, "The work is done!!!\n");
}
else
{
result = GetLastError();
wsprintf(resultBuf, "UNINSTALL Error ocured!!! Error code: %08X\n", result);
}
pushstring(resultBuf);
}
But when I use it function I get in unistaller's DetailPrint:
"Could not load: D:\TEMP\nsf88.tmp\InstDrv.dll"
Does anyone know why it happens?
Thanks