Libraray

  • Thread starter Thread starter Kent
  • Start date Start date
K

Kent

Hi All,
I have a c++ library that I would like to call from vb6 or vb.net. For
instance, the file is called name.lib (and name.h) Is it possible to
call the functions in the *.lib from vb6 or vb.net? If so, could you
please point me in the right direction?

Thanks.
(The email address is valid and I check it.)
 
I have a c++ library that I would like to call from vb6 or vb.net. For
instance, the file is called name.lib (and name.h) Is it possible to
call the functions in the *.lib from vb6 or vb.net? If so, could you
please point me in the right direction?

In both vb6 and vb.net, you need to make Declare statements which are
analogous to C function prototypes.
 
AMercer said:
In both vb6 and vb.net, you need to make Declare statements which are
analogous to C function prototypes.

Thanks for the reply. So I would add the following statement:

Private Declare Sub DoSomething Lib "name.lib" Alias "DoSomething"
(ByVal param As Long)

Is this correct?

Thanks again
 
Kent said:
Thanks for the reply. So I would add the following statement:

Private Declare Sub DoSomething Lib "name.lib" Alias "DoSomething"
(ByVal param As Long)

Typically you'd declare the function using 'Lib "name.dll"'. How are the
functions exported by the DLL?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top