Board index » cppbuilder » Using VB 6.0 dll in Builder

Using VB 6.0 dll in Builder


2003-12-19 03:44:05 AM
cppbuilder103
Hello,
I'm trying to use a VB 6.0 dll I developed in Builder C++ but am a "Builder
rookie". I guess the biggest stumbling block is understanding what to do
with the code Builder generates after I choose "Import Type Library".
I also tried LoadLibrary but the VB 6.0 dll only seems to export the
DllGetClassObject so I am lost when I get to GetProcAddress.
Bob
 
 

Re:Using VB 6.0 dll in Builder

Basically you have two options (provided of course that we are talking about
a COM DLL and not just a plain DLL).
1. Turn the DLL into a VCL component by choosing Import Type
Library->Install and have Create Component Wrapper checked (easy way)
or
2. Use it as COM server. In this case all you have to do is use the *_tlb.h
file it produces under the \imports directory.
In any case you don't need to do anything with the generated code. It's just
a wrapper for accessing the DLL. Option 1 might not work. You can increase
your chances by using BCB6 and the September 2002 patch for tlib60.bpl
file.
Regards
Manos
"Bob" < XXXX@XXXXX.COM >wrote in message
Quote
Hello,

I'm trying to use a VB 6.0 dll I developed in Builder C++ but am a
"Builder
rookie". I guess the biggest stumbling block is understanding what to do
with the code Builder generates after I choose "Import Type Library".

I also tried LoadLibrary but the VB 6.0 dll only seems to export the
DllGetClassObject so I am lost when I get to GetProcAddress.

Bob