System::Runtime::InteropServices::Marshal::PtrToStringUni method

Marshal::PtrToStringUni(IntPtr) method

Creates a managed String from an unmanaged zero-terminated unicode string.

static String System::Runtime::InteropServices::Marshal::PtrToStringUni(IntPtr ptr)
ParameterTypeDescription
ptrIntPtrPointer to the unmanaged string.

ReturnValue

A managed string.

See Also

Marshal::PtrToStringUni(IntPtr, int) method

Creates a managed String from an unmanaged unicode string.

static String System::Runtime::InteropServices::Marshal::PtrToStringUni(IntPtr ptr, int length)
ParameterTypeDescription
ptrIntPtrPointer to the unmanaged string.
lengthintLength of the unmanaged string.

ReturnValue

A managed string.

See Also