* include/winbase.h (DUPLICATE_CLOSE_SOURCE,

DUPLICATE_SAME_ACCESS): Remove defines.
	(HANDLE_FLAG_INHERIT, HANDLE_FLAG_PROTECT_FROM_CLOSE): Sync with
	ddk/ntapi.h defines.
	(SEM_*) : Likewise.
	* include/winnt.h (COMPRESSION_*, ACCESS_*, SYSTEM_*): Sync with
	ddk/ntifs.h defines.
	(FILE_*): Likewise.
	(MEM_IMAGE, SEC_*): Likewise.
	(DUPLICATE_CLOSE_SOURCE, DUPLICATE_SAME_ACCESS,
	DUPLICATE_SAME_ATTRIBUTES): Sync with ddk/winddk.h defines.
	(TOKEN_*): Sync with ddk/ntifs.h defines.
	* include/ddk/ntapi.h: Add comments noting definitions in
	winbase.h.
	* include/ddk/ntifs.h: Add comments noting definitions in
	winnt.h.
	* include/ddk/winddk.h: Add comments noting definitions in
	winnt.h.
This commit is contained in:
Danny Smith 2003-07-22 22:21:27 +00:00
parent 8d57e6682b
commit 1058b66e9a
6 changed files with 168 additions and 87 deletions

View File

@ -1,3 +1,24 @@
2003-07-22 Danny Smith <dannysmith@users.sourceforge.net>
* include/winbase.h (DUPLICATE_CLOSE_SOURCE,
DUPLICATE_SAME_ACCESS): Remove defines.
(HANDLE_FLAG_INHERIT, HANDLE_FLAG_PROTECT_FROM_CLOSE): Sync with
ddk/ntapi.h defines.
(SEM_*) : Likewise.
* include/winnt.h (COMPRESSION_*, ACCESS_*, SYSTEM_*): Sync with
ddk/ntifs.h defines.
(FILE_*): Likewise.
(MEM_IMAGE, SEC_*): Likewise.
(DUPLICATE_CLOSE_SOURCE, DUPLICATE_SAME_ACCESS,
DUPLICATE_SAME_ATTRIBUTES): Sync with ddk/winddk.h defines.
(TOKEN_*): Sync with ddk/ntifs.h defines.
* include/ddk/ntapi.h: Add comments noting definitions in
winbase.h.
* include/ddk/ntifs.h: Add comments noting definitions in
winnt.h.
* include/ddk/winddk.h: Add comments noting definitions in
winnt.h.
2003-07-18 Danny Smith <dannysmith@users.sourceforge.net>
* include/winnt.h (FILE_*): Sync with ddk/winddk.h.

View File

