You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
976 B
29 lines
976 B
|
|
#pragma once
|
|
|
|
//
|
|
// Define result codes.
|
|
//
|
|
#define SUCCESS 0
|
|
#define FAILURE 1
|
|
|
|
//
|
|
// Define helper macro to deal with subtleties of NT-level programming.
|
|
//
|
|
#define INIT_OBJA(Obja,UnicodeString,UnicodeText) \
|
|
\
|
|
RtlInitUnicodeString((UnicodeString),(UnicodeText)); \
|
|
\
|
|
InitializeObjectAttributes( \
|
|
(Obja), \
|
|
(UnicodeString), \
|
|
OBJ_CASE_INSENSITIVE, \
|
|
NULL, \
|
|
NULL \
|
|
)
|
|
|
|
//
|
|
// Memory routines
|
|
//
|
|
#define MALLOC(size) RtlAllocateHeap(RtlProcessHeap(),0,(size))
|
|
#define FREE(block) RtlFreeHeap(RtlProcessHeap(),0,(block))
|