PDA

View Full Version : Calling external DLL



NewsArchive
12-11-2001, 01:00 AM
Hi folks,
I have problem with calling external DLL.
The function, which I'm calling is defined as follows:
extern "C"
bool TestIt(const char *Type ,const char *ID, const char *NumRetr);

The prototype in the installshield is as follows:
prototype BOOL Val.TestIt( STRING, STRING, STRING);
When I try to call the function, the install shield shows error message,
that my function protoype is possibly wrong and the dll returned in bad
stack.
With installshield 5.5 there was no problem with these definitions.
Can somebody help me with this?

Best,
Al

NewsArchive
12-12-2001, 01:00 AM
Hi Al,
The dll that you made fo IS 5.5 won't work with IS 6.3. You will have to
modify your dll entry point prototype to

LONG APIENTRY YourFunction (HWND hwnd, LPLONG lpIValue, LPSTR strString)
{
return 1;
}

This will work, i use it all the time.

Marky D.


"Aleko Boychev" <aleko@hotpop.com> wrote in message
news:3c1603f5@news.installshield.com...
> Hi folks,
> I have problem with calling external DLL.
> The function, which I'm calling is defined as follows:
> extern "C"
> bool TestIt(const char *Type ,const char *ID, const char *NumRetr);
>
> The prototype in the installshield is as follows:
> prototype BOOL Val.TestIt( STRING, STRING, STRING);
> When I try to call the function, the install shield shows error message,
> that my function protoype is possibly wrong and the dll returned in bad
> stack.
> With installshield 5.5 there was no problem with these definitions.
> Can somebody help me with this?
>
> Best,
> Al
>
>

NewsArchive
12-12-2001, 01:00 AM
prototype it with cdecl, and you'll be fine. I am using a dll we created
when we were using v3. In any dll function that you need to use with
arguments you will need to use cdecl. Heres an example:
prototype cdecl ServerInstallAPI.DNGetBinaryDirectory(BYREF STRING,
NUMBER);

schott

"Aleko Boychev" <aleko@hotpop.com> wrote in message
news:3c1603f5@news.installshield.com...
> Hi folks,
> I have problem with calling external DLL.
> The function, which I'm calling is defined as follows:
> extern "C"
> bool TestIt(const char *Type ,const char *ID, const char *NumRetr);
>
> The prototype in the installshield is as follows:
> prototype BOOL Val.TestIt( STRING, STRING, STRING);
> When I try to call the function, the install shield shows error message,
> that my function protoype is possibly wrong and the dll returned in bad
> stack.
> With installshield 5.5 there was no problem with these definitions.
> Can somebody help me with this?
>
> Best,
> Al
>
>