In The Hand - .NET Components for Mobility
MarshalHelper Class
NamespacesInTheHand.Runtime.InteropServicesMarshalHelper
Provides a collection of methods for allocating unmanaged memory, copying unmanaged memory blocks, and converting managed to unmanaged types, as well as other miscellaneous methods used when interacting with unmanaged code.
Declaration Syntax
C#Visual Basic
public static class MarshalHelper
Public NotInheritable Class MarshalHelper
Members
All MembersMethods



IconMemberDescription
AllocHGlobal(Int32)
Allocates memory from the unmanaged memory of the process using LocalAlloc.

GetObjectForNativeVariant(IntPtr)
Converts a COM VARIANT to an object.

GetObjectsForNativeVariants(IntPtr, Int32)
Converts an array of COM VARIANTs to an array of objects.

GetTypedObjectForIUnknown(IntPtr, Type)
Returns an instance of a type that represents a COM object by a pointer to its IUnknown interface.

QueryInterface(IntPtr, Guid%, IntPtr%)
Requests a pointer to a specified interface from a COM object.

ReadIntPtr(IntPtr, Int32)
Reads a processor native sized integer from unmanaged memory.

ReleaseComObject(Object)
Decrements the reference count of the supplied runtime callable wrapper.

StringToHGlobalUni(String)
Copies the contents of a managed String into unmanaged memory.

WriteIntPtr(IntPtr, Int32, IntPtr)
Writes a processor native sized integer value to unmanaged memory.

Inheritance Hierarchy
Object
MarshalHelper

Assembly: InTheHand.WindowsMobile (Module: InTheHand.WindowsMobile) Version: 3.2.0.0