ComPtr::operator& Operator


For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

Releases the interface associated with this ComPtr object and then retrieves the address of the ComPtr object.

Details::ComPtrRef<WeakRef> operator&()  
const Details::ComPtrRef<const WeakRef> operator&() const  

A weak reference to the current ComPtr.

This method differs from ComPtr::GetAddressOf in that this method releases a reference to the interface pointer. Use ComPtr::GetAddressOf when you require the address of the interface pointer but do not want to release that interface.

Header: client.h

Namespace: Microsoft::WRL

ComPtr Class