I'm having trouble with Installshield professional 6 when running my own DLL.
The DLL function is defined like:
__declspec(dllexport) int doStuff( HANDLE hWnd, char *string)
and I call it from the script by the following:
prototype INT myDll.doStuff(HWND, BYREF STRING);
export prototype stuff_Installed();
function stuff_Installed()
STRING string;
BOOL Result;
begin
Result = UseDLL("myDll");
if(Result < 0) then
SprintfBox(SEVERE, "FAILED", "FAILED");
endif;
string = "Hello World";
Result = doStuff(GetWindowHandle(HWND_INSTALL), string);
if( Result != 0 )then
SprintfBox(SEVERE, "FAIL", "FAIL");
endif;
SprintfBox(SEVERE, "PASS", "PASS");
end;
No matter what I do the code doesn't seem to return to the script, instead the installer just continues with the rest of the installation, i.e. neiither of the two SprintfBox'es are output...
I've seen similar errors in calling the DLL if you get the parameters wrong, but I'm sure they're right!
Any ideas?
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
DLL execution error
Started by
gsh100
, Sep 05 2002 10:58
3 replies to this topic
Posted 06 September 2002 - 17:20
Moving this question to the Professional 6 forum
Stefan Krüger
InstallSite.org twitter facebook
Posted 06 September 2002 - 17:27
First make sure your script compiles with 0 errors, and build a new media.
If that doesn't help use the debugger to see whether your function gets called, or why not.
Also you should make sure your exported DLL function name is not mangled, and you should specify the calling convention in your InstallScript prototype.
If that doesn't help use the debugger to see whether your function gets called, or why not.
Also you should make sure your exported DLL function name is not mangled, and you should specify the calling convention in your InstallScript prototype.
Stefan Krüger
InstallSite.org twitter facebook
Posted 18 March 2003 - 20:04
Add extern "C" before the following line:
declspec(dllexport) int doStuff( HANDLE hWnd, char *string)
See if it works.
declspec(dllexport) int doStuff( HANDLE hWnd, char *string)
See if it works.