Share via


ComPtr::Swap Method

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

void Swap(
   _Inout_ ComPtr&& r
);

void Swap(
   _Inout_ ComPtr& r
);

Parameters

  • r
    A ComPtr.

Requirements

Header: client.h

Namespace: Microsoft::WRL

See Also

Reference

ComPtr Class