WindowsRuntimeMarshal.PtrToStringHString(IntPtr) Method

Definition

Returns a managed string that contains a copy of the specified Windows RuntimeHSTRING.

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

public:
 static System::String ^ PtrToStringHString(IntPtr ptr);
[System.Security.SecurityCritical]
public static string PtrToStringHString (IntPtr ptr);
public static string PtrToStringHString (IntPtr ptr);
[<System.Security.SecurityCritical>]
static member PtrToStringHString : nativeint -> string
static member PtrToStringHString : nativeint -> string
Public Shared Function PtrToStringHString (ptr As IntPtr) As String

Parameters

ptr
IntPtr

nativeint

An unmanaged pointer to the HSTRING to copy.

Returns

A managed string that contains a copy of the HSTRING if ptr is not Zero; otherwise, Empty.

Attributes

Exceptions

The Windows Runtime is not supported on the current version of the operating system.

Applies to