This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- back stack error
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 29, 2012
01:12 PM
back stack error
I have an external function in my dll which is defined like this:
extern "C" {
__declspec(dllexport) int(LPCSTR, LPCSTR, LPCSTR, LPCSTR);
}
and like this in InstallScript
prototype INT.(byval STRING,byval STRING,byval STRING,byval STRING);
and call it like this:
if ((szPid, szVer, szEmail, szSerial)=1) then
and when I call the function it does it's business but then I get an error message that says:
Error number: 0x80040704
Description: DLL function call resultet in bad stack POssible incorrect prototyping...
Setup will now terminate.
I've check the data, it transfers to my dll correctly and in the dll everything finishes fine. The dll basically connects to my website to validate the serial number using wininet. I've tried compiling a test exe file to check whether the dll functions returns values and it does so without any errors.
What seems to be the problem?
extern "C" {
__declspec(dllexport) int
}
and like this in InstallScript
prototype INT
and call it like this:
if (
and when I call the function it does it's business but then I get an error message that says:
Error number: 0x80040704
Description: DLL function call resultet in bad stack POssible incorrect prototyping...
Setup will now terminate.
I've check the data, it transfers to my dll correctly and in the dll everything finishes fine. The dll basically connects to my website to validate the serial number using wininet. I've tried compiling a test exe file to check whether the dll functions returns values and it does so without any errors.
What seems to be the problem?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 29, 2012
02:46 PM
Does it work if your DLL function prototype specifies the __stdcall calling convention, or instead your InstallScript function prototype specifies the cdecl calling convention?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 06, 2012
08:15 PM
Yes Robert, using cdecl solved the issue. Thank you very much.
