🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools.mfc
Article #54

Re: Prob calling VC++ 4.0 DLL from VB4 (32bit)

#54
From: Lauren Vanderhoof
Date: Wed, 21 Feb 1996 04:01
31 lines
1510 bytes
billbo@ix.netcom.com (Bill Boland) wrote:

>a09748@giant.mindlink.bc.ca (ESSA) wrote:

>>
>>Having a frustrating time trying to call a function in a DLL developed in
>>VC++ 4.0 from Visual Basic 4.0 (32bit). I'm getting VB error 49 (bad DLL
>>calling convention) from the following simple function ...
>>
<snip> non-working code

>Bill Boland
>--------
>billbo@ix.netcom.com
>I may have a clue since I had a similar situation today.
>If a DLL is compiled with VB 4.0 WITHOUT a module definition file and
>uses  the new __declspec( dllexport ) to declare functions as
>exportable, VB4 cannot seem to understand them. At least that is what
>I discovered today on my own.

Yes a module definition file seems to be necessary, VB couldn't find
the C function names until I included one.

However, this doesn't quite explain the "Bad Calling Convention"
error.

Check out VB4DLL.TXT in the \VB directory on the CDROM. It should help
explain all.

Cheers,
	lauren :}
Technical Details
Message-ID: <4ge5da$ovs@news.halcyon.com>
Path: arc1-ca.pugleaf.net!news.halcyon.com!usenet
References: <4f7u8h$63q@fountain.mindlink.net> <3129a180.11614278@nntp.ix.netcom.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.halcyon.com!usenet
From: laurenv@halcyon.com (Lauren Vanderhoof)
Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++,comp.lang.basic.visual.misc
Subject: Re: Prob calling VC++ 4.0 DLL from VB4 (32bit)
Date: Wed, 21 Feb 1996 04:01:33 GMT
Organization: Northwest Nexus Inc.
Message-ID: <4ge5da$ovs@news.halcyon.com>
References: <4f7u8h$63q@fountain.mindlink.net> <3129a180.11614278@nntp.ix.netcom.com>
NNTP-Posting-Host: blv-pm14-ip7.halcyon.com
X-Newsreader: Forte Free Agent 1.0.82