🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#60
From: Tony O'Brien
Date: Tue, 27 Feb 1996 04:37
35 lines
1889 bytes
a09748@giant.mindlink.bc.ca (ESSA) wrote:

>Bill Boland (billbo@ix.netcom.com) 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 ...

>: 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.

>Thanks Bill. And thanks Rob Ross of FTP Software, who got back to me after 
>phoning MS support about the same problem.
>In the root of the VB4 installation directory, there is a file called 
>vb4dll.txt that explains a number of issues concerning 32bit DLL's, including
>the problems I'd been having.
>The solution, as Bill discovered (how many hours do you figure we've all 
>collectively wasted ?) is the use of the DEF file.

>---
>pwhiteside@essa.com
>ESSA Software Ltd.

The DEF file is certainly useful but probably NOT the source of this
error...You need to specify _STDCALL (calling convention) in the
projects settings...

regards,


Tony O'Brien
Sourcecode, Inc.
srccode@voicenet.com
Technical Details
Message-ID: <4gtnfr$q8o@news.voicenet.com>
Path: arc1-ca.pugleaf.net!news.voicenet.com!news
References: <4f7u8h$63q@fountain.mindlink.net> <3129a180.11614278@nntp.ix.netcom.com> <4ggs6j$4j1@fountain.mindlink.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.voicenet.com!news
From: srccode@omni.voicenet.com (Tony O'Brien)
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: Tue, 27 Feb 1996 04:37:03 GMT
Organization: Sourcecode, Inc
Message-ID: <4gtnfr$q8o@news.voicenet.com>
References: <4f7u8h$63q@fountain.mindlink.net> <3129a180.11614278@nntp.ix.netcom.com> <4ggs6j$4j1@fountain.mindlink.net>
NNTP-Posting-Host: medford10.voicenet.com
X-Newsreader: Forte Free Agent 1.0.82