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

Returning a VARIANT from a DLL

Status
Not open for further replies.

himu

Programmer
Sep 25, 2000
2
US
Hi!

I have written a DLL program, and created an automation class in which there is a function which picks up the names of books from the database and returns them to the calling application. Since the return values are multiple in number and I want to call this function from Visual Basic, I am trying to return a VARIANT from VC++. Now I dont know if this will work, what data type should I use in VB to capture the returned values.

I am trying to return an array of values thru this VARIANT type of variable. Can somebody help me.

I used MSDN help, and found the concept of SAFEARRAY, tried to put the names of books into the variant array but not able to retrieve them in VB. Is this the right way of doing it!
Please help!

Himu

[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top