Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Marshal Methods

  Name Description
Public method Static Supported by the .NET Compact Framework AddRef Increments the reference count on the specified interface.
Public method Static Supported by the .NET Compact Framework AllocCoTaskMem Allocates a block of memory of specified size from the COM task memory allocator.
Public method Static Supported by the .NET Compact Framework AllocHGlobal Overloaded. Allocates a block of memory using LocalAlloc.
Public method Static BindToMoniker Gets an interface pointer identified by the specified moniker.
Public method Static ChangeWrapperHandleStrength Changes the strength of a COM callable wrapper's (CCW) handle on the object it contains.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework Copy Overloaded. Copies data from a managed array to an unmanaged memory pointer, or from an unmanaged memory pointer to a managed array.
Public method Static CreateAggregatedObject Aggregates a managed object with the specified COM object.
Public method Static CreateWrapperOfType Wraps the specified COM object in an object of the specified type.
Public method Static DestroyStructure Frees all substructures pointed to by the specified unmanaged memory block.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method Static Supported by the .NET Compact Framework FinalReleaseComObject Releases all references to a runtime callable wrapper (RCW) by setting the reference count of the supplied RCW to 0.
Public method Static Supported by the .NET Compact Framework FreeBSTR Frees a BSTR using SysFreeString.
Public method Static Supported by the .NET Compact Framework FreeCoTaskMem Frees a block of memory allocated by the unmanaged COM task memory allocator with Marshal.AllocCoTaskMem.
Public method Static Supported by the .NET Compact Framework FreeHGlobal Frees memory previously allocated from the unmanaged memory of the process with AllocHGlobal.
Public method Static GenerateGuidForType Returns the globally unique identifier (GUID) for the specified type, or generates a GUID using the algorithm used by the Type Library Exporter (Tlbexp.exe).
Public method Static GenerateProgIdForType Returns a programmatic identifier (ProgID) for the specified type.
Public method Static GetActiveObject Obtains a running instance of the specified object from the Running Object Table (ROT).
Public method Static Supported by the .NET Compact Framework GetComInterfaceForObject Returns an interface pointer that represents the specified interface for an object.
Public method Static GetComInterfaceForObjectInContext Returns an interface pointer that represents the specified interface for an object, if the caller is in the same context as that object.
Public method Static GetComObjectData Gets data referenced by the specified key from the specified COM object.
Public method Static GetComSlotForMethodInfo Gets the virtual function table (VTBL) slot for a specified System.Reflection.MemberInfo when exposed to COM.
Public method Static GetDelegateForFunctionPointer Converts an unmanaged function pointer to a delegate.
Public method Static GetEndComSlot Gets the last slot in the virtual function table (VTBL) of a type when exposed to COM.
Public method Static GetExceptionCode Retrieves a code that identifies the type of the exception that occurred.
Public method Static Supported by the .NET Compact Framework GetExceptionForHR Overloaded. Converts an HRESULT error code to a corresponding Exception object.
Public method Static GetExceptionPointers Retrieves a computer-independent description of an exception, and information about the state that existed for the thread when the exception occurred.
Public method Static Supported by the .NET Compact Framework GetFunctionPointerForDelegate Converts a delegate into a function pointer callable from unmanaged code.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method Static GetHINSTANCE Returns the instance handle (HINSTANCE) for the specified module.
Public method Static Supported by the .NET Compact Framework GetHRForException Converts the specified exception to an HRESULT.
Public method Static GetHRForLastWin32Error Returns the HRESULT corresponding to the last error incurred by Win32 code executed using Marshal.
Public method Static Supported by the .NET Compact Framework GetIDispatchForObject Returns an IDispatch interface from a managed object.
Public method Static GetIDispatchForObjectInContext Returns an IDispatch interface pointer from a managed object, if the caller is in the same context as that object.
Public method Static GetITypeInfoForType Returns an ITypeInfo interface from a managed type.
Public method Static Supported by the .NET Compact Framework GetIUnknownForObject Returns an IUnknown interface from a managed object.
Public method Static GetIUnknownForObjectInContext Returns an IUnknown interface from a managed object, if the caller is in the same context as that object.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework GetLastWin32Error Returns the error code returned by the last unmanaged function called using platform invoke that has the DllImportAttribute.SetLastError flag set.
Public method Static GetManagedThunkForUnmanagedMethodPtr Gets a pointer to a thunk that marshals a call from managed to unmanaged code.
Public method Static GetMethodInfoForComSlot Retrieves MethodInfo for the specified virtual function table (VTBL) slot.
Public method Static Supported by the .NET Compact Framework GetNativeVariantForObject Converts an object to a COM VARIANT.
Public method Static Supported by the .NET Compact Framework GetObjectForIUnknown Returns an instance of a type that represents a COM object by a pointer to its IUnknown interface.
Public method Static Supported by the .NET Compact Framework GetObjectForNativeVariant Converts a COM VARIANT to an object.
Public method Static GetObjectsForNativeVariants Converts an array of COM VARIANTs to an array of objects.
Public method Static GetStartComSlot Gets the first slot in the virtual function table (VTBL) that contains user defined methods.
Public method Static GetThreadFromFiberCookie Converts a fiber cookie into the corresponding System.Threading.Thread instance.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework GetType  Gets the Type of the current instance. (inherited from Object)
Public method Static Supported by the .NET Compact Framework GetTypedObjectForIUnknown Returns a managed object of a specified type that represents a COM object.
Public method Static GetTypeForITypeInfo Converts an ITypeInfo into a managed Type object.
Public method Static GetTypeInfoName Overloaded. Retrieves the name of the type represented by an ITypeInfo.
Public method Static GetTypeLibGuid Overloaded. Retrieves the library identifier (LIBID) of a type library.
Public method Static GetTypeLibGuidForAssembly Retrieves the library identifier (LIBID) that is assigned to a type library when it was exported from the specified assembly.
Public method Static GetTypeLibLcid Overloaded. Retrieves the LCID of a type library.
Public method Static GetTypeLibName Overloaded. Retrieves the name of a type library.
Public method Static GetTypeLibVersionForAssembly Retrieves the version number of a type library that will be exported from the specified assembly.
Public method Static GetUniqueObjectForIUnknown Creates a unique runtime callable wrapper (RCW) object for a given IUnknown.
Public method Static GetUnmanagedThunkForManagedMethodPtr Gets a pointer to a thunk that marshals a call from unmanaged to managed code.
Public method Static Supported by the .NET Compact Framework IsComObject Indicates whether a specified object represents a COM object.
Public method Static Supported by the .NET Compact Framework IsTypeVisibleFromCom Indicates whether a type is visible to COM clients.
Public method Static NumParamBytes Calculates the number of bytes in unmanaged memory that are required to hold the parameters for the specified method.
Public method Static OffsetOf Returns the field offset of the unmanaged form of the managed class.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework Prelink Executes one-time method setup tasks without calling the method.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework PrelinkAll Performs a pre-link check for all methods on a class.
Public method Static PtrToStringAnsi Overloaded. Allocates a managed String and copies all or part of an unmanaged ANSI string into it.
Public method Static PtrToStringAuto Overloaded. Allocates a managed String and copies a specified number of characters from an unmanaged string into it.
Public method Static Supported by the .NET Compact Framework PtrToStringBSTR Allocates a managed String and copies a BSTR string stored in unmanaged memory into it.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework PtrToStringUni Overloaded. Allocates a managed String and copies a specified number of characters from an unmanaged Unicode string into it.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework PtrToStructure Overloaded. Marshals data from an unmanaged block of memory to a managed object.
Public method Static Supported by the .NET Compact Framework QueryInterface Requests a pointer to a specified interface from a COM object.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework ReadByte Overloaded. Reads a single byte from an unmanaged pointer.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework ReadInt16 Overloaded. Reads a 16-bit signed integer from unmanaged memory.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework ReadInt32 Overloaded. Reads a 32-bit signed integer from unmanaged memory.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework ReadInt64 Overloaded. Reads a 64-bit signed integer from unmanaged memory.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework ReadIntPtr Overloaded. Reads a processor native sized integer from unmanaged memory.
Public method Static Supported by the .NET Compact Framework ReAllocCoTaskMem Resizes a block of memory previously allocated with AllocCoTaskMem.
Public method Static Supported by the .NET Compact Framework ReAllocHGlobal Resizes a block of memory previously allocated with AllocHGlobal.
Public method Static Supported by the .NET Compact Framework ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method Static Supported by the .NET Compact Framework Release Decrements the reference count on the specified interface.
Public method Static Supported by the .NET Compact Framework ReleaseComObject Decrements the reference count of the supplied runtime callable wrapper.
Public method Static ReleaseThreadCache Releases the thread cache.
Public method Static SecureStringToBSTR Allocates a BSTR and copies the contents of a managed SecureString object into it.
Public method Static SecureStringToCoTaskMemAnsi Copies the contents of a managed SecureString object to a block of memory allocated from the unmanaged COM task allocator.
Public method Static SecureStringToCoTaskMemUnicode Copies the contents of a managed SecureString object to a block of memory allocated from the unmanaged COM task allocator.
Public method Static SecureStringToGlobalAllocAnsi Copies the contents of a managed SecureString into unmanaged memory, converting into ANSI format as it copies.
Public method Static SecureStringToGlobalAllocUnicode Copies the contents of a managed SecureString into unmanaged memory.
Public method Static SetComObjectData Sets data referenced by the specified key in the specified COM object.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework SizeOf Overloaded. Returns the unmanaged size, in bytes, of a class using Marshal.
Public method Static Supported by the .NET Compact Framework StringToBSTR Allocates a BSTR and copies the contents of a managed String into it.
Public method Static StringToCoTaskMemAnsi Copies the contents of a managed String to a block of memory allocated from the unmanaged COM task allocator.
Public method Static StringToCoTaskMemAuto Copies the contents of a managed String to a block of memory allocated from the unmanaged COM task allocator.
Public method Static StringToCoTaskMemUni Copies the contents of a managed String to a block of memory allocated from the unmanaged COM task allocator.
Public method Static StringToHGlobalAnsi Copies the contents of a managed String into unmanaged memory, converting into ANSI format as it copies.
Public method Static StringToHGlobalAuto Copies the contents of a managed String into unmanaged memory, converting into ANSI format if required.
Public method Static StringToHGlobalUni Copies the contents of a managed String into unmanaged memory.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework StructureToPtr Marshals data from a managed object to an unmanaged block of memory.
Public method Static Supported by the .NET Compact Framework ThrowExceptionForHR Overloaded. Throws an exception with a specific failure HRESULT value.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToString  Returns a String that represents the current Object. (inherited from Object)
Public method Static UnsafeAddrOfPinnedArrayElement Gets the address of the element at the specified index inside the specified array.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework WriteByte Overloaded. Writes a single byte value to unmanaged memory.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework WriteInt16 Overloaded. Writes a 16-bit signed integer value to unmanaged memory.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework WriteInt32 Overloaded. Writes a 32-bit signed integer value to unmanaged memory.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework WriteInt64 Overloaded. Writes a 64-bit signed integer value to unmanaged memory.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework WriteIntPtr Overloaded. Writes a processor native sized integer value to unmanaged memory.
Public method Static ZeroFreeBSTR Frees a BSTR pointer that was allocated using the SecureStringToBSTR method.
Public method Static ZeroFreeCoTaskMemAnsi Frees an unmanaged string pointer that was allocated using the SecureStringToCoTaskMemAnsi method.
Public method Static ZeroFreeCoTaskMemUnicode Frees an unmanaged string pointer that was allocated using the SecureStringToCoTaskMemUnicode method.
Public method Static ZeroFreeGlobalAllocAnsi Frees an unmanaged string pointer that was allocated using the SecureStringToGlobalAllocAnsi method.
Public method Static ZeroFreeGlobalAllocUnicode Frees an unmanaged string pointer that was allocated using the SecureStringToCoTaskMemUnicode method.
Top
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.