Is there a COM object that just implements IUnknown I can use?
Posted
by
Matt
on Stack Overflow
See other posts from Stack Overflow
or by Matt
Published on 2012-09-03T23:15:52Z
Indexed on
2012/09/04
3:38 UTC
Read the original article
Hit count: 419
For an asynchronous Windows API, I can provide an IUnknown state parameter to associate calls to the API with calls from the callback.
It's my understanding that COM guarantees that two IUnknown pointers to the same object will be of the same value. Thus, if I only want to associate API calls with callbacks, IUnknown should be all I need, by comparing the values of the pointers.
Is there a stock implementation of IUnknown I can use? Of course it would be trivial to implement myself, but for such a base component of COM, I'm wondering if Windows or ATL provides one I should use instead.
Thanks, --Matt
© Stack Overflow or respective owner