View Full Version : error calling dll from installscript

11-18-2004, 09:53 PM
for some reason I'm getting error 0x80040710 (-2147219705) when trying to call a function in a DLL. Note that I get this error on the actual call, not on the UseDLL line....execution doesn't make it into the function in the DLL. Anyone have any idea what this error could be? I've searched on google and in this site with no luck....

11-19-2004, 11:41 AM
Could you post the InstallScript prototype and the C/C++ prototype of your DLL function?

11-19-2004, 01:07 PM

prototype STDCALL BOOL InstallationBridge.ConfigureGentle(POINTER, POINTER, POINTER);

bool __stdcall ConfigureGentle(char const *fileName, char const *provider, char const *connectionString);

I've tried exporting with __declspec(dllexport) and with a def file, both give the same thing, and I've checked the DLL with depends.exe and the name isn't being mangled...

11-19-2004, 01:39 PM
Hmmmm... In the InstallScript prototype, perhaps replace POINTER with BYVAL STRING?

11-19-2004, 02:03 PM
actually...thanks for the help but I believe I've figured it out. My DLL is a managed C++ DLL which I am using as a bridge so I can use .NET objects in the installer. The problem is that when it's trying to load a .NET assembly (from within the DLL) it can't find the assembly. I've got both the DLL and the assembly in the supportdir, but it appears it won't find the assembly unless it is in the same directory as setup.exe. So I'm going to try explicitly loading it into the bridge DLL and using reflection to access it....thx for your help