WinUI COM Interop

To develop with COM interop APIs for WinUI, you need these headers:

For programming guidance for this technology, see WinUI 3.

Enumerations

 
XAML_REFERENCETRACKER_DISCONNECT

Functions

 
AddMemoryPressure

Informs the host of increased memory allocations since the last notification.
AddRefFromReferenceTracker

Indicates that the reference tracker is returning the target XAML object(s) from previous calls to FindTrackerTargets.
AddRefFromTrackerSource

Indicates each time that a tracker source calls IUnknown::AddRef on the reference tracker (called after AddRef).
BeginDraw

BeginDraw

ConnectFromTrackerSource

Indicates that a reference tracker source has created its first COM reference on a reference tracker object.
CreateTrackerHandle

DeleteTrackerHandle

DisconnectFromTrackerSource

Indicates that a reference tracker source has stopped tracking a reference tracker.
DisconnectUnusedReferenceSources

Requests that the host perform garbage collection and remove all unnecessary reference sources.
EndDraw

EndDraw

FindTrackerTargets

Finds the reference tracker targets that are reachable from a reference tracker source.
FindTrackerTargetsCompleted

Indicates that a garbage collection system has finished making all the calls it needs to IReferenceTracker::FindTrackerTargets (by this time, XAML has pegged all reference tracker targets that it wants to protect).
FlushAllSurfacesWithDevice

FoundTrackerTarget

Called whenever a XAML object reference tracker target is found.
get_WindowHandle

Retrieves the window handle (HWND) of the window represented by the object that implements IWindowNative.
GetReferenceTrackerManager

Gets an IReferenceTrackerManager interface from a XAML object.
GetTrackerTarget

Requests the host provide a reference tracker target that references a reference tracker source. This tracker target then controls the lifetime of the tracker source.
GetUiLayerForXamlRoot

Gets the visual diagnostics root that can be used to draw on for highlighting elements in the tree.
GetUpdateRectCount

GetUpdateRects

GetVisibleBounds

HitTestForXamlRoot

Gets all elements in the visual tree that fall within the specified rectangle.
Invalidate

NotifyEndOfReferenceTrackingOnThread

Notifies the host that reference tracking is no longer available on the calling thread; XAML calls this when the FrameworkView is uninitialized.
OnXamlRootChange

Communicates when a XamlRoot root is added or removed.
Peg

Marks that the reference tracker target is in use by the XAML framework, and should not be collected.
PegFromTrackerSource

Indicates that a tracker source is unable to protected a reference tracker object.
ReferenceTrackingCompleted

Indicates that a garbage collection system has finished with its collection process (at this point, XAML unblocks threads attempting to update tracked references).
ReferenceTrackingStarted

Indicates that a garbage collector is performing a collection.
RegisterForUpdatesNeeded

ReleaseDisconnectedReferenceSources

Requests that the host call IUnknown::Release on any reference tracker objects that have been disconnected by a reference source.
ReleaseFromReferenceTracker

Releases the XAML object reference marked in a previous call to AddRefFromReferenceTracker.
ReleaseFromTrackerSource

Indicates each time that a tracker source calls IUnknown::Release on the reference tracker (must be called before the Release call).
RemoveMemoryPressure

Informs the host of reduced memory allocations since the last notification.
Resize

ResumeDraw

SetDevice

SetDevice

SetReferenceTrackerHost

Registers an IReferenceTrackerHost interface with XAML.
SetSwapChain

SetSwapChain

SetSwapChainHandle

SetTrackerValue

SuspendDraw

TryGetSafeTrackerValue

Unpeg

Marks that the reference tracker target is no longer in use by the XAML framework and can be collected.
UpdatesNeeded

Interfaces

 
IFindReferenceTargetsCallback

Defines the interface for callbacks from FindTrackerTargets.
IReferenceTracker

Defines the interface implemented by the XAML framework for managing XAML object references.
IReferenceTrackerExtension

IReferenceTrackerHost

Defines an interface that provides the global services used by the garbage collection (GC) system used by the XAML framework.
IReferenceTrackerManager

Defines the interface for a XAML object reference manager. Implement this interface to manage instances of IReferenceTracker on XAML objects.
IReferenceTrackerTarget

Defines an interface implemented by a garbage collector object referenced from XAML.
ISurfaceImageSourceManagerNative

ISurfaceImageSourceNative

ISurfaceImageSourceNativeWithD2D

ISwapChainBackgroundPanelNative

ISwapChainPanelNative

ISwapChainPanelNative2

ITrackerOwner

IVirtualSurfaceImageSourceNative

IVirtualSurfaceUpdatesCallbackNative

IVisualTreeServiceCallback3

Represents additional capabilities of an IVisualTreeServiceCallback2 object.
IWindowNative

Enables interoperability between XAML and a native window.
IXamlDiagnostics2

Represents additional capabilities of an IXamlDiagnostics object.

Structures

 
TrackerHandle__