Click to See Complete Forum and Search --> : How to create Type Library (DLL) in C++ to add as reference for VB
Don_Juan
March 13th, 2001, 09:16 PM
Hiya to all GURUS out there :)
Could anyone please advice me in how to create a Type Library using Visual C++ so that I could add it into a Visual Basic Project as a reference?
In fact, a step-by-step guide would do. And as an example, an extremely simple Type Library would suffice as demonstration.
Thanks in advance :)
Lev FatMan
March 15th, 2001, 07:22 AM
There are many kinds of DLL you can make ,
The most automated way as I see it is using COM dll.
In VC++ you just make a new ATL COM projects , choose DLL and add your methods and Properties.
Thats is the general Idea.
If you know C++ well you can jsut write a DLL and import it in the VB GUI.
FatMan
Clearcode
March 15th, 2001, 11:46 AM
There is also a MKTYPLIB utility.
You create a .def file and run this and it makes the .tlb file.
It's documented at http://msdn.microsoft.com
HTH,
Duncan
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
gambit
March 23rd, 2001, 03:45 AM
hi,
I have tried your method.
But I have error message.
How the def file look like?
Is it same as any DLL export file?
thank you!
Clearcode
March 23rd, 2001, 03:54 AM
No, you need to write up a type lib description in something called the "Object Description language".
The best explanation is at http://msdn.microsoft.com/library/books/inole/S111F.HTM
HTH,
Duncan
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
gambit
March 26th, 2001, 02:42 AM
hi
I have successfully created a DLL in VC++ and added into VB GUI by using the "add reference".
However when I used the "Object Browser" to view it.
I can only see my class but not its member function.
Do you know what the problem?
I create the function in VC++ by using "add member function".
thank you!
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.