IWeakReference interface (weakreference.h)

Represents a weak reference to an object.


With only a few exceptions, weak reference support is on by default for Windows Runtime types that you consume or author in C++/WinRT, WRL, and C++/CX. Windows.UI.Composition and Windows.Devices.Input.PenDevice are examples of exceptions—that is, namespaces where weak reference support is not on for those types.

If you're authoring types, then see Weak references in C++/WinRT.


The IWeakReference interface inherits from the IUnknown interface.


The IWeakReference interface has these methods.

Method Description
IWeakReference::Resolve Resolves a weak reference by returning a strong reference to the object.


Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header weakreference.h