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

Marshal class

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

class Marshal

الطرق

طريقةالوصف
static AllocHGlobal(int32_t)يخصص ذاكرة غير مُدارة.
static AllocHGlobal(IntPtr)يخصص ذاكرة غير مُدارة.
static Copy(const IntPtr, container&&, int, int)ينفّذ semantics للوظيفة العامة الثابتة void Copy(IntPtr source, byte[] destination, int startIndex, int length).
static Copy(const void *, container&&, int, int)ينفّذ semantics للوظيفة العامة الثابتة void Copy(IntPtr source, byte[] destination, int startIndex, int length).
static Copy(const container&, int, void *, int)ينفّذ الوظيفة العامة الثابتة void Copy(char[] source, int startIndex, IntPtr destination, int length).
static Copy(const container&, int, IntPtr, int)ينفّذ الوظيفة العامة الثابتة 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)يكتب قيمة طويلة إلى الذاكرة.
static ZeroFreeGlobalAllocAnsi(IntPtr)يفرغ مؤشر السلسلة غير المدار الذي تم تخصيصه باستخدام طريقة SecureStringToGlobalAllocAnsi.
static ZeroFreeGlobalAllocUnicode(IntPtr)يفرغ مؤشر السلسلة غير المدار الذي تم تخصيصه باستخدام طريقة SecureStringToGlobalAllocUnicode.

انظر أيضًا