ReactOS 0.4.16-dev-340-g0540c21
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);
#define FALSE
Definition: types.h:117
Status
Definition: gdiplustypes.h:25
#define NtCurrentTeb
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
Definition: name.c:39

Definition at line 38 of file base_x.h.

◆ ConvertAnsiToUnicodeEpilogue

#define ConvertAnsiToUnicodeEpilogue
Value:
SetLastError(ERROR_FILENAME_EXCED_RANGE); \
else \
BaseSetLastNTError(Status); \
return FALSE; \
}
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
#define ERROR_FILENAME_EXCED_RANGE
Definition: winerror.h:263

Definition at line 42 of file base_x.h.

◆ ConvertAnsiToUnicodePrologue

#define ConvertAnsiToUnicodePrologue
Value:
{ \
PUNICODE_STRING UnicodeCache; \
ANSI_STRING AnsiName;
LONG NTSTATUS
Definition: precomp.h:26

Definition at line 33 of file base_x.h.

◆ ConvertOpenWin32AnsiObjectApiToUnicodeApi

#define ConvertOpenWin32AnsiObjectApiToUnicodeApi (   obj,
  acc,
  inh,
  name 
)
Value:
ConvertAnsiToUnicodePrologue \
if (!name) \
{ \
SetLastError(ERROR_INVALID_PARAMETER); \
return NULL; \
} \
ConvertAnsiToUnicodeBody(name) \
if (NT_SUCCESS(Status)) return Open##obj##W(acc, inh, UnicodeCache->Buffer);\
#define ConvertAnsiToUnicodeEpilogue
Definition: base_x.h:42
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define W(I)
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define Open
Definition: syshdrs.h:62

Definition at line 86 of file base_x.h.

◆ ConvertWin32AnsiChangeApiToUnicodeApi

#define ConvertWin32AnsiChangeApiToUnicodeApi (   obj,
  name,
  ... 
)
Value:
ConvertAnsiToUnicodePrologue \
ConvertAnsiToUnicodeBody(name) \
if (NT_SUCCESS(Status)) return obj##W(UnicodeCache->Buffer, ##__VA_ARGS__); \

Definition at line 76 of file base_x.h.

◆ ConvertWin32AnsiObjectApiToUnicodeApi

#define ConvertWin32AnsiObjectApiToUnicodeApi (   obj,
  name,
  ... 
)
Value:
ConvertAnsiToUnicodePrologue \
if (!name) return Create##obj##W(__VA_ARGS__, NULL); \
ConvertAnsiToUnicodeBody(name) \
if (NT_SUCCESS(Status)) return Create##obj##W(__VA_ARGS__, UnicodeCache->Buffer); \
@ Create
Definition: registry.c:563

Definition at line 54 of file base_x.h.

◆ ConvertWin32AnsiObjectApiToUnicodeApi2

#define ConvertWin32AnsiObjectApiToUnicodeApi2 (   obj,
  name,
  ... 
)
Value:
ConvertAnsiToUnicodePrologue \
if (!name) return Create##obj##W(NULL, __VA_ARGS__); \
ConvertAnsiToUnicodeBody(name) \
if (NT_SUCCESS(Status)) return Create##obj##W(UnicodeCache->Buffer, __VA_ARGS__); \

Definition at line 65 of file base_x.h.

◆ CreateNtObjectFromWin32Api

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

Definition at line 135 of file base_x.h.

◆ CreateNtObjectFromWin32ApiBody

#define CreateNtObjectFromWin32ApiBody (   ntobj,
  sec,
  name,
  access,
  ... 
)
Value:
sec, \
name ? &ObjectName : NULL); \
Status = NtCreate##ntobj(&Handle, access, ObjectAttributes, ##__VA_ARGS__);
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
POBJECT_ATTRIBUTES WINAPI BaseFormatObjectAttributes(OUT POBJECT_ATTRIBUTES ObjectAttributes, IN PSECURITY_ATTRIBUTES SecurityAttributes OPTIONAL, IN PUNICODE_STRING ObjectName)
Definition: utils.c:304
ULONG Handle
Definition: gdb_input.c:15
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
_In_ PVOID _Out_opt_ PULONG_PTR _Outptr_opt_ PCUNICODE_STRING * ObjectName
Definition: cmfuncs.h:64

Definition at line 112 of file base_x.h.

◆ CreateNtObjectFromWin32ApiEpilogue

#define CreateNtObjectFromWin32ApiEpilogue
Value:
{ \
SetLastError(ERROR_ALREADY_EXISTS); \
else \
SetLastError(ERROR_SUCCESS); \
return Handle; \
} \
BaseSetLastNTError(Status); \
return NULL; \
}
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
#define STATUS_OBJECT_NAME_EXISTS
Definition: ntstatus.h:114

Definition at line 118 of file base_x.h.

◆ CreateNtObjectFromWin32ApiPrologue

#define CreateNtObjectFromWin32ApiPrologue
Value:

Definition at line 105 of file base_x.h.

◆ OpenNtObjectFromWin32Api

#define OpenNtObjectFromWin32Api (   ntobj,
  acc,
  inh,
  name 
)
Value:
CreateNtObjectFromWin32ApiPrologue \
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; \
}
HANDLE WINAPI BaseGetNamedObjectDirectory(VOID)
Definition: utils.c:63
#define OBJ_INHERIT
Definition: winternl.h:225
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135

Definition at line 143 of file base_x.h.