@ -754,8 +754,10 @@ ZwSetInformationObject(
IN ULONG ObjectInformationLength);
/* OBJECT_BASIC_INFORMATION.Attributes constants */
/* also in winbase.h */
#define HANDLE_FLAG_INHERIT 0x01
#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x02
/* end winbase.h */
#define PERMANENT 0x10
#define EXCLUSIVE 0x20
@ -1404,11 +1406,12 @@ typedef struct _PROCESS_ACCESS_TOKEN {
} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
/* DefaultHardErrorMode constants */
/* also in winbase.h */
#define SEM_FAILCRITICALERRORS 0x0001
#define SEM_NOGPFAULTERRORBOX 0x0002
#define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
#define SEM_NOOPENFILEERRORBOX 0x8000
/* end winbase.h */
typedef struct _POOLED_USAGE_AND_LIMITS {
ULONG PeakPagedPoolUsage;
ULONG PagedPoolUsage;

View File

@ -24,7 +24,7 @@
#define _NTIFS_
#define _GNU_NTIFS_
#if __GNUC__ >=3
#if __GNUC__ > =3
#pragma GCC system_header
#endif
@ -54,11 +54,6 @@ extern PSE_EXPORTS SeExports;
extern PACL SePublicDefaultDacl;
extern PACL SeSystemDefaultDacl;
#define ACCESS_ALLOWED_ACE_TYPE (0x0)
#define ACCESS_DENIED_ACE_TYPE (0x1)
#define SYSTEM_AUDIT_ACE_TYPE (0x2)
#define SYSTEM_ALARM_ACE_TYPE (0x3)
#define ANSI_DOS_STAR ('<')
#define ANSI_DOS_QM ('>')
#define ANSI_DOS_DOT ('"')
@ -67,6 +62,12 @@ extern PACL SeSystemDefaultDacl;
#define DOS_QM (L'>')
#define DOS_DOT (L'"')
/* also in winnt.h */
#define ACCESS_ALLOWED_ACE_TYPE (0x0)
#define ACCESS_DENIED_ACE_TYPE (0x1)
#define SYSTEM_AUDIT_ACE_TYPE (0x2)
#define SYSTEM_ALARM_ACE_TYPE (0x3)
#define COMPRESSION_FORMAT_NONE (0x0000)
#define COMPRESSION_FORMAT_DEFAULT (0x0001)
#define COMPRESSION_FORMAT_LZNT1 (0x0002)
@ -85,6 +86,7 @@ extern PACL SeSystemDefaultDacl;
#define FILE_ACTION_REMOVED_BY_DELETE 0x00000009
#define FILE_ACTION_ID_NOT_TUNNELLED 0x0000000A
#define FILE_ACTION_TUNNELLED_ID_COLLISION 0x0000000B
/* end winnt.h */
#define FILE_EA_TYPE_BINARY 0xfffe
#define FILE_EA_TYPE_ASCII 0xfffd
@ -99,6 +101,7 @@ extern PACL SeSystemDefaultDacl;
#define FILE_NEED_EA 0x00000080
/* also in winnt.h */
#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
#define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
#define FILE_NOTIFY_CHANGE_NAME 0x00000003
@ -113,6 +116,7 @@ extern PACL SeSystemDefaultDacl;
#define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
#define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
#define FILE_NOTIFY_VALID_MASK 0x00000fff
/* end winnt.h */
#define FILE_OPLOCK_BROKEN_TO_LEVEL_2 0x00000007
#define FILE_OPLOCK_BROKEN_TO_NONE 0x00000008
@ -228,11 +232,11 @@ extern PACL SeSystemDefaultDacl;
#define IO_ATTACH_DEVICE 0x0400
#define IO_ATTACH_DEVICE_API 0x80000000
/* also in winnt.h */
#define IO_COMPLETION_QUERY_STATE 0x0001
#define IO_COMPLETION_MODIFY_STATE 0x0002
#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
/* end winnt.h */
#define IO_FILE_OBJECT_NON_PAGED_POOL_CHARGE 64
#define IO_FILE_OBJECT_PAGED_POOL_CHARGE 1024
@ -252,10 +256,10 @@ extern PACL SeSystemDefaultDacl;
#define MAP_PROCESS 1L
#define MAP_SYSTEM 2L
#define MEM_DOS_LIM 0x40000000
/* also in winnt.h */
#define MEM_IMAGE SEC_IMAGE
/* end winnt.h */
#define OB_TYPE_TYPE 1
#define OB_TYPE_DIRECTORY 2
#define OB_TYPE_SYMBOLIC_LINK 3
@ -288,13 +292,15 @@ extern PACL SeSystemDefaultDacl;
#define PORT_CONNECT 0x0001
#define PORT_ALL_ACCESS (STANDARD_RIGHTS_ALL |\
PORT_CONNECT)
#define SEC_BASED 0x00200000
#define SEC_NO_CHANGE 0x00400000
#define SEC_FILE 0x00800000
#define SEC_IMAGE 0x01000000
#define SEC_COMMIT 0x08000000
#define SEC_NOCACHE 0x10000000
/* also in winnt.h */
#define SEC_BASED 0x00200000
#define SEC_NO_CHANGE 0x00400000
#define SEC_FILE 0x00800000
#define SEC_IMAGE 0x01000000
#define SEC_VLM 0x02000000
#define SEC_RESERVE 0x04000000
#define SEC_COMMIT 0x08000000
#define SEC_NOCACHE 0x10000000
#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
#define SECURITY_WORLD_RID (0x00000000L)
@ -331,6 +337,7 @@ extern PACL SeSystemDefaultDacl;
#define TOKEN_EXECUTE (STANDARD_RIGHTS_EXECUTE)
#define TOKEN_SOURCE_LENGTH 8
/* end winnt.h */
#define TOKEN_HAS_TRAVERSE_PRIVILEGE 0x01
#define TOKEN_HAS_BACKUP_PRIVILEGE 0x02

View File

