Archive: Uninstaller could not load DLL


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


I looked through the following topic
"Could not load: XXXX.dll error in log (possibly XP SP3 related)"
http://forums.winamp.com/showthread....hreadid=291913


it says, that DLL loading error could be caused by missed DLL dependencies. But in my case my function use the same libraries as InstDrv, but for all that when I call InstDrv's native function all is OK. =(