Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Visual Basic DLLs from Visual C++

Status
Not open for further replies.

asiceng05

Technical User
Apr 21, 2005
2
GB
Hi,

I have spent most of yoday trying figure out how to access my visual basic DLL functions from VC++.

This is what I am trying to achieve;

My colleague has this visual basic application that uses the USB port to control an attached system.

I have written a some C++ code which would be embedded on the system and also can be tested via the USB control. Importantly, it requires some of the visual basic functions to operate and so I can't compile my code without these functions!

So I want to interface this with his visual basic.

So far, I have isolated the required functions and put them in a VB Class library dll as well as an .exe application.

But I am unable to access this from VC++.

Is there any other less painful way to use VB functions in VC++?

I would be really grateful for any help.

thanks

asiceng05
 
From your post I can't see exactly what you've tried so far. Looks like you only isolated the functions in VB, right? Nothing yet from within C++?

Therefore; you might already know this..... but anyway:
VB Dlls are COM dlls; you'll have to import the typlib in your C++ project and access them thru COM....

Greetings,
Rick
 
Thanks LazyMe,

that was quite helpful. Well it was a hint that I think has led to the soulution!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top