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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a C Class Instance in VB

Status
Not open for further replies.

javaguru007

Programmer
Nov 25, 2003
17
PH
Hello people.
I am a newbie in VB and just want to know, how to create an instance of a Class written in C in VB ?
Problem:
I have created a class in C that will be called in VB. The problem is that one of the parameters in the functions that I created is a class written in C. (The class is basically just a storage)
Can anybody tell me how to create an instance of this class in VB to be passed to the functions or methods that I created so that I won't have to redesign my class. THANKS IN ADVANCE.
 
Is this a COM class? If so you just need a reference to it in your VB project.... Within the VB IDE choose the "Project" menu and then choose the "References" item.

If it is not a COM class, but it is just for storage... change your C program so that it is a struct instead... then you can make a TypeLib that defines the struct and create a reference to it the same way as with the COM component or even just use VB's version of struct... A.K.A.: User Defined Type.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top