System::Runtime::InteropServices::Marshal::PtrToStringUni 方法

Marshal::PtrToStringUni(IntPtr) method

创建一个受管的 String,来自未托管的零终止 Unicode 字符串。

static String System::Runtime::InteropServices::Marshal::PtrToStringUni(IntPtr ptr)
ParameterType描述
ptrIntPtr指向非托管字符串的指针。

ReturnValue

受管的字符串。

另见

Marshal::PtrToStringUni(IntPtr, int) method

创建一个受管的 String,来自未托管的 Unicode 字符串。

static String System::Runtime::InteropServices::Marshal::PtrToStringUni(IntPtr ptr, int length)
ParameterType描述
ptrIntPtr指向非托管字符串的指针。
lengthint未受管的字符串的长度。

ReturnValue

受管的字符串。

另见