@ -733,9 +733,11 @@ typedef VOID DDKAPI
#define SYMBOLIC_LINK_QUERY 0x0001
#define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
/* also in winnt,h */
#define DUPLICATE_CLOSE_SOURCE 0x00000001
#define DUPLICATE_SAME_ACCESS 0x00000002
#define DUPLICATE_SAME_ATTRIBUTES 0x00000004
/* end winnt.h */
typedef struct _OBJECT_NAME_INFORMATION {
UNICODE_STRING Name;

View File

@ -129,8 +129,6 @@ extern "C" {
#define COPY_FILE_FAIL_IF_EXISTS 1
#define COPY_FILE_RESTARTABLE 2
#define OFS_MAXPATHNAME 128
#define DUPLICATE_CLOSE_SOURCE 1
#define DUPLICATE_SAME_ACCESS 2
#define FILE_MAP_ALL_ACCESS 0xf001f
#define FILE_MAP_READ 4
#define FILE_MAP_WRITE 2
@ -231,8 +229,10 @@ extern "C" {
#define FILE_TYPE_CHAR 2
#define FILE_TYPE_PIPE 3
#define FILE_TYPE_REMOTE 0x8000
#define HANDLE_FLAG_INHERIT 1
#define HANDLE_FLAG_PROTECT_FROM_CLOSE 2
/* also in ddk/ntapi.h */
#define HANDLE_FLAG_INHERIT 0x01
#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x02
/* end ntapi.h */
#define STD_INPUT_HANDLE (DWORD)(0xfffffff6)
#define STD_OUTPUT_HANDLE (DWORD)(0xfffffff5)
#define STD_ERROR_HANDLE (DWORD)(0xfffffff4)
@ -409,10 +409,12 @@ extern "C" {
#define EV_RXCHAR 1
#define EV_RXFLAG 2
#define EV_TXEMPTY 4
#define SEM_FAILCRITICALERRORS 1
#define SEM_NOALIGNMENTFAULTEXCEPT 4
#define SEM_NOGPFAULTERRORBOX 2
#define SEM_NOOPENFILEERRORBOX 32768
/* also in ddk/ntapi.h */
#define SEM_FAILCRITICALERRORS 0x0001
#define SEM_NOGPFAULTERRORBOX 0x0002
#define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
#define SEM_NOOPENFILEERRORBOX 0x8000
/* end ntapi.h */
#define SLE_ERROR 1
#define SLE_MINORERROR 2
#define SLE_WARNING 3

View File

@ -167,16 +167,19 @@ typedef DWORD FLONG;
#define ERROR_SEVERITY_INFORMATIONAL 0x40000000
#define ERROR_SEVERITY_WARNING 0x80000000
#define ERROR_SEVERITY_ERROR 0xC0000000
#define COMPRESSION_FORMAT_NONE 0
#define COMPRESSION_FORMAT_DEFAULT 1
#define COMPRESSION_FORMAT_LZNT1 2
#define COMPRESSION_ENGINE_STANDARD 0
#define COMPRESSION_ENGINE_MAXIMUM 256
#define ACCESS_ALLOWED_ACE_TYPE 0
#define ACCESS_DENIED_ACE_TYPE 1
/* also in ddk/ntifs.h */
#define COMPRESSION_FORMAT_NONE (0x0000)
#define COMPRESSION_FORMAT_DEFAULT (0x0001)
#define COMPRESSION_FORMAT_LZNT1 (0x0002)
#define COMPRESSION_ENGINE_STANDARD (0x0000)
#define COMPRESSION_ENGINE_MAXIMUM (0x0100)
#define COMPRESSION_ENGINE_HIBER (0x0200)
#define ACCESS_ALLOWED_ACE_TYPE (0x0)
#define ACCESS_DENIED_ACE_TYPE (0x1)
#define SYSTEM_AUDIT_ACE_TYPE (0x2)
#define SYSTEM_ALARM_ACE_TYPE (0x3)
/*end ntifs.h */
#define ANYSIZE_ARRAY 1
#define SYSTEM_AUDIT_ACE_TYPE 2
#define SYSTEM_ALARM_ACE_TYPE 3
#define OBJECT_INHERIT_ACE 1
#define CONTAINER_INHERIT_ACE 2
#define NO_PROPAGATE_INHERIT_ACE 4
@ -203,6 +206,8 @@ typedef DWORD FLONG;
#define GENERIC_EXECUTE 0x20000000
#define GENERIC_ALL 0x10000000
#define INVALID_FILE_ATTRIBUTES (DWORD (-1))
/* Also in ddk/winddk.h */
#define FILE_LIST_DIRECTORY 0x00000001
#define FILE_READ_DATA 0x00000001
@ -312,37 +317,51 @@ typedef DWORD FLONG;
FILE_WRITE_EA | \
FILE_APPEND_DATA | \
SYNCHRONIZE)
/* end ddk/winddk.h sync */
/* end winddk.h */
/* also in ddk/ntifs.h */
#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
#define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
#define FILE_NOTIFY_CHANGE_NAME 0x00000003
#define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
#define FILE_NOTIFY_CHANGE_SIZE 0x00000008
#define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
#define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
#define FILE_NOTIFY_CHANGE_CREATION 0x00000040
#define FILE_NOTIFY_CHANGE_EA 0x00000080
#define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
#define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
#define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
#define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
#define FILE_NOTIFY_VALID_MASK 0x00000fff
#define INVALID_FILE_ATTRIBUTES (DWORD (-1))
#define FILE_CASE_SENSITIVE_SEARCH 0x00000001
#define FILE_CASE_PRESERVED_NAMES 0x00000002
#define FILE_UNICODE_ON_DISK 0x00000004
#define FILE_PERSISTENT_ACLS 0x00000008
#define FILE_FILE_COMPRESSION 0x00000010
#define FILE_VOLUME_QUOTAS 0x00000020
#define FILE_SUPPORTS_SPARSE_FILES 0x00000040
#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
#define FS_LFN_APIS 0x00004000
#define FILE_VOLUME_IS_COMPRESSED 0x00008000
#define FILE_SUPPORTS_OBJECT_IDS 0x00010000
#define FILE_SUPPORTS_ENCRYPTION 0x00020000
#define FILE_NAMED_STREAMS 0x00040000
#define IO_COMPLETION_QUERY_STATE 0x0001
#define IO_COMPLETION_MODIFY_STATE 0x0002
#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
/* end ntifs.h */
/* also in ddk/winddk.h */
#define DUPLICATE_CLOSE_SOURCE 0x00000001
#define DUPLICATE_SAME_ACCESS 0x00000002
#define DUPLICATE_SAME_ATTRIBUTES 0x00000004
/* end winddk.k */
#define FILE_NOTIFY_CHANGE_FILE_NAME 1
#define FILE_NOTIFY_CHANGE_DIR_NAME 2
#define FILE_NOTIFY_CHANGE_ATTRIBUTES 4
#define FILE_NOTIFY_CHANGE_SIZE 8
#define FILE_NOTIFY_CHANGE_LAST_WRITE 16
#define FILE_NOTIFY_CHANGE_LAST_ACCESS 32
#define FILE_NOTIFY_CHANGE_CREATION 64
#define FILE_NOTIFY_CHANGE_SECURITY 256
#define MAILSLOT_NO_MESSAGE ((DWORD)-1)
#define MAILSLOT_WAIT_FOREVER ((DWORD)-1)
#define FILE_CASE_SENSITIVE_SEARCH 1
#define FILE_CASE_PRESERVED_NAMES 2
#define FILE_UNICODE_ON_DISK 4
#define FILE_PERSISTENT_ACLS 8
#define FILE_FILE_COMPRESSION 16
#define FILE_VOLUME_QUOTAS 32
#define FILE_SUPPORTS_SPARSE_FILES 64
#define FILE_SUPPORTS_REPARSE_POINTS 128
#define FILE_SUPPORTS_REMOTE_STORAGE 256
#define FILE_VOLUME_IS_COMPRESSED 0x8000
#define FILE_SUPPORTS_OBJECT_IDS 0x10000
#define FILE_SUPPORTS_ENCRYPTION 0x20000
#define FILE_NAMED_STREAMS 0x40000
#define IO_COMPLETION_MODIFY_STATE 2
#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|3)
#define DUPLICATE_CLOSE_SOURCE 1
#define DUPLICATE_SAME_ACCESS 2
#define PROCESS_TERMINATE 1
#define PROCESS_CREATE_THREAD 2
#define PROCESS_SET_SESSIONID 4
@ -388,7 +407,7 @@ typedef DWORD FLONG;
#define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4}
#define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
#define SECURITY_NULL_RID 0
#define SECURITY_WORLD_RID 0
#define SECURITY_WORLD_RID (0x00000000L)
#define SECURITY_LOCAL_RID 0
#define SECURITY_CREATOR_OWNER_RID 0
#define SECURITY_CREATOR_GROUP_RID 1
@ -693,11 +712,19 @@ typedef DWORD FLONG;
#define PAGE_READONLY 2
#define PAGE_READWRITE 4
#define PAGE_WRITECOPY 8
#define FILE_ACTION_ADDED 1
#define FILE_ACTION_REMOVED 2
#define FILE_ACTION_MODIFIED 3
#define FILE_ACTION_RENAMED_OLD_NAME 4
#define FILE_ACTION_RENAMED_NEW_NAME 5
/* also in ddk/ntifs.h */
#define FILE_ACTION_ADDED 0x00000001
#define FILE_ACTION_REMOVED 0x00000002
#define FILE_ACTION_MODIFIED 0x00000003
#define FILE_ACTION_RENAMED_OLD_NAME 0x00000004
#define FILE_ACTION_RENAMED_NEW_NAME 0x00000005
#define FILE_ACTION_ADDED_STREAM 0x00000006
#define FILE_ACTION_REMOVED_STREAM 0x00000007
#define FILE_ACTION_MODIFIED_STREAM 0x00000008
#define FILE_ACTION_REMOVED_BY_DELETE 0x00000009
#define FILE_ACTION_ID_NOT_TUNNELLED 0x0000000A
#define FILE_ACTION_TUNNELLED_ID_COLLISION 0x0000000B
/* end ntifs.h */
#define HEAP_NO_SERIALIZE 1
#define HEAP_GROWABLE 2
#define HEAP_GENERATE_EXCEPTIONS 4
@ -755,13 +782,17 @@ typedef DWORD FLONG;
#define MEM_WRITE_WATCH 0x200000 /* 98/Me */
#define MEM_PHYSICAL 0x400000
#define MEM_4MB_PAGES 0x80000000
#define MEM_IMAGE 16777216
#define SEC_FILE 0x800000
#define SEC_IMAGE 0x1000000
#define SEC_VLM 0x2000000
#define SEC_RESERVE 0x4000000
#define SEC_COMMIT 0x8000000
#define SEC_NOCACHE 0x10000000
/* also in ddk/ntifs.h */
#define MEM_IMAGE SEC_IMAGE
#define SEC_BASED 0x00200000
#define SEC_NO_CHANGE 0x00400000
#define SEC_FILE 0x00800000
#define SEC_IMAGE 0x01000000
#define SEC_VLM 0x02000000
#define SEC_RESERVE 0x04000000
#define SEC_COMMIT 0x08000000
#define SEC_NOCACHE 0x10000000
/* end ntifs.h */
#define PAGE_EXECUTE_WRITECOPY 128
#define SECTION_EXTEND_SIZE 16
#define SECTION_MAP_READ 4
@ -1087,19 +1118,34 @@ typedef DWORD FLONG;
#define DEFAULT_IMPERSONATION_LEVEL SecurityImpersonation
#define SECURITY_DYNAMIC_TRACKING TRUE
#define SECURITY_STATIC_TRACKING FALSE
/* also in ddk/ntifs.h */
#define TOKEN_ASSIGN_PRIMARY (0x0001)
#define TOKEN_DUPLICATE (0x0002)
#define TOKEN_IMPERSONATE (0x0004)
#define TOKEN_QUERY (0x0008)
#define TOKEN_QUERY_SOURCE (0x0010)
#define TOKEN_ADJUST_PRIVILEGES (0x0020)
#define TOKEN_ADJUST_GROUPS (0x0040)
#define TOKEN_ADJUST_DEFAULT (0x0080)
#define TOKEN_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
TOKEN_ASSIGN_PRIMARY |\
TOKEN_DUPLICATE |\
TOKEN_IMPERSONATE |\
TOKEN_QUERY |\
TOKEN_QUERY_SOURCE |\
TOKEN_ADJUST_PRIVILEGES |\
TOKEN_ADJUST_GROUPS |\
TOKEN_ADJUST_DEFAULT)
#define TOKEN_READ (STANDARD_RIGHTS_READ |\
TOKEN_QUERY)
#define TOKEN_WRITE (STANDARD_RIGHTS_WRITE |\
TOKEN_ADJUST_PRIVILEGES |\
TOKEN_ADJUST_GROUPS |\
TOKEN_ADJUST_DEFAULT)
#define TOKEN_EXECUTE (STANDARD_RIGHTS_EXECUTE)
#define TOKEN_SOURCE_LENGTH 8
#define TOKEN_ADJUST_DEFAULT 128
#define TOKEN_ADJUST_GROUPS 64
#define TOKEN_ADJUST_PRIVILEGES 32
#define TOKEN_ALL_ACCESS 0xf00ff
#define TOKEN_ASSIGN_PRIMARY 1
#define TOKEN_DUPLICATE 2
#define TOKEN_EXECUTE 0x20000
#define TOKEN_IMPERSONATE 4
#define TOKEN_QUERY 8
#define TOKEN_QUERY_SOURCE 16
#define TOKEN_READ 0x20008
#define TOKEN_WRITE 0x200e0
/* end ddk/ntifs.h */
#define DLL_PROCESS_DETACH 0
#define DLL_PROCESS_ATTACH 1
#define DLL_THREAD_ATTACH 2