Download source - 8 Kb This tutorial is based off of the MSDN
Article #ID: Q194873. But, for a beginner, following these MSDN
articles can be intimidating to say the least. One of the most
often asked questions I see as a Visual C++ and Visual Basic
programmer is how to call a VB DLL from VC++. Well, I am hoping
to show you exactly that today. I am not going to go over the
basic details of COM as this would take too long, so I am
assuming you have an understanding of VB, VC++ and a little COM
knowledge. It's not too hard to learn; just takes a little time.
So let's get started. The first thing you need to do is fire up
Visual Basic 6 (VB 5 should work as well). With VB running,
create a new "ActiveX DLL" project. Rename the project to
"vbTestCOM" and the class to "clsTestClass". You can do this by
clicking in the VB Project Explorer Window on the Project1 item
(Step 1), then clicking in the Properties window and selecting
the name property (Step 2). Do the same for the Class. Click on
the class (Step 3), then