Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem calling a function in DLL

44 views
Skip to first unread message

Kedar

unread,
Nov 29, 1999, 3:00:00 AM11/29/99
to
Hi all,

I am facing a problem while making a call to a function in a DLL. I am
migrating my project from version 5. This same exact code used to work under
version 5 and crashing here.

The error message I get is the following:
--------
Error Number: 0x80040707
Description: DLL function call crashed: PfInstall.ConnectToDBEngine
Setup will now terminate.
-------

and in another case for a difference function, which is called after the
previous one
-------
Error Number: 0x80040704
Description: DLL function call resulted in bad stack
Possible incorrect prototyping: PfInstall.SetCompanyAndFinInformation
Setup will now terminate.
-------


I have updated the prototypes to include the BYREF V/s BYVAL qualifiers.

Can someone help please?

thanks


Olga K (InstallShield)

unread,
Nov 29, 1999, 3:00:00 AM11/29/99
to
Hello Kedar,

Do you specify a return value for your dll? In InstallShield 5.x this was
not used, however in 6.x you need to specify a return value for the dll you
are calling.

Sincerely
--
Olga K.
InstallShield Technical Support

InstallShield® Professional 2000 is now available from InstallShield
Software Corporation! Take advantage of new event-based scripting
and enhanced third-party technology support. Target the Windows Installer
service of Windows 2000. Find out more! Visit www.installshield.com
and upgrade to InstallShield Professional 2000 today!

Kedar wrote in message <38429...@news.installshield.com>...

CK

unread,
Dec 6, 1999, 3:00:00 AM12/6/99
to
I had the same kind of problem. It always showed the error "Description: DLL
function call resulted in bad stack".
What I've done is defining return value type (if the function has one) in
InstallShield decalaration and changed our DLL code to have the functions
declared in .def instead of using 'extern "C" _declspec (dllexport)'.
In most cases it worked for us.

CK


Olga K (InstallShield) wrote in message

ja...@hotmail.com

unread,
Dec 7, 1999, 3:00:00 AM12/7/99
to
having the same problem. error message:

Error Number: 0x80040704
Description: DLL function call resulted in bad stack

Possible incorrect prototyping: Dlg.InvokeRegistration
Setup will now terminate.

dll worked in is5x, but not in is6x.

what exactly do you mean by specifying a return value?

thanks.

Cory Shaffer

unread,
Dec 31, 1999, 3:00:00 AM12/31/99
to
I had the same problem and InstallShield told me to use the following
prototype cdecl instead of just prototype and it worked for me. Also see
below from Adam.

>adam sapek <adams at installshield.com> wrote in message
>news:384d6...@news.installshield.com...
>> Check with QuickView what are the exported names of these functions. My
>> guess is they are decorated. If that's the case just use a .def file to
>> define exports.


ja...@hotmail.com wrote in message <384DD7A3...@hotmail.com>...

aris...@gmail.com

unread,
Sep 9, 2015, 3:39:03 AM9/9/15
to
On Monday, November 29, 1999 at 3:00:00 PM UTC+7, Kedar wrote:
> Hi all,
>
> I am facing a problem while making a call to a function in a DLL. I am
> migrating my project from version 5. This same exact code used to work under
> version 5 and crashing here.
>
> The error message I get is the following:
> --------
> Error Number: 0x80040707
> Description: DLL function call crashed: PfInstall.ConnectToDBEngine
> Setup will now terminate.
> -------
>
> and in another case for a difference function, which is called after the
> previous one
> -------
> Error Number: 0x80040704
> Description: DLL function call resulted in bad stack
> Possible incorrect prototyping: PfInstall.SetCompanyAndFinInformation
> Setup will now terminate.
> -------
>
>
> I have updated the prototypes to include the BYREF V/s BYVAL qualifiers.
>
> Can someone help please?
>
> thanks

have been finding on this since 2007, never get the answer, even MS dont know what the fuck this is
0 new messages