| description | Learn more about: AsWeak Function | |
|---|---|---|
| title | AsWeak Function | |
| ms.date | 11/04/2016 | |
| ms.topic | reference | |
| f1_keywords |
|
|
| helpviewer_keywords |
|
|
| ms.assetid | a6f10cfc-c1d6-4761-adb9-1a119cc99913 |
Retrieves a weak reference to a specified instance.
template<typename T>
HRESULT AsWeak(
_In_ T* p,
_Out_ WeakRef* pWeak
);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