Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

memory_t.h File Reference

Go to the source code of this file.

Defines

#define uint8   UCHAR
#define int8   CHAR
#define uint16   USHORT
#define int16   SHORT
#define uint32   ULONG
#define int32   LONG
#define uint64   ULONGLONG
#define int64   LONGLONG
#define LONG_AT(base, offset)   (*(int32*)((uint8*)base+(uint32)offset))
#define ULONG_AT(base, offset)   (*(uint32*)((uint8*)base+(uint32)offset))
#define SHORT_AT(base, offset)   (*(int16*)((uint8*)base+(uint32)offset))
#define USHORT_AT(base, offset)   (*(uint16*)((uint8*)base+(uint32)offset))
#define ALLOCATE_MEMORY(dest, type, amount)   (dest)=(type*)GlobalAlloc(GPTR, sizeof(type)*(amount));
#define ALLOCATE_ZERO_MEMORY(dest, type, amount)   (dest)=(type*)GlobalAlloc(GPTR, sizeof(type)*(amount));
#define FREE_MEMORY(dest)   GlobalFree(dest);
#define ZERO_MEMORY(dest, amount)   RtlZeroMemory(dest,amount);
#define COPY_MEMORY(dest, src, amount)   RtlCopyMemory(dest,src,amount);

Typedefs

typedef __MEM_TYPE MEM_TYPE
typedef __MEM_TYPEPMEM_TYPE

Functions

__inline int32 SW_LONG_AT (void *b, uint32 c)
__inline uint32 SW_ULONG_AT (void *b, uint32 c)
__inline int16 SW_SHORT_AT (void *b, uint32 os)
__inline uint16 SW_USHORT_AT (void *b, uint32 os)
__inline VOID SW_ULONG_ASSIGN (void *dst, uint32 src)


Define Documentation

#define ALLOCATE_MEMORY dest,
type,
amount   )     (dest)=(type*)GlobalAlloc(GPTR, sizeof(type)*(amount));
 

Definition at line 117 of file memory_t.h.

#define ALLOCATE_ZERO_MEMORY dest,
type,
amount   )     (dest)=(type*)GlobalAlloc(GPTR, sizeof(type)*(amount));
 

Definition at line 119 of file memory_t.h.

#define COPY_MEMORY dest,
src,
amount   )     RtlCopyMemory(dest,src,amount);
 

Definition at line 124 of file memory_t.h.

#define FREE_MEMORY dest   )     GlobalFree(dest);
 

Definition at line 122 of file memory_t.h.

#define int16   SHORT
 

Definition at line 39 of file memory_t.h.

Referenced by SW_SHORT_AT().

#define int32   LONG
 

Definition at line 41 of file memory_t.h.

Referenced by SW_LONG_AT().

#define int64   LONGLONG
 

Definition at line 43 of file memory_t.h.

#define int8   CHAR
 

Definition at line 37 of file memory_t.h.

#define LONG_AT base,
offset   )     (*(int32*)((uint8*)base+(uint32)offset))
 

Definition at line 52 of file memory_t.h.

#define SHORT_AT base,
offset   )     (*(int16*)((uint8*)base+(uint32)offset))
 

Definition at line 56 of file memory_t.h.

#define uint16   USHORT
 

Definition at line 38 of file memory_t.h.

Referenced by SW_USHORT_AT().

#define uint32   ULONG
 

Definition at line 40 of file memory_t.h.

Referenced by SW_ULONG_AT().

#define uint64   ULONGLONG
 

Definition at line 42 of file memory_t.h.

#define uint8   UCHAR
 

Definition at line 36 of file memory_t.h.

Referenced by SW_LONG_AT(), SW_SHORT_AT(), SW_ULONG_ASSIGN(), SW_ULONG_AT(), and SW_USHORT_AT().

#define ULONG_AT base,
offset   )     (*(uint32*)((uint8*)base+(uint32)offset))
 

Definition at line 54 of file memory_t.h.

#define USHORT_AT base,
offset   )     (*(uint16*)((uint8*)base+(uint32)offset))
 

Definition at line 58 of file memory_t.h.

#define ZERO_MEMORY dest,
amount   )     RtlZeroMemory(dest,amount);
 

Definition at line 123 of file memory_t.h.


Typedef Documentation

typedef struct __MEM_TYPE MEM_TYPE
 

typedef struct __MEM_TYPE * PMEM_TYPE
 


Function Documentation

__inline int32 SW_LONG_AT void *  b,
uint32  c
 

Definition at line 60 of file memory_t.h.

References int32, and uint8.

__inline int16 SW_SHORT_AT void *  b,
uint32  os
 

Definition at line 77 of file memory_t.h.

References int16, and uint8.

__inline VOID SW_ULONG_ASSIGN void *  dst,
uint32  src
 

Definition at line 91 of file memory_t.h.

References uint8.

__inline uint32 SW_ULONG_AT void *  b,
uint32  c
 

Definition at line 69 of file memory_t.h.

References uint32, and uint8.

__inline uint16 SW_USHORT_AT void *  b,
uint32  os
 

Definition at line 84 of file memory_t.h.

References uint16, and uint8.


Generated on Sun May 14 14:51:29 2006 by  doxygen 1.4.2