ComPtr::Detach Method
Disassociates this ComPtr object from the interface that it represents.
T* Detach();
Return Value
A pointer to the interface that was represented by this ComPtr object.
Requirements
Header: client.h
Namespace: Microsoft::WRL