In The Hand LtdIn The Hand
MarshalHelper Class
NamespacesInTheHand.Runtime.InteropServicesMarshalHelper
.NET Components for Mobility
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.

GetNativeVariantForObject(Object, IntPtr)
Converts an object to a COM VARIANT.

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.

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.

StringToHGlobalAnsi(String)
Copies the contents of a managed String into unmanaged memory, converting into ANSI format as it copies.

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 (Module: InTheHand) Version: 7.0.0.0