2005-05-08 17:44:37 +00:00
|
|
|
#ifndef _NTDEF_H
|
|
|
|
#define _NTDEF_H
|
|
|
|
#if __GNUC__ >=3
|
|
|
|
#pragma GCC system_header
|
|
|
|
#endif
|
2007-08-04 08:26:58 +00:00
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <windef.h>
|
|
|
|
#include <excpt.h>
|
|
|
|
|
2005-06-21 23:42:58 +00:00
|
|
|
/* TODO: some compilers support this */
|
|
|
|
#define RESTRICTED_POINTER
|
2005-05-08 17:44:37 +00:00
|
|
|
|
|
|
|
#define NTAPI __stdcall
|
2005-09-06 05:30:39 +00:00
|
|
|
#if !defined(_M_CEE_PURE)
|
|
|
|
#define NTAPI_INLINE NTAPI
|
|
|
|
#else
|
|
|
|
#define NTAPI_INLINE
|
|
|
|
#endif
|
2005-09-04 23:48:19 +00:00
|
|
|
|
2006-01-08 06:23:17 +00:00
|
|
|
#ifndef DECLSPEC_NOINLINE
|
|
|
|
#define DECLSPEC_NOINLINE __declspec(noinline)
|
|
|
|
#endif
|
|
|
|
|
2006-10-22 19:48:43 +00:00
|
|
|
#define OBJ_INHERIT 0x00000002
|
|
|
|
#define OBJ_PERMANENT 0x00000010
|
|
|
|
#define OBJ_EXCLUSIVE 0x00000020
|
|
|
|
#define OBJ_CASE_INSENSITIVE 0x00000040
|
|
|
|
#define OBJ_OPENIF 0x00000080
|
|
|
|
#define OBJ_OPENLINK 0x00000100
|
|
|
|
#define OBJ_KERNEL_HANDLE 0x00000200
|
|
|
|
#define OBJ_FORCE_ACCESS_CHECK 0x00000400
|
|
|
|
#define OBJ_VALID_ATTRIBUTES 0x000007F2
|
2005-05-08 17:44:37 +00:00
|
|
|
#define InitializeObjectAttributes(p,n,a,r,s) { \
|
|
|
|
(p)->Length = sizeof(OBJECT_ATTRIBUTES); \
|
|
|
|
(p)->RootDirectory = (r); \
|
|
|
|
(p)->Attributes = (a); \
|
|
|
|
(p)->ObjectName = (n); \
|
|
|
|
(p)->SecurityDescriptor = (s); \
|
|
|
|
(p)->SecurityQualityOfService = NULL; \
|
|
|
|
}
|
|
|
|
#ifndef NT_SUCCESS
|
|
|
|
#define NT_SUCCESS(x) ((x)>=0)
|
|
|
|
#endif
|
2005-05-08 18:02:41 +00:00
|
|
|
#define NT_WARNING(x) ((ULONG)(x)>>30==2)
|
|
|
|
#define NT_ERROR(x) ((ULONG)(x)>>30==3)
|
2005-05-08 17:44:37 +00:00
|
|
|
#if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H)
|
|
|
|
typedef LONG NTSTATUS, *PNTSTATUS;
|
|
|
|
typedef struct _UNICODE_STRING {
|
|
|
|
USHORT Length;
|
|
|
|
USHORT MaximumLength;
|
|
|
|
PWSTR Buffer;
|
|
|
|
} UNICODE_STRING, *PUNICODE_STRING;
|
|
|
|
typedef const UNICODE_STRING* PCUNICODE_STRING;
|
|
|
|
typedef struct _STRING {
|
|
|
|
USHORT Length;
|
|
|
|
USHORT MaximumLength;
|
|
|
|
PCHAR Buffer;
|
|
|
|
} STRING, *PSTRING;
|
2006-11-19 21:14:49 +00:00
|
|
|
typedef struct _CSTRING {
|
|
|
|
USHORT Length;
|
|
|
|
USHORT MaximumLength;
|
|
|
|
CONST CHAR *Buffer;
|
|
|
|
} CSTRING, *PCSTRING;
|
2005-05-08 17:44:37 +00:00
|
|
|
#endif
|
|
|
|
typedef STRING ANSI_STRING;
|
|
|
|
typedef PSTRING PANSI_STRING;
|
|
|
|
typedef STRING OEM_STRING;
|
|
|
|
typedef PSTRING POEM_STRING;
|
2005-09-05 18:06:20 +00:00
|
|
|
typedef CONST STRING* PCOEM_STRING;
|
|
|
|
typedef STRING CANSI_STRING;
|
|
|
|
typedef PSTRING PCANSI_STRING;
|
2005-05-08 17:44:37 +00:00
|
|
|
typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
|
2006-08-05 16:49:07 +00:00
|
|
|
typedef CONST CHAR *LPCCH, *PCCH;
|
- Add some definitions to ketypes.h
- Fix multiple bugs in KTHREAD/KPROCESS where signed char values were marked as unsigned (and define SCHAR in ntdef.h)
- Change prototype of KiSwapThread for future compatibility.
- Fix prototype of KeSetIdealProcessorThread.
- Add KiAcquireDispatcherLock, KiReleaseDispatcherLock, KiAcquireDispatcherLockAtDpcLevel, KiReleaseDispatcherLockFromDpcLevel to ke_x.h for future use.
- Add KiInsertDeferredReadyList, KiRescheduleThread, KiSetThreadSwapBusy, KiRundownThread, KiCheckDeferredReadyList for future use.
- Add KiAcquirePrcbLock, KiReleasePrcbLock, KiAcquireThreadLock, KiReleaseThreadLock for future use.
- Add KxQueueReadyThread, KiSelectReadyThread for future use.
- Add KiComputeNewPriority for future use.
svn path=/trunk/; revision=24022
2006-09-10 14:43:12 +00:00
|
|
|
typedef signed char SCHAR;
|
|
|
|
typedef SCHAR *PSCHAR;
|
2005-05-08 17:44:37 +00:00
|
|
|
typedef enum _SECTION_INHERIT {
|
|
|
|
ViewShare = 1,
|
|
|
|
ViewUnmap = 2
|
|
|
|
} SECTION_INHERIT;
|
2005-06-19 07:11:49 +00:00
|
|
|
typedef enum _NT_PRODUCT_TYPE {
|
|
|
|
NtProductWinNt = 1,
|
|
|
|
NtProductLanManNt,
|
|
|
|
NtProductServer
|
|
|
|
} NT_PRODUCT_TYPE, *PNT_PRODUCT_TYPE;
|
2005-05-08 17:44:37 +00:00
|
|
|
#if !defined(_NTSECAPI_H)
|
|
|
|
typedef struct _OBJECT_ATTRIBUTES {
|
|
|
|
ULONG Length;
|
|
|
|
HANDLE RootDirectory;
|
|
|
|
PUNICODE_STRING ObjectName;
|
2005-05-09 01:50:07 +00:00
|
|
|
ULONG Attributes;
|
|
|
|
PVOID SecurityDescriptor;
|
2005-05-08 17:44:37 +00:00
|
|
|
PVOID SecurityQualityOfService;
|
|
|
|
} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
|
|
|
|
#endif
|
- Add EXCEPTION_RECORD64 and LIST_ENTRY64, KeTryToAcquireSpinLockAtDpcLevel, BREAKPOINT_COMMAND_STRING, Ke386SetCr2, Ke386SetDr3, Ke386SetDr6.
- Remove non-kernel routines from kdfuncs.h and remove deprecated routines from ke.h.
- Implement KiRestoreProcessorControlState, KeFreezeExecution, KeThawExecution, ExAcquireTimeRefreshLock, ExReleaseTimeRefreshLock.
- Rename ModuleLoadList to PsLoadedModuleList. Add PsNtosImageBase and set value in it.
- Add skeleton wdbgexts.h with what's needed until now, this is a PSDK header.
- Add kddll.h for KDCOM/1394/USB2.DLL prototypes.
- Add windbgkd.h with KD protocol definitions. Used to be an NT5 DDK header, but was removed, so this goes into include\reactos.
svn path=/branches/alex-kd-branch/; revision=25833
2007-02-18 07:21:03 +00:00
|
|
|
|
|
|
|
typedef struct LIST_ENTRY32
|
|
|
|
{
|
|
|
|
ULONG Flink;
|
|
|
|
ULONG Blink;
|
|
|
|
} LIST_ENTRY32;
|
|
|
|
typedef LIST_ENTRY32 *PLIST_ENTRY32;
|
|
|
|
|
|
|
|
typedef struct LIST_ENTRY64
|
|
|
|
{
|
|
|
|
ULONGLONG Flink;
|
|
|
|
ULONGLONG Blink;
|
|
|
|
} LIST_ENTRY64;
|
|
|
|
typedef LIST_ENTRY64 *PLIST_ENTRY64;
|
|
|
|
|
2005-05-08 18:02:41 +00:00
|
|
|
#define NOTHING
|
|
|
|
#define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s }
|
2005-07-26 14:00:45 +00:00
|
|
|
#define TYPE_ALIGNMENT( t ) FIELD_OFFSET( struct { char x; t test; }, test )
|
2006-07-19 23:21:19 +00:00
|
|
|
#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
|
|
|
|
#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0]))
|
|
|
|
#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
|
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_RTL_NUMBER_OF_V2
|
|
|
|
#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A)
|
|
|
|
#else
|
|
|
|
#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
|
|
|
|
#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
|
2005-08-09 03:29:51 +00:00
|
|
|
#define MINCHAR 0x80
|
|
|
|
#define MAXCHAR 0x7f
|
|
|
|
#define MINSHORT 0x8000
|
|
|
|
#define MAXSHORT 0x7fff
|
|
|
|
#define MINLONG 0x80000000
|
|
|
|
#define MAXLONG 0x7fffffff
|
|
|
|
#define MAXUCHAR 0xff
|
|
|
|
#define MAXUSHORT 0xffff
|
|
|
|
#define MAXULONG 0xffffffff
|
2006-11-12 22:27:10 +00:00
|
|
|
#define MAXLONGLONG (0x7fffffffffffffffLL)
|
2008-04-22 23:09:05 +00:00
|
|
|
|
|
|
|
#define __C_ASSERT_JOIN(X, Y) __C_ASSERT_DO_JOIN(X, Y)
|
|
|
|
#define __C_ASSERT_DO_JOIN(X, Y) __C_ASSERT_DO_JOIN2(X, Y)
|
|
|
|
#define __C_ASSERT_DO_JOIN2(X, Y) X##Y
|
|
|
|
|
|
|
|
#define C_ASSERT(e) typedef char __C_ASSERT_JOIN(__C_ASSERT__, __LINE__)[(e) ? 1 : -1]
|
2006-10-01 15:52:10 +00:00
|
|
|
|
2005-05-08 17:44:37 +00:00
|
|
|
#endif /* _NTDEF_H */
|