View Full Version : DLL stack corrupt error on custom dll action

11-22-2006, 07:26 PM

I created a win32, dll
I have a function

extern "C" _declspec(dllexport) show()

In my installshield project: I say
Custom Action => DLL => call function show
I get the message box but after that I get an error saying:

The DLL call 'show' casued a corrupted stack, make sure you have correct number of parameters and the function uses standard calling convention.

Please help.


11-22-2006, 07:33 PM
I don't know much about Express, but as far as writing DLLs for MSI custom actions goes, please see (for example) this old newsletter tip: http://www.installshield.com/news/newsletter/0108-articles/dlls-for-ipwi.asp.

11-22-2006, 07:50 PM
Thanks for the URL
It worked for me
I was creating a win32 dll but I had to create my export functions in a different way

UINT __stdcall FirstAction(MSIHANDLE hInstall)
GetForegroundWindow( ),
TEXT("This is FirstAction."),
TEXT("Custom Action"),


this worked for me
In the InstallShield Express - I changed the Classic entry to New and it worked

Thanks again

Christopher Painter
11-22-2006, 08:02 PM
Yes, declspec is not good for MSI.

I was once teaching a C++ developer ( a real one, not an old unix vi cc ansi C hack like me ) how to stub out a DLL for WindowsInstaller. His fingers were typing declspec faster then I could correct him. He then tried to call it and poof. Then before I could stop him ( he's real good and real fast hehehe ) he brought up depends on an InstallScript CA stored in ISSetup.dll and compared it to his DLL and said:

ahhhhh.... stdcall