System::Runtime::InteropServices::Marshal::PtrToStringAuto 方法
Marshal::PtrToStringAuto(IntPtr) method
创建一个托管的 String,来源于未托管的零终止字符串。
static String System::Runtime::InteropServices::Marshal::PtrToStringAuto(IntPtr ptr)
| 参数 | 类型 | 描述 |
|---|---|---|
| ptr | IntPtr | 指向非托管字符串的指针。 |
ReturnValue
托管字符串。
另见
- Class String
- Class Marshal
- Namespace System::Runtime::InteropServices
- Library Aspose.Font for C++
Marshal::PtrToStringAuto(IntPtr, int) method
创建一个托管的 String,来源于未托管的字符串。
static String System::Runtime::InteropServices::Marshal::PtrToStringAuto(IntPtr ptr, int length)
| 参数 | 类型 | 描述 |
|---|---|---|
| ptr | IntPtr | 指向非托管字符串的指针。 |
| 长度 | int | 未托管字符串的长度。 |
ReturnValue
托管字符串。
另见
- Class String
- Class Marshal
- Namespace System::Runtime::InteropServices
- Library Aspose.Font for C++