Main Page   Data Structures   File List   Data Fields   Globals  

ds_common.h File Reference

#include <windows.h>

Go to the source code of this file.

Defines

#define WIN32_LEAN_AND_MEAN
#define VC_EXTRALEAN
#define true   TRUE
#define false   FALSE
#define MemAlloc(sz)   HeapAlloc(GetProcessHeap(), 0, sz)
#define MemFree(ptr)   HeapFree(GetProcessHeap(), 0, ptr)
#define MemReAlloc(ptr, sz)   HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ptr, sz)

Typedefs

typedef BOOL bool


Define Documentation

#define MemAlloc sz      HeapAlloc(GetProcessHeap(), 0, sz)
 

Allocate memory.

Parameters:
sz   Number of bytes to allocate.
Returns:
A pointer to the allocated memory, if successful. Otherwise NULL.

#define MemFree ptr      HeapFree(GetProcessHeap(), 0, ptr)
 

Free memory.

Parameters:
ptr   Pointer to free.

#define MemReAlloc ptr,
sz      HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ptr, sz)
 

Resize a block of memory.

Parameters:
ptr   Pointer to memory block to resize.
sz   New size in bytes.
Returns:
A pointer to the resized memory block, if successful. Otherwise NULL.
Remarks:
This may not return the same pointer as was passed in through ptr - available memory at that location may be limited.

#define VC_EXTRALEAN
 

Shouldn't be used anywhere, but sometimes excludes extra stuff.

#define WIN32_LEAN_AND_MEAN
 

Exclude rarely-used stuff from Windows headers to speed compilation.

#define false   FALSE
 

False value.

#define true   TRUE
 

True value.


Typedef Documentation

typedef BOOL bool
 

As a replacement for C++'s intrinsic bool type.


Generated at Sun Sep 30 00:21:33 2001 for DSLib by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001