Export (0) Print
Expand All

Marshal Methods

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

The Marshal type exposes the following members.

  Name Description
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(Byte[], Int32, IntPtr, Int32) Security Critical. Copies data from a one-dimensional, managed 8-bit unsigned integer array to an unmanaged memory pointer.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(Char[], Int32, IntPtr, Int32) Security Critical. Copies data from a one-dimensional, managed character array to an unmanaged memory pointer.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(Double[], Int32, IntPtr, Int32) Security Critical. Copies data from a one-dimensional, managed double-precision floating-point number array to an unmanaged memory pointer.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(Int16[], Int32, IntPtr, Int32) Security Critical. Copies data from a one-dimensional, managed 16-bit signed integer array to an unmanaged memory pointer.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(Int32[], Int32, IntPtr, Int32) Security Critical. Copies data from a one-dimensional, managed 32-bit signed integer array to an unmanaged memory pointer.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(Int64[], Int32, IntPtr, Int32) Security Critical. Copies data from a one-dimensional, managed 64-bit signed integer array to an unmanaged memory pointer.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(IntPtr, Byte[], Int32, Int32) Security Critical. Copies data from an unmanaged memory pointer to a managed 8-bit unsigned integer array.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(IntPtr, Char[], Int32, Int32) Security Critical. Copies data from an unmanaged memory pointer to a managed character array.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(IntPtr, Double[], Int32, Int32) Security Critical. Copies data from an unmanaged memory pointer to a managed double-precision floating-point number array.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(IntPtr, Int16[], Int32, Int32) Security Critical. Copies data from an unmanaged memory pointer to a managed 16-bit signed integer array.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(IntPtr, Int32[], Int32, Int32) Security Critical. Copies data from an unmanaged memory pointer to a managed 32-bit signed integer array.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(IntPtr, Int64[], Int32, Int32) Security Critical. Copies data from an unmanaged memory pointer to a managed 64-bit signed integer array.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(IntPtr, Single[], Int32, Int32) Security Critical. Copies data from an unmanaged memory pointer to a managed single-precision floating-point number array.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Copy(Single[], Int32, IntPtr, Int32) Security Critical. Copies data from a one-dimensional, managed single-precision floating-point number array to an unmanaged memory pointer.
Public method Static member GetDelegateForFunctionPointer Security Critical. Converts an unmanaged function pointer to a delegate.
Public method Static member Supported by Silverlight for Windows Phone GetExceptionForHR Security Critical. Converts the specified HRESULT error code to a corresponding Exception object.
Public method Static member Supported by Silverlight for Windows Phone GetFunctionPointerForDelegate Security Critical. Converts a delegate into a function pointer callable from unmanaged code.
Public method Static member Supported by Silverlight for Windows Phone GetHRForException Security Critical. Converts the specified exception to an HRESULT.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 GetLastWin32Error Security Critical. Returns the error code returned by the last unmanaged function called using platform invoke that has the DllImportAttribute.SetLastError flag set.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 Prelink Security Critical. Executes one-time method setup tasks without calling the method.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 PrelinkAll Security Critical. Performs a pre-link check for all methods on a class.
Public method Static member PtrToStringAnsi(IntPtr) Security Critical. Copies all characters up to the first null from an unmanaged ANSI string to a managed String. Widens each ANSI character to Unicode.
Public method Static member PtrToStringAnsi(IntPtr, Int32) Security Critical. Allocates a managed String, copies a specified number of characters from an unmanaged ANSI string into it, and widens each ANSI character to Unicode.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 PtrToStringUni(IntPtr) Security Critical. Allocates a managed String and copies all characters up to the first null character from an unmanaged Unicode string into it.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 PtrToStringUni(IntPtr, Int32) Security Critical. Copies a specified number of characters from a Unicode string stored in native heap to a managed String.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 PtrToStructure(IntPtr, Object) Security Critical. Marshals data from an unmanaged block of memory to a managed object.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 PtrToStructure(IntPtr, Type) Security Critical. Marshals data from an unmanaged block of memory to a newly allocated managed object of the specified type.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 ReadByte(IntPtr) Security Critical. Reads a single byte from an unmanaged pointer.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 ReadByte(IntPtr, Int32) Security Critical. Reads a single byte at a given offset (or index) from an unmanaged pointer.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 ReadInt16(IntPtr) Security Critical. Reads a 16-bit signed integer from the unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 ReadInt16(IntPtr, Int32) Security Critical. Reads a 16-bit signed integer from unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 ReadInt32(IntPtr) Security Critical. Reads a 32-bit signed integer from unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 ReadInt32(IntPtr, Int32) Security Critical. Reads a 32-bit signed integer from unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 ReadInt64(IntPtr) Security Critical. Reads a 64-bit signed integer from unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 ReadInt64(IntPtr, Int32) Security Critical. Reads a 64-bit signed integer from unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 ReadIntPtr Security Critical. Reads a processor native sized integer from unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 SizeOf(Object) Returns the unmanaged size of an object in bytes.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 SizeOf(Type) Returns the size of an unmanaged type in bytes.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 StructureToPtr Security Critical. Marshals data from a managed object to an unmanaged block of memory.
Public method Static member Supported by Silverlight for Windows Phone ThrowExceptionForHR(Int32) Security Critical. Throws an exception with a specific failure HRESULT value.
Public method Static member Supported by Silverlight for Windows Phone ThrowExceptionForHR(Int32, IntPtr) Security Critical. Throws an exception with a specific failure HRESULT.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 WriteByte(IntPtr, Byte) Security Critical. Writes a single byte value to unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 WriteByte(IntPtr, Int32, Byte) Security Critical. Writes a single byte value to unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 WriteInt16(IntPtr, Int16) Security Critical. Writes a 16-bit integer value to unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 WriteInt16(IntPtr, Int32, Int16) Security Critical. Writes a 16-bit signed integer value into unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 WriteInt32(IntPtr, Int32) Security Critical. Writes a 32-bit signed integer value to unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 WriteInt32(IntPtr, Int32, Int32) Security Critical. Writes a 32-bit signed integer value into unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 WriteInt64(IntPtr, Int64) Security Critical. Writes a 64-bit signed integer value to unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 WriteInt64(IntPtr, Int32, Int64) Security Critical. Writes a 64-bit signed integer value to unmanaged memory.
Public method Static member Supported by Silverlight for Windows Phone Supported by Xbox 360 WriteIntPtr Security Critical. Writes a processor native sized integer value into unmanaged memory.
Top

Community Additions

ADD
Show:
© 2014 Microsoft