wHiteRabbiT-sTudio Framework
wHiteRabbiT.Common.Wacom.CMemUtils Class Reference

Provide utility methods for unmanaged memory management. More...

Static Public Member Functions

static IntPtr AllocUnmanagedBuf (Object val_I)
 Allocates a pointer to unmanaged heap memory of sizeof(val_I). More...
 
static IntPtr AllocUnmanagedBuf (int size_I)
 Allocates a pointer to unmanaged heap memory of given size. More...
 
static T MarshalUnmanagedBuf< T > (IntPtr buf_I, int size)
 Marshals specified buf to the specified type. More...
 
static void FreeUnmanagedBuf (IntPtr buf_I)
 Free unmanaged memory pointed to by buf_I. More...
 
static string MarshalUnmanagedString (IntPtr buf_I, int size_I)
 Marshals a string from an unmanaged buffer. More...
 
static WintabPacket[] MarshalDataPackets (UInt32 numPkts_I, IntPtr buf_I)
 Marshal unmanaged data packets into managed WintabPacket data. More...
 
static WintabPacketExt[] MarshalDataExtPackets (UInt32 numPkts_I, IntPtr buf_I)
 Marshal unmanaged Extension data packets into managed WintabPacketExt data. More...
 

Detailed Description

Provide utility methods for unmanaged memory management.

Member Function Documentation

static IntPtr wHiteRabbiT.Common.Wacom.CMemUtils.AllocUnmanagedBuf ( Object  val_I)
static

Allocates a pointer to unmanaged heap memory of sizeof(val_I).

Parameters
val_Imanaged object that determines #bytes of unmanaged buf
Returns
Unmanaged buffer pointer.
static IntPtr wHiteRabbiT.Common.Wacom.CMemUtils.AllocUnmanagedBuf ( int  size_I)
static

Allocates a pointer to unmanaged heap memory of given size.

Parameters
size_Inumber of bytes to allocate
Returns
Unmanaged buffer pointer.
static void wHiteRabbiT.Common.Wacom.CMemUtils.FreeUnmanagedBuf ( IntPtr  buf_I)
static

Free unmanaged memory pointed to by buf_I.

Parameters
buf_Ipointer to unmanaged heap memory
static WintabPacketExt [] wHiteRabbiT.Common.Wacom.CMemUtils.MarshalDataExtPackets ( UInt32  numPkts_I,
IntPtr  buf_I 
)
static

Marshal unmanaged Extension data packets into managed WintabPacketExt data.

Parameters
numPkts_Inumber of packets to marshal
buf_Ipointer to unmanaged heap memory containing data packets
Returns
static WintabPacket [] wHiteRabbiT.Common.Wacom.CMemUtils.MarshalDataPackets ( UInt32  numPkts_I,
IntPtr  buf_I 
)
static

Marshal unmanaged data packets into managed WintabPacket data.

Parameters
numPkts_Inumber of packets to marshal
buf_Ipointer to unmanaged heap memory containing data packets
Returns
static T wHiteRabbiT.Common.Wacom.CMemUtils.MarshalUnmanagedBuf< T > ( IntPtr  buf_I,
int  size 
)
static

Marshals specified buf to the specified type.

Template Parameters
Ttype to which buf_I is marshalled
Parameters
buf_Iunmanaged heap pointer
sizeexpected size of buf_I
Returns
Managed object of specified type.
static string wHiteRabbiT.Common.Wacom.CMemUtils.MarshalUnmanagedString ( IntPtr  buf_I,
int  size_I 
)
static

Marshals a string from an unmanaged buffer.

Parameters
buf_Ipointer to unmanaged heap memory
size_Isize of ASCII string, includes null termination
Returns

The documentation for this class was generated from the following file: