Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

WindowsRuntimeMarshal Class

.NET Framework 4.6 and 4.5

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Provides helper methods for marshaling data between the .NET Framework and the Windows Runtime.

System.Object
  System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal

Namespace:  System.Runtime.InteropServices.WindowsRuntime
Assemblies:   System.Runtime.InteropServices.WindowsRuntime (in System.Runtime.InteropServices.WindowsRuntime.dll)
  mscorlib (in mscorlib.dll)

public static class WindowsRuntimeMarshal

The WindowsRuntimeMarshal type exposes the following members.

  NameDescription
Public methodStatic memberAddEventHandler<T>Infrastructure. Adds the specified event handler to a Windows Runtime event.
Public methodStatic memberFreeHStringFrees the specified Windows Runtime HSTRING.
Public methodStatic memberGetActivationFactoryInfrastructure. Returns an object that implements the activation factory interface for the specified Windows Runtime type.
Public methodStatic memberPtrToStringHStringReturns a managed string that contains a copy of the specified Windows Runtime HSTRING.
Public methodStatic memberRemoveAllEventHandlersInfrastructure. Removes all the event handlers that can be removed by using the specified method.
Public methodStatic memberRemoveEventHandler<T>Infrastructure. Removes the specified event handler from a Windows Runtime event.
Public methodStatic memberStringToHStringAllocates a Windows Runtime HSTRING and copies the specified managed string to it.
Top

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft