IntelliSense shows different sets of functions for CComPtr<T> depending on whether I use dot or arrow operator [closed]
开发者_C百科
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this questionIn my code I have
CComPtr<SomeInterface> object;
When I use object.
IntelliSense shows a set of available functions. And when I use object->
it shows me another set of available functions. Why are those function sets different?
With such declaration:
CComPtr<T> object;
using dot you access members of CComPtr
class, for example, CComPtr.Detach()
method:
*doublePointerToT = object.Detach(); // pass ownership - calls CComPtr<T>::Detach()
and using arrow you gain the stored T*
pointer and then arrow operator is applied to T*
retrieved and so you see members of T
:
object->QueryInterface( ... ); //calls T::QueryInterface()
So with dot you see member functions of CComPtr
class and with arrow you see functions of T
class.
精彩评论