الفئة System::Runtime::InteropServices::Marshal

Marshal class

يوفر تنفيذًا للمارشالينغ. للتوافق مع الشيفرة المترجمة فقط، حيث لا يتم دعم الشيفرة المُدارة على جانب C++. هذا نوع ثابت بدون خدمات مثيل. يجب ألا تقوم بإنشاء مثيلات له بأي وسيلة.

class Marshal

الطرق

طريقةالوصف
static AllocHGlobal(int32_t)يخصص ذاكرة غير مُدارة.
static AllocHGlobal(IntPtr)يخصص ذاكرة غير مُدارة.
static Copy(const IntPtr, container&&, int, int)يُنفّذ الدلالة العامة الثابتة public static void Copy(IntPtr source, byte[] destination, int startIndex, int length).
static Copy(const void *, container&&, int, int)يُنفّذ الدلالة العامة الثابتة public static void Copy(IntPtr source, byte[] destination, int startIndex, int length).
static Copy(const container&, int, void *, int)يُنفّذ الدلالة العامة الثابتة public static void Copy(char[] source, int startIndex, IntPtr destination, int length).
static Copy(const container&, int, IntPtr, int)يُنفّذ الدلالة العامة الثابتة public static void Copy(char[] source, int startIndex, IntPtr destination, int length).
static FreeHGlobal(IntPtr)يفرغ الذاكرة غير المُدارة.
static GetHRForException(const System::Exception&)يحصل على HResult من الاستثناء.
static PtrToStringAnsi(IntPtr)ينشئ كائنًا مُدارًا من نوع String من سلسلة UTF8 غير مُدارة منتهية بصفر.
static PtrToStringAnsi(IntPtr, int)ينشئ كائنًا مُدارًا من نوع String من سلسلة UTF8 غير مُدارة.
static PtrToStringAuto(IntPtr)ينشئ كائنًا مُدارًا من نوع String من سلسلة غير مُدارة منتهية بصفر.
static PtrToStringAuto(IntPtr, int)ينشئ كائنًا مُدارًا من نوع String من سلسلة غير مُدارة.
static PtrToStringUni(IntPtr)ينشئ كائنًا مُدارًا من نوع String من سلسلة Unicode غير مُدارة منتهية بصفر.
static PtrToStringUni(IntPtr, int)ينشئ كائنًا مُدارًا من نوع String من سلسلة Unicode غير مُدارة.
static PtrToStringUTF8(IntPtr)ينشئ كائنًا مُدارًا من نوع String من سلسلة UTF8 غير مُدارة منتهية بصفر.
static PtrToStringUTF8(IntPtr, int)ينشئ كائنًا مُدارًا من نوع String من سلسلة UTF8 غير مُدارة.
static ReadByte(IntPtr, int)يقرأ بايت من الذاكرة.
static ReadInt16(IntPtr, int)يقرأ short من الذاكرة.
static ReadInt32(IntPtr, int)يقرأ int من الذاكرة.
static SecureStringToGlobalAllocAnsi(const SharedPtr<Security::SecureString>&)ينسخ محتويات السلسلة الآمنة المحددة إلى الذاكرة غير المدارة، مع التحويل إلى تنسيق ANSI.
static SecureStringToGlobalAllocUnicode(const SharedPtr<Security::SecureString>&)ينسخ محتويات السلسلة الآمنة المحددة إلى الذاكرة غير المدارة.
static StringToHGlobalAnsi(const String&)ينسخ محتويات سلسلة محددة إلى الذاكرة غير المدارة.
static StringToHGlobalAuto(const String&)ينسخ محتويات سلسلة محددة إلى الذاكرة غير المدارة، مع التحويل إلى تنسيق ANSI إذا لزم الأمر.
static StringToHGlobalUni(const String&)ينسخ محتويات سلسلة محددة إلى الذاكرة غير المدارة.
static WriteByte(IntPtr, int, uint8_t)يكتب بايت إلى الذاكرة.
static WriteByte(IntPtr, uint8_t)يكتب بايت إلى الذاكرة.
static WriteInt16(IntPtr, int, int16_t)يكتب short إلى الذاكرة.
static WriteInt32(IntPtr, int, int32_t)يكتب int إلى الذاكرة.
static WriteInt64(IntPtr, int, int64_t)يكتب long إلى الذاكرة.
static ZeroFreeGlobalAllocAnsi(IntPtr)يفرغ مؤشر السلسلة غير المدارة الذي تم تخصيصه باستخدام طريقة SecureStringToGlobalAllocAnsi.
static ZeroFreeGlobalAllocUnicode(IntPtr)يفرغ مؤشر السلسلة غير المدارة الذي تم تخصيصه باستخدام طريقة SecureStringToGlobalAllocUnicode.

انظر أيضًا