ComPtr::Swap Method

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

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