ReactOS  0.4.14-dev-57-g333b8f1
base_x.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ConvertAnsiToUnicodePrologue
 
#define ConvertAnsiToUnicodeBody(name)
 
#define ConvertAnsiToUnicodeEpilogue
 
#define ConvertWin32AnsiObjectApiToUnicodeApi(obj, name, ...)
 
#define ConvertWin32AnsiObjectApiToUnicodeApi2(obj, name, ...)
 
#define ConvertWin32AnsiChangeApiToUnicodeApi(obj, name, ...)
 
#define ConvertOpenWin32AnsiObjectApiToUnicodeApi(obj, acc, inh, name)
 
#define CreateNtObjectFromWin32ApiPrologue
 
#define CreateNtObjectFromWin32ApiBody(ntobj, sec, name, access, ...)
 
#define CreateNtObjectFromWin32ApiEpilogue
 
#define CreateNtObjectFromWin32Api(obj, ntobj, access, sec, name, ...)
 
#define OpenNtObjectFromWin32Api(ntobj, acc, inh, name)
 

Macro Definition Documentation

◆ ConvertAnsiToUnicodeBody

#define ConvertAnsiToUnicodeBody (   name)
Value:
UnicodeCache = &NtCurrentTeb()->StaticUnicodeString; \
RtlInitAnsiString(&AnsiName, name); \
Status = RtlAnsiStringToUnicodeString(UnicodeCache, &AnsiName, FALSE);
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
Definition: name.c:36

Definition at line 38 of file base_x.h.

◆ ConvertAnsiToUnicodeEpilogue

#define ConvertAnsiToUnicodeEpilogue
Value:
return FALSE; \
}
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:166
Status
Definition: gdiplustypes.h:24
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:61
#define ERROR_FILENAME_EXCED_RANGE
Definition: winerror.h:263

Definition at line 42 of file base_x.h.

◆ ConvertAnsiToUnicodePrologue

#define ConvertAnsiToUnicodePrologue
Value:
{ \
NTSTATUS Status; \
PUNICODE_STRING UnicodeCache; \
ANSI_STRING AnsiName;
Status
Definition: gdiplustypes.h:24

Definition at line 33 of file base_x.h.

◆ ConvertOpenWin32AnsiObjectApiToUnicodeApi

#define ConvertOpenWin32AnsiObjectApiToUnicodeApi (   obj,
  acc,
  inh,
  name 
)
Value:
if (!name) \
{ \
SetLastError(ERROR_INVALID_PARAMETER); \
return NULL; \
} \
ConvertAnsiToUnicodeBody(name) \
if (NT_SUCCESS(Status)) return Open##obj##W(acc, inh, UnicodeCache->Buffer);\
ConvertAnsiToUnicodeEpilogue
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define Open
Definition: syshdrs.h:62
smooth NULL
Definition: ftsmooth.c:416
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
struct W W
Status
Definition: gdiplustypes.h:24
Definition: name.c:36

Definition at line 86 of file base_x.h.

◆ ConvertWin32AnsiChangeApiToUnicodeApi

#define ConvertWin32AnsiChangeApiToUnicodeApi (   obj,
  name,
  ... 
)
Value:
if (NT_SUCCESS(Status)) return obj##W(UnicodeCache->Buffer, ##__VA_ARGS__); \
ConvertAnsiToUnicodeEpilogue
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
struct W W
Status
Definition: gdiplustypes.h:24
#define ConvertAnsiToUnicodeBody(name)
Definition: base_x.h:38
Definition: name.c:36

Definition at line 76 of file base_x.h.

◆ ConvertWin32AnsiObjectApiToUnicodeApi

#define ConvertWin32AnsiObjectApiToUnicodeApi (   obj,
  name,
  ... 
)
Value:
if (!name) return Create##obj##W(__VA_ARGS__, NULL); \
ConvertAnsiToUnicodeBody(name) \
if (NT_SUCCESS(Status)) return Create##obj##W(__VA_ARGS__, UnicodeCache->Buffer); \
ConvertAnsiToUnicodeEpilogue
_In_ BOOLEAN Create
Definition: pstypes.h:511
smooth NULL
Definition: ftsmooth.c:416
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
struct W W
Status
Definition: gdiplustypes.h:24
Definition: name.c:36

Definition at line 54 of file base_x.h.

◆ ConvertWin32AnsiObjectApiToUnicodeApi2

#define ConvertWin32AnsiObjectApiToUnicodeApi2 (   obj,
  name,
  ... 
)
Value:
if (!name) return Create##obj##W(NULL, __VA_ARGS__); \
ConvertAnsiToUnicodeBody(name) \
if (NT_SUCCESS(Status)) return Create##obj##W(UnicodeCache->Buffer, __VA_ARGS__); \
ConvertAnsiToUnicodeEpilogue
_In_ BOOLEAN Create
Definition: pstypes.h:511
smooth NULL
Definition: ftsmooth.c:416
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
struct W W
Status
Definition: gdiplustypes.h:24
Definition: name.c:36

