Creates a smart pointer type that represents the interface specified by the template parameter. ComPtr automatically maintains a reference count for the underlying interface pointer and releases the interface when the reference count goes to zero.
The interface that the ComPtr represents.
A class to which the current ComPtr is a friend. (The template that uses this parameter is protected.)
ComPtr<> declares a type that represents the underlying interface pointer. Use ComPtr<> to declare a variable and then use the arrow member-access operator (->) to access an interface member function.
For more information about smart pointers, see the "COM Smart Pointers" subsection of the topic in the MSDN Library.76aca556-b4d6-4e67-a2a3-4439900f0c39
A synonym for the type specified by the T template parameter.
Returns a ComPtr object that represents the interface identified by the specified template parameter.
Returns a ComPtr object that represents the interface identified by the specified interface ID.
Retrieves a weak reference to the current object.
Associates this ComPtr with the interface type specified by the current template type parameter.
Copies the current or specified interface associated with this ComPtr to the specified output pointer.
Disassociates this ComPtr from the interface that it represents.
Retrieves a pointer to the interface that is associated with this ComPtr.
Retrieves the address of the ptr_ data member, which contains a pointer to the interface represented by this ComPtr.
Releases the interface associated with this ComPtr and then retrieves the address of the ptr_ data member, which contains a pointer to the interface that was released.
Releases all references for the pointer to the interface that is associated with this ComPtr.
Exchanges the interface managed by the current ComPtr with the interface managed by the specified ComPtr.
Indicates whether or not a ComPtr is managing the object lifetime of an interface.
Retrieves the address of the current ComPtr.
Assigns a value to the current ComPtr.
Retrieves a pointer to the type specified by the current template parameter.
Indicates whether two ComPtr objects are equal.
Indicates whether two ComPtr objects are not equal.
Protected Data Members
Contains a pointer to the interface that is associated with, and managed by this ComPtr.