i've a problem with a custom action which needs to execute a function in a DLL.
The prototype of the function is this (in C):
__declspec (dllexport) BOOL GetProcessPath (char* szProcessName, char** szPath);
(i pass a pointer and a pointer to a pointer:
first one is untouched, the second one when the function returns
will contain a pointer to a buffer the function allocate itself).
I've prototyped it in my InstallScript this way :
prototype LONG SPProcLib.GetProcessPath (STRING,BYREF STRING);
and i call it with :
res = UseDLL (szInstDir ^ "SPProcLib.dll");
bProcessFound = GetProcessPath ("SETUP.EXE",szSetupFile);
What's bad is that GetProcessPath is not executed and the installer rollbacks as
when you prototype wrong.
Could you tell me where's the error ? Its the char** in the C function ?
UseDLL of course returns OK, so its not a dependencies problem. Also, the DLL works if
used from a test C program.
Thanx,
Valerio