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

what are these datatypes: LPUNKNOWN, and VARIANT?

Status
Not open for further replies.

joelwenzel

Programmer
Jun 28, 2002
448
0
0
Hello,

I'm making an activeX control and I am just wondering what LPUNKNOWN and VARIANT data types can be used for. I am finding it difficult to find documentation on them.

thanks
 
>I am finding it difficult to find documentation on them.
no comments,
in internet is a lot of information. Try google.com

Ion Filipski
1c.bmp
 
LPUNKNOWN is the same as "IUnknown *", or a pointer to an object which supports the IUnknown interface. This interface is the base class for every COM and ActiveX class. You would use it to pass a reference to a COM or ActiveX object when you don't know or don't care what interfaces it actually supports. It is for reference counting and finding other interfaces an object supports.

VARIANT data type is used for generic argument passing, between functions that do not know each others' argument types until run-time. It is used a lot in automation and for using ActiveX controls from loosely typed languages such as Visual Basic or JavaScript.

Both these types are part of the basics of COM and ActiveX programming. It might save you a lot of time if you pick up a book on ActiveX programming, as the first few chapters will cover these things and more.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top