Definition at line 65 of file base_x.h.

◆ CreateNtObjectFromWin32Api

#define CreateNtObjectFromWin32Api (   obj,
  ntobj,
  access,
  sec,
  name,
  ... 
)
Value:
CreateNtObjectFromWin32ApiBody(ntobj, sec, name, access, ##__VA_ARGS__); \
CreateNtObjectFromWin32ApiEpilogue
#define CreateNtObjectFromWin32ApiBody(ntobj, sec, name, access,...)
Definition: base_x.h:112
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
Definition: name.c:36

Definition at line 135 of file base_x.h.

◆ CreateNtObjectFromWin32ApiBody

#define CreateNtObjectFromWin32ApiBody (   ntobj,
  sec,
  name,
  access,
  ... 
)
Value:
ObjectAttributes = BaseFormatObjectAttributes(&LocalAttributes, \
sec, \
name ? &ObjectName : NULL); \
Status = NtCreate##ntobj(&Handle, access, ObjectAttributes, ##__VA_ARGS__);
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
_In_ PVOID _Out_opt_ PULONG_PTR _Outptr_opt_ PCUNICODE_STRING * ObjectName
Definition: cmfuncs.h:62
smooth NULL
Definition: ftsmooth.c:416
_In_ HANDLE Handle
Definition: extypes.h:390
POBJECT_ATTRIBUTES WINAPI BaseFormatObjectAttributes(OUT POBJECT_ATTRIBUTES ObjectAttributes, IN PSECURITY_ATTRIBUTES SecurityAttributes OPTIONAL, IN PUNICODE_STRING ObjectName)
Definition: utils.c:304
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
Definition: name.c:36
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)

Definition at line 112 of file base_x.h.

◆ CreateNtObjectFromWin32ApiEpilogue

#define CreateNtObjectFromWin32ApiEpilogue
Value:
{ \
SetLastError(ERROR_ALREADY_EXISTS); \
return Handle; \
} \
BaseSetLastNTError(Status); \
return NULL; \
}
#define ERROR_SUCCESS
Definition: deptool.c:10
#define STATUS_OBJECT_NAME_EXISTS
Definition: ntstatus.h:114
smooth NULL
Definition: ftsmooth.c:416
_In_ HANDLE Handle
Definition: extypes.h:390
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define SetLastError(x)
Definition: compat.h:409
Status
Definition: gdiplustypes.h:24
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80

Definition at line 118 of file base_x.h.

◆ CreateNtObjectFromWin32ApiPrologue

#define CreateNtObjectFromWin32ApiPrologue
Value:
{ \
NTSTATUS Status; \
HANDLE Handle; \
UNICODE_STRING ObjectName; \
OBJECT_ATTRIBUTES LocalAttributes; \
POBJECT_ATTRIBUTES ObjectAttributes = &LocalAttributes;
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
_In_ PVOID _Out_opt_ PULONG_PTR _Outptr_opt_ PCUNICODE_STRING * ObjectName
Definition: cmfuncs.h:62
_In_ HANDLE Handle
Definition: extypes.h:390
Status
Definition: gdiplustypes.h:24

Definition at line 105 of file base_x.h.

◆ OpenNtObjectFromWin32Api

#define OpenNtObjectFromWin32Api (   ntobj,
  acc,
  inh,
  name 
)
Value:
if (!name) \
{ \
BaseSetLastNTError(STATUS_INVALID_PARAMETER); \
return NULL; \
} \
RtlInitUnicodeString(&ObjectName, name); \
InitializeObjectAttributes(ObjectAttributes, \
inh ? OBJ_INHERIT : 0, \
NULL); \
Status = NtOpen##ntobj(&Handle, acc, ObjectAttributes); \
if (!NT_SUCCESS(Status)) \
{ \
BaseSetLastNTError(Status); \
return NULL; \
} \
return Handle; \
}
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_In_ PVOID _Out_opt_ PULONG_PTR _Outptr_opt_ PCUNICODE_STRING * ObjectName
Definition: cmfuncs.h:62
smooth NULL
Definition: ftsmooth.c:416
_In_ HANDLE Handle
Definition: extypes.h:390
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define OBJ_INHERIT
Definition: winternl.h:225
Status
Definition: gdiplustypes.h:24
HANDLE WINAPI BaseGetNamedObjectDirectory(VOID)
Definition: utils.c:63
Definition: name.c:36

Definition at line 143 of file base_x.h.