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