VB accessing a "C++ DLL" 
Author Message
 VB accessing a "C++ DLL"

How can i pass a string from within VB to a DLL
 written in C++???

 I have the DLL written.  it works fine, as long as I pass simple long or
 int's, but when I want i pass a String(VB) to a char *, I get this message
 "BAD  CALLING CONVENTION"



Wed, 22 Jan 2003 03:00:00 GMT  
 VB accessing a "C++ DLL"
i'm not really sure, because it's been ages since i did VB stuff, but adding
'ByVal' to the declaration in VB might work. Or else 'ByRef'. Or something.

I forgot :). But it might help.

ebd



Wed, 22 Jan 2003 03:00:00 GMT  
 VB accessing a "C++ DLL"

Quote:

>How can i pass a string from within VB to a DLL
> written in C++???

> I have the DLL written.  it works fine, as long as I pass simple long or
> int's, but when I want i pass a String(VB) to a char *, I get this message
> "BAD  CALLING CONVENTION"

Download this file:

http://support.microsoft.com/download/support/mslfiles/Vb4dll.exe

It's a self-extracting archive of a text file that explains
the requirements for DLLs used from VB.

    - the function cannot be a non-static class
    member function
    - the function must be declared __stdcall



Wed, 22 Jan 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. "Access violation" accessing a DLL

2. Object "name" in C++ vs VB

3. accessing objects in a c++ DLL from a c++ activeX control placed in a VB application

4. accessing objects in a c++ DLL from a c++ activeX control placed in a VB application

5. Help: Missing dll file "msvcp60.dll"

6. The equivalent of VB "with"

7. Equivalent of "VB Modules" in C#

8. Rules for "implements" in VB

9. Something akin to VB "With"

10. "lint" programs for VB and VC

11. "Shell function" in VB

12. VB "project style" app shell

 

 
Powered by phpBB® Forum Software