Share via

ComPtr::Detach Method


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at 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.


Header: client.h

Namespace: Microsoft::WRL

See Also

ComPtr Class