Compartilhar via


IXRVisualHost::DestroyWindow (Compact 2013)

3/28/2014

This method closes and destroys this visual host object.

Syntax

virtual HRESULT STDMETHODCALLTYPE DestroyWindow() = 0;

Parameters

None.

Return Value

Returns an HRESULT that indicates success or failure.

Returns XR_E_INVALID_THREAD_ACCESS if this method was called from a thread different from the thread on which the system was initialized. A visual host can only be access on the thread that it was created on. Notice that most XAML for Windows Embedded APIs can only be accessed from a single thread.

Returns XR_E_INVALID_STATE if this method was called on an object in an invalid state, such as a host that was already destroyed, or a dialog that was closed without calling EndDialog.

Remarks

This method releases a reference on the visual root of the element tree for this host. This action changes the element tree into an orphaned tree without a host. The orphaned tree is now able to be attached to another element tree.

After you call this method, you can free all allocated resources for this object.

.NET Framework Equivalent

None.

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRVisualHost