Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AsWeak Function

 

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 AsWeak Function.

Retrieves a weak reference to a specified instance.

template<  
   typename T  
>  
HRESULT AsWeak(  
   _In_ T* p,  
   _Out_ WeakRef* pWeak  
);  

Parameters

T
A pointer to the type of parameter p.

p
An instance of a type.

pWeak
When this operation completes, a pointer to a weak reference to parameter p.

S_OK, if this operation is successful; otherwise, an error HRESULT that indicates the cause of the failure.

Header: client.h

Namespace: Microsoft::WRL

Microsoft::WRL Namespace

Show:
© 2018 Microsoft