Archived

This topic is now archived and is closed to further replies.

COM objects !!!

This topic is 5622 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everybodyyyyyyyy, NICE TO SEE ALL OF YOUUU, AGAIN !!! I came back to ask other CRAZY question, again Ok, i knew that for learning using of COM object, i have to read many of documentations ... But, i BEG you !!! Please, please tell me, what is QueryInterface !!! What is AddRef ??? I GOT CONFUSED Please tell me what excatly occures when i use thease functions ??? Please help me !!! Thanks in advance !

Share this post


Link to post
Share on other sites
QueryInterface allows you to attempt to retrieve a non-IUnknown interface from a COM-object. Basically, it allows you to ask any IUnknown (thus, any COM-object) what else it can do.

AddRef adds a reference-count - used to manage the lifetime of COM objects. The reference count basically tracks how many objects are using this object - when it falls to 0, that means nobody is using the object, and it can delete itself.

Share this post


Link to post
Share on other sites