ComPtr::Swap Method

Exchanges the interface managed by the current ComPtr with the interface managed by the specified ComPtr.

Syntax

void Swap(  
   _Inout_ ComPtr&& r  
);  

void Swap(  
   _Inout_ ComPtr& r  
);  

Parameters

r
A ComPtr.

Requirements

Header: client.h

Namespace: Microsoft::WRL

See Also

ComPtr Class