[HEADERS]
[reactos.git] / reactos / include / ndk / ifssupp.h
index 0b7a3d7..b970ee3 100644 (file)
-/*++ NDK Version: 0095\r
-\r
-Copyright (c) Alex Ionescu.  All rights reserved.\r
-\r
-Header Name:\r
-\r
-    ifssupp.h\r
-\r
-Abstract:\r
-\r
-    NDK Support for usage without the IFS. Will be deprecated at WDK Release.\r
-\r
-Author:\r
-\r
-    Alex Ionescu (alex.ionescu@reactos.com)   06-Oct-2004\r
-\r
---*/\r
-#ifndef _NTIFS_\r
-#ifndef NTOS_MODE_USER\r
-#define _NTIFS_\r
-\r
-#define TOKEN_SOURCE_LENGTH               8\r
-\r
-typedef enum _TOKEN_TYPE\r
-{\r
-    TokenPrimary = 1,\r
-    TokenImpersonation\r
-} TOKEN_TYPE, *PTOKEN_TYPE;\r
-\r
-typedef PVOID PRTL_HEAP_PARAMETERS;\r
-typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;\r
-\r
-typedef struct _RTL_SPLAY_LINKS\r
-{\r
-    struct _RTL_SPLAY_LINKS *Parent;\r
-    struct _RTL_SPLAY_LINKS *LeftChild;\r
-    struct _RTL_SPLAY_LINKS *RightChild;\r
-} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;\r
-\r
-#if defined(USE_LPC6432)\r
-#define LPC_CLIENT_ID CLIENT_ID64\r
-#define LPC_SIZE_T ULONGLONG\r
-#define LPC_PVOID ULONGLONG\r
-#define LPC_HANDLE ULONGLONG\r
-#else\r
-#define LPC_CLIENT_ID CLIENT_ID\r
-#define LPC_SIZE_T SIZE_T\r
-#define LPC_PVOID PVOID\r
-#define LPC_HANDLE HANDLE\r
-#endif\r
-\r
-typedef struct _PORT_MESSAGE\r
-{\r
-    union\r
-    {\r
-        struct\r
-        {\r
-            CSHORT DataLength;\r
-            CSHORT TotalLength;\r
-        } s1;\r
-        ULONG Length;\r
-    } u1;\r
-    union\r
-    {\r
-        struct\r
-        {\r
-            CSHORT Type;\r
-            CSHORT DataInfoOffset;\r
-        } s2;\r
-        ULONG ZeroInit;\r
-    } u2;\r
-    union\r
-    {\r
-        LPC_CLIENT_ID ClientId;\r
-        double DoNotUseThisField;\r
-    };\r
-    ULONG MessageId;\r
-    union\r
-    {\r
-        LPC_SIZE_T ClientViewSize;\r
-        ULONG CallbackId;\r
-    };\r
-} PORT_MESSAGE, *PPORT_MESSAGE;\r
-\r
-typedef struct _PORT_VIEW\r
-{\r
-    ULONG Length;\r
-    LPC_HANDLE SectionHandle;\r
-    ULONG SectionOffset;\r
-    LPC_SIZE_T ViewSize;\r
-    LPC_PVOID ViewBase;\r
-    LPC_PVOID ViewRemoteBase;\r
-} PORT_VIEW, *PPORT_VIEW;\r
-\r
-typedef struct _REMOTE_PORT_VIEW\r
-{\r
-    ULONG Length;\r
-    LPC_SIZE_T ViewSize;\r
-    LPC_PVOID ViewBase;\r
-} REMOTE_PORT_VIEW, *PREMOTE_PORT_VIEW;\r
-\r
-typedef struct _KAPC_STATE\r
-{\r
-    LIST_ENTRY ApcListHead[2];\r
-    struct _KPROCESS *Process;\r
-    BOOLEAN KernelApcInProgress;\r
-    BOOLEAN KernelApcPending;\r
-    BOOLEAN UserApcPending;\r
-} KAPC_STATE, *PKAPC_STATE, *RESTRICTED_POINTER PRKAPC_STATE;\r
-\r
-typedef struct _KQUEUE\r
-{\r
-    DISPATCHER_HEADER Header;\r
-    LIST_ENTRY EntryListHead;\r
-    ULONG CurrentCount;\r
-    ULONG MaximumCount;\r
-    LIST_ENTRY ThreadListHead;\r
-} KQUEUE, *PKQUEUE, *RESTRICTED_POINTER PRKQUEUE;\r
-\r
-typedef enum _RTL_GENERIC_COMPARE_RESULTS\r
-{\r
-    GenericLessThan,\r
-    GenericGreaterThan,\r
-    GenericEqual\r
-} RTL_GENERIC_COMPARE_RESULTS;\r
-\r
-typedef struct _SID_IDENTIFIER_AUTHORITY\r
-{\r
-    UCHAR Value[6];\r
-} SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;\r
-\r
-typedef struct _SID_AND_ATTRIBUTES\r
-{\r
-    PSID Sid;\r
-    ULONG Attributes;\r
-} SID_AND_ATTRIBUTES, * PSID_AND_ATTRIBUTES;\r
-\r
-typedef struct _TOKEN_SOURCE\r
-{\r
-    CHAR SourceName[TOKEN_SOURCE_LENGTH];\r
-    LUID SourceIdentifier;\r
-} TOKEN_SOURCE, *PTOKEN_SOURCE;\r
-\r
-typedef struct _TOKEN_CONTROL\r
-{\r
-    LUID TokenId;\r
-    LUID AuthenticationId;\r
-    LUID ModifiedId;\r
-    TOKEN_SOURCE TokenSource;\r
-} TOKEN_CONTROL, *PTOKEN_CONTROL;\r
-\r
-typedef struct _SECURITY_CLIENT_CONTEXT\r
-{\r
-    SECURITY_QUALITY_OF_SERVICE SecurityQos;\r
-    PACCESS_TOKEN ClientToken;\r
-    BOOLEAN DirectlyAccessClientToken;\r
-    BOOLEAN DirectAccessEffectiveOnly;\r
-    BOOLEAN ServerIsRemote;\r
-    TOKEN_CONTROL ClientTokenControl;\r
-} SECURITY_CLIENT_CONTEXT, *PSECURITY_CLIENT_CONTEXT;\r
-\r
-typedef struct _SECURITY_DESCRIPTOR_RELATIVE\r
-{\r
-    UCHAR Revision;\r
-    UCHAR Sbz1;\r
-    SECURITY_DESCRIPTOR_CONTROL Control;\r
-    ULONG Owner;\r
-    ULONG Group;\r
-    ULONG Sacl;\r
-    ULONG Dacl;\r
-} SECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE;\r
-\r
-typedef struct _TOKEN_GROUPS\r
-{\r
-    ULONG GroupCount;\r
-    SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];\r
-} TOKEN_GROUPS, *PTOKEN_GROUPS;\r
-\r
-typedef struct _TOKEN_PRIVILEGES\r
-{\r
-    ULONG PrivilegeCount;\r
-    LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];\r
-} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;\r
-\r
-typedef struct _TOKEN_USER\r
-{\r
-    SID_AND_ATTRIBUTES User;\r
-} TOKEN_USER, *PTOKEN_USER;\r
-\r
-typedef enum _TOKEN_INFORMATION_CLASS\r
-{\r
-    TokenUser = 1,\r
-    TokenGroups,\r
-    TokenPrivileges,\r
-    TokenOwner,\r
-    TokenPrimaryGroup,\r
-    TokenDefaultDacl,\r
-    TokenSource,\r
-    TokenType,\r
-    TokenImpersonationLevel,\r
-    TokenStatistics,\r
-    TokenRestrictedSids,\r
-    TokenSessionId,\r
-    TokenGroupsAndPrivileges,\r
-    TokenSessionReference,\r
-    TokenSandBoxInert,\r
-    TokenAuditPolicy,\r
-    TokenOrigin,\r
-    TokenElevationType,\r
-    TokenLinkedToken,\r
-    TokenElevation,\r
-    TokenIsRestricted,\r
-    TokenAccessInformation,\r
-    TokenVirtualization,\r
-    TokenIntegrityLevel,\r
-    TokenIntegrityLevelDesktop,\r
-    TokenMandatoryPolicy,\r
-    MaxTokenInfoClass\r
-} TOKEN_INFORMATION_CLASS, *PTOKEN_INFORMATION_CLASS;\r
-\r
-typedef struct _TOKEN_OWNER\r
-{\r
-    PSID Owner;\r
-} TOKEN_OWNER, *PTOKEN_OWNER;\r
-\r
-typedef struct _TOKEN_PRIMARY_GROUP\r
-{\r
-    PSID PrimaryGroup;\r
-} TOKEN_PRIMARY_GROUP, *PTOKEN_PRIMARY_GROUP;\r
-\r
-typedef struct _TOKEN_DEFAULT_DACL\r
-{\r
-    PACL DefaultDacl;\r
-} TOKEN_DEFAULT_DACL, *PTOKEN_DEFAULT_DACL;\r
-\r
-#endif // !NTOS_MODE_USER\r
-#endif // _NTIFS_\r
+/*++ NDK Version: 0098
+
+Copyright (c) Alex Ionescu.  All rights reserved.
+
+Header Name:
+
+    ifssupp.h
+
+Abstract:
+
+    NDK Support for usage without the IFS. Will be deprecated at WDK Release.
+
+Author:
+
+    Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
+
+--*/
+#ifndef _NTIFS_
+#ifndef NTOS_MODE_USER
+#define _NTIFS_
+
+#define TOKEN_SOURCE_LENGTH               8
+
+#ifndef _NTIFS_
+typedef enum _TOKEN_TYPE
+{
+    TokenPrimary = 1,
+    TokenImpersonation
+} TOKEN_TYPE, *PTOKEN_TYPE;
+
+typedef NTSTATUS
+(NTAPI * PRTL_HEAP_COMMIT_ROUTINE)(
+    IN PVOID Base,
+    IN OUT PVOID *CommitAddress,
+    IN OUT PSIZE_T CommitSize
+);
+
+typedef struct _RTL_HEAP_PARAMETERS
+{
+    ULONG Length;
+    SIZE_T SegmentReserve;
+    SIZE_T SegmentCommit;
+    SIZE_T DeCommitFreeBlockThreshold;
+    SIZE_T DeCommitTotalFreeThreshold;
+    SIZE_T MaximumAllocationSize;
+    SIZE_T VirtualMemoryThreshold;
+    SIZE_T InitialCommit;
+    SIZE_T InitialReserve;
+    PRTL_HEAP_COMMIT_ROUTINE CommitRoutine;
+    SIZE_T Reserved[2];
+} RTL_HEAP_PARAMETERS, *PRTL_HEAP_PARAMETERS;
+
+typedef PVOID PFS_FILTER_CALLBACKS;
+typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
+
+typedef struct _RTL_SPLAY_LINKS
+{
+    struct _RTL_SPLAY_LINKS *Parent;
+    struct _RTL_SPLAY_LINKS *LeftChild;
+    struct _RTL_SPLAY_LINKS *RightChild;
+} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
+
+typedef struct _RTL_GENERIC_TABLE RTL_GENERIC_TABLE, *PRTL_GENERIC_TABLE;
+typedef ULONG TABLE_SEARCH_RESULT;
+
+#if defined(USE_LPC6432)
+#define LPC_CLIENT_ID CLIENT_ID64
+#define LPC_SIZE_T ULONGLONG
+#define LPC_PVOID ULONGLONG
+#define LPC_HANDLE ULONGLONG
+#else
+#define LPC_CLIENT_ID CLIENT_ID
+#define LPC_SIZE_T SIZE_T
+#define LPC_PVOID PVOID
+#define LPC_HANDLE HANDLE
+#endif
+
+typedef struct _PORT_MESSAGE
+{
+    union
+    {
+        struct
+        {
+            CSHORT DataLength;
+            CSHORT TotalLength;
+        } s1;
+        ULONG Length;
+    } u1;
+    union
+    {
+        struct
+        {
+            CSHORT Type;
+            CSHORT DataInfoOffset;
+        } s2;
+        ULONG ZeroInit;
+    } u2;
+    union
+    {
+        LPC_CLIENT_ID ClientId;
+        double DoNotUseThisField;
+    };
+    ULONG MessageId;
+    union
+    {
+        LPC_SIZE_T ClientViewSize;
+        ULONG CallbackId;
+    };
+} PORT_MESSAGE, *PPORT_MESSAGE;
+
+typedef struct _PORT_VIEW
+{
+    ULONG Length;
+    LPC_HANDLE SectionHandle;
+    ULONG SectionOffset;
+    LPC_SIZE_T ViewSize;
+    LPC_PVOID ViewBase;
+    LPC_PVOID ViewRemoteBase;
+} PORT_VIEW, *PPORT_VIEW;
+
+typedef struct _REMOTE_PORT_VIEW
+{
+    ULONG Length;
+    LPC_SIZE_T ViewSize;
+    LPC_PVOID ViewBase;
+} REMOTE_PORT_VIEW, *PREMOTE_PORT_VIEW;
+
+typedef struct _KAPC_STATE
+{
+    LIST_ENTRY ApcListHead[2];
+    struct _KPROCESS *Process;
+    BOOLEAN KernelApcInProgress;
+    BOOLEAN KernelApcPending;
+    BOOLEAN UserApcPending;
+} KAPC_STATE, *PKAPC_STATE, *RESTRICTED_POINTER PRKAPC_STATE;
+
+typedef struct _KQUEUE
+{
+    DISPATCHER_HEADER Header;
+    LIST_ENTRY EntryListHead;
+    ULONG CurrentCount;
+    ULONG MaximumCount;
+    LIST_ENTRY ThreadListHead;
+} KQUEUE, *PKQUEUE, *RESTRICTED_POINTER PRKQUEUE;
+
+typedef struct _ACE_HEADER
+{
+    UCHAR AceType;
+    UCHAR AceFlags;
+    USHORT AceSize;
+} ACE_HEADER, *PACE_HEADER;
+
+typedef enum _RTL_GENERIC_COMPARE_RESULTS
+{
+    GenericLessThan,
+    GenericGreaterThan,
+    GenericEqual
+} RTL_GENERIC_COMPARE_RESULTS;
+
+typedef struct _SID_IDENTIFIER_AUTHORITY
+{
+    UCHAR Value[6];
+} SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
+
+typedef struct _SID_AND_ATTRIBUTES
+{
+    PSID Sid;
+    ULONG Attributes;
+} SID_AND_ATTRIBUTES, * PSID_AND_ATTRIBUTES;
+
+typedef struct _TOKEN_SOURCE
+{
+    CHAR SourceName[TOKEN_SOURCE_LENGTH];
+    LUID SourceIdentifier;
+} TOKEN_SOURCE, *PTOKEN_SOURCE;
+
+typedef struct _TOKEN_CONTROL
+{
+    LUID TokenId;
+    LUID AuthenticationId;
+    LUID ModifiedId;
+    TOKEN_SOURCE TokenSource;
+} TOKEN_CONTROL, *PTOKEN_CONTROL;
+
+typedef struct _SECURITY_CLIENT_CONTEXT
+{
+    SECURITY_QUALITY_OF_SERVICE SecurityQos;
+    PACCESS_TOKEN ClientToken;
+    BOOLEAN DirectlyAccessClientToken;
+    BOOLEAN DirectAccessEffectiveOnly;
+    BOOLEAN ServerIsRemote;
+    TOKEN_CONTROL ClientTokenControl;
+} SECURITY_CLIENT_CONTEXT, *PSECURITY_CLIENT_CONTEXT;
+
+typedef struct _SECURITY_DESCRIPTOR_RELATIVE
+{
+    UCHAR Revision;
+    UCHAR Sbz1;
+    SECURITY_DESCRIPTOR_CONTROL Control;
+    ULONG Owner;
+    ULONG Group;
+    ULONG Sacl;
+    ULONG Dacl;
+} SECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE;
+
+typedef struct _TOKEN_GROUPS
+{
+    ULONG GroupCount;
+    SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
+} TOKEN_GROUPS, *PTOKEN_GROUPS;
+
+typedef struct _TOKEN_PRIVILEGES
+{
+    ULONG PrivilegeCount;
+    LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
+} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
+
+typedef struct _TOKEN_USER
+{
+    SID_AND_ATTRIBUTES User;
+} TOKEN_USER, *PTOKEN_USER;
+
+typedef enum _TOKEN_INFORMATION_CLASS
+{
+    TokenUser = 1,
+    TokenGroups,
+    TokenPrivileges,
+    TokenOwner,
+    TokenPrimaryGroup,
+    TokenDefaultDacl,
+    TokenSource,
+    TokenType,
+    TokenImpersonationLevel,
+    TokenStatistics,
+    TokenRestrictedSids,
+    TokenSessionId,
+    TokenGroupsAndPrivileges,
+    TokenSessionReference,
+    TokenSandBoxInert,
+    TokenAuditPolicy,
+    TokenOrigin,
+    TokenElevationType,
+    TokenLinkedToken,
+    TokenElevation,
+    TokenIsRestricted,
+    TokenAccessInformation,
+    TokenVirtualization,
+    TokenIntegrityLevel,
+    TokenIntegrityLevelDesktop,
+    TokenMandatoryPolicy,
+    MaxTokenInfoClass
+} TOKEN_INFORMATION_CLASS, *PTOKEN_INFORMATION_CLASS;
+
+typedef struct _TOKEN_OWNER
+{
+    PSID Owner;
+} TOKEN_OWNER, *PTOKEN_OWNER;
+
+typedef struct _TOKEN_PRIMARY_GROUP
+{
+    PSID PrimaryGroup;
+} TOKEN_PRIMARY_GROUP, *PTOKEN_PRIMARY_GROUP;
+
+typedef struct _TOKEN_DEFAULT_DACL
+{
+    PACL DefaultDacl;
+} TOKEN_DEFAULT_DACL, *PTOKEN_DEFAULT_DACL;
+
+//
+// Heap flags
+//
+#define HEAP_NO_SERIALIZE               0x00000001
+#define HEAP_GROWABLE                   0x00000002
+#define HEAP_GENERATE_EXCEPTIONS        0x00000004
+#define HEAP_ZERO_MEMORY                0x00000008
+#define HEAP_REALLOC_IN_PLACE_ONLY      0x00000010
+#define HEAP_TAIL_CHECKING_ENABLED      0x00000020
+#define HEAP_FREE_CHECKING_ENABLED      0x00000040
+#define HEAP_DISABLE_COALESCE_ON_FREE   0x00000080
+
+#define HEAP_CREATE_ALIGN_16            0x00010000
+#define HEAP_CREATE_ENABLE_TRACING      0x00020000
+#define HEAP_CREATE_ENABLE_EXECUTE      0x00040000
+
+#endif
+
+#endif // !NTOS_MODE_USER
+#endif // _NTIFS_