Freigeben über


ComPtr::operator& Operator

 

The latest version of this topic can be found at ComPtr::operator& Operator.

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

Syntax

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

Return Value

A weak reference to the current ComPtr.

Remarks

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.

Requirements

Header: client.h

Namespace: Microsoft::WRL

See Also

ComPtr Class