[NTIFS]
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 8 Mar 2010 22:30:14 +0000 (22:30 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 8 Mar 2010 22:30:14 +0000 (22:30 +0000)
- Group related definitions
- Add several Rtl* function declarations
- Add RTL_SYSTEM_VOLUME_INFORMATION_FOLDER, DEVICE_TYPE, FILE_DEVICE_*, METHOD_* and FILE_*_ACCESS definitions
- Add CTL_CODE, DEVICE_TYPE_FROM_CTL_CODE and METHOD_FROM_CTL_CODE macros

svn path=/branches/header-work/; revision=46018

include/ddk/ntifs.h

index 4909ffc..06b5254 100644 (file)
@@ -1484,6 +1484,94 @@ RtlAddAccessAllowedAce(
   IN ACCESS_MASK AccessMask,
   IN PSID Sid);
 
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlAddAccessAllowedAceEx(
+  IN OUT PACL Acl,
+  IN ULONG AceRevision,
+  IN ULONG AceFlags,
+  IN ACCESS_MASK AccessMask,
+  IN PSID Sid);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlCreateSecurityDescriptorRelative(
+  OUT PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
+  IN ULONG Revision);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlGetDaclSecurityDescriptor(
+  IN PSECURITY_DESCRIPTOR SecurityDescriptor,
+  OUT PBOOLEAN DaclPresent,
+  OUT PACL *Dacl,
+  OUT PBOOLEAN DaclDefaulted);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlSetOwnerSecurityDescriptor(
+  IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
+  IN PSID Owner OPTIONAL,
+  IN BOOLEAN OwnerDefaulted);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlGetOwnerSecurityDescriptor(
+  IN PSECURITY_DESCRIPTOR SecurityDescriptor,
+  OUT PSID *Owner,
+  OUT PBOOLEAN OwnerDefaulted);
+
+NTSYSAPI
+ULONG
+NTAPI
+RtlNtStatusToDosError(
+  IN NTSTATUS Status);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlCustomCPToUnicodeN(
+  IN PCPTABLEINFO CustomCP,
+  OUT PWCH UnicodeString,
+  IN ULONG MaxBytesInUnicodeString,
+  OUT PULONG BytesInUnicodeString OPTIONAL,
+  IN PCH CustomCPString,
+  IN ULONG BytesInCustomCPString);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlUnicodeToCustomCPN(
+  IN PCPTABLEINFO CustomCP,
+  OUT PCH CustomCPString,
+  IN ULONG MaxBytesInCustomCPString,
+  OUT PULONG BytesInCustomCPString OPTIONAL,
+  IN PWCH UnicodeString,
+  IN ULONG BytesInUnicodeString);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlUpcaseUnicodeToCustomCPN(
+  IN PCPTABLEINFO CustomCP,
+  OUT PCH CustomCPString,
+  IN ULONG MaxBytesInCustomCPString,
+  OUT PULONG BytesInCustomCPString OPTIONAL,
+  IN PWCH UnicodeString,
+  IN ULONG BytesInUnicodeString);
+
+NTSYSAPI
+VOID
+NTAPI
+RtlInitCodePageTable(
+  IN PUSHORT TableBase,
+  IN OUT PCPTABLEINFO CodePageTable);
+
 #endif
 
 #if (NTDDI_VERSION >= NTDDI_WINXP)
@@ -1643,6 +1731,18 @@ NTAPI
 RtlSubAuthorityCountSid(
   IN PSID Sid);
 
+NTSYSAPI
+ULONG
+NTAPI
+RtlNtStatusToDosErrorNoTeb(
+  IN NTSTATUS Status);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlCreateSystemVolumeInformationFolder(
+  IN PCUNICODE_STRING VolumeRootPath);
+
 #endif
 
 #if defined(_M_AMD64)
@@ -1718,6 +1818,46 @@ RtlGetSaclSecurityDescriptor(
   OUT PACL *Sacl,
   OUT PBOOLEAN SaclDefaulted);
 
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlSetGroupSecurityDescriptor(
+  IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
+  IN PSID Group OPTIONAL,
+  IN BOOLEAN GroupDefaulted OPTIONAL);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlGetGroupSecurityDescriptor(
+  IN PSECURITY_DESCRIPTOR SecurityDescriptor,
+  OUT PSID *Group,
+  OUT PBOOLEAN GroupDefaulted);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlAbsoluteToSelfRelativeSD(
+  IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
+  OUT PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor OPTIONAL,
+  IN OUT PULONG BufferLength);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlSelfRelativeToAbsoluteSD(
+  IN PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor,
+  OUT PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor OPTIONAL,
+  IN OUT PULONG AbsoluteSecurityDescriptorSize,
+  OUT PACL Dacl OPTIONAL,
+  IN OUT PULONG DaclSize,
+  OUT PACL Sacl OPTIONAL,
+  IN OUT PULONG SaclSize,
+  OUT PSID Owner OPTIONAL,
+  IN OUT PULONG OwnerSize,
+  OUT PSID PrimaryGroup OPTIONAL,
+  IN OUT PULONG PrimaryGroupSize);
+
 #endif
 
 #if (NTDDI_VERSION >= NTDDI_VISTA)
@@ -1779,6 +1919,13 @@ RtlCreateServiceSid(
   OUT PSID ServiceSid,
   IN OUT PULONG ServiceSidLength);
 
+NTSYSAPI
+LONG
+NTAPI
+RtlCompareAltitudes(
+  IN PCUNICODE_STRING Altitude1,
+  IN PCUNICODE_STRING Altitude2);
+
 #endif
 
 #if (NTDDI_VERSION >= NTDDI_WIN7)
@@ -1986,6 +2133,96 @@ typedef struct _COMPRESSED_DATA_INFO {
 
 #define MAX_UNICODE_STACK_BUFFER_LENGTH 256
 
+#define RTL_SYSTEM_VOLUME_INFORMATION_FOLDER    L"System Volume Information"
+
+#define DEVICE_TYPE ULONG
+
+#define FILE_DEVICE_BEEP                0x00000001
+#define FILE_DEVICE_CD_ROM              0x00000002
+#define FILE_DEVICE_CD_ROM_FILE_SYSTEM  0x00000003
+#define FILE_DEVICE_CONTROLLER          0x00000004
+#define FILE_DEVICE_DATALINK            0x00000005
+#define FILE_DEVICE_DFS                 0x00000006
+#define FILE_DEVICE_DISK                0x00000007
+#define FILE_DEVICE_DISK_FILE_SYSTEM    0x00000008
+#define FILE_DEVICE_FILE_SYSTEM         0x00000009
+#define FILE_DEVICE_INPORT_PORT         0x0000000a
+#define FILE_DEVICE_KEYBOARD            0x0000000b
+#define FILE_DEVICE_MAILSLOT            0x0000000c
+#define FILE_DEVICE_MIDI_IN             0x0000000d
+#define FILE_DEVICE_MIDI_OUT            0x0000000e
+#define FILE_DEVICE_MOUSE               0x0000000f
+#define FILE_DEVICE_MULTI_UNC_PROVIDER  0x00000010
+#define FILE_DEVICE_NAMED_PIPE          0x00000011
+#define FILE_DEVICE_NETWORK             0x00000012
+#define FILE_DEVICE_NETWORK_BROWSER     0x00000013
+#define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
+#define FILE_DEVICE_NULL                0x00000015
+#define FILE_DEVICE_PARALLEL_PORT       0x00000016
+#define FILE_DEVICE_PHYSICAL_NETCARD    0x00000017
+#define FILE_DEVICE_PRINTER             0x00000018
+#define FILE_DEVICE_SCANNER             0x00000019
+#define FILE_DEVICE_SERIAL_MOUSE_PORT   0x0000001a
+#define FILE_DEVICE_SERIAL_PORT         0x0000001b
+#define FILE_DEVICE_SCREEN              0x0000001c
+#define FILE_DEVICE_SOUND               0x0000001d
+#define FILE_DEVICE_STREAMS             0x0000001e
+#define FILE_DEVICE_TAPE                0x0000001f
+#define FILE_DEVICE_TAPE_FILE_SYSTEM    0x00000020
+#define FILE_DEVICE_TRANSPORT           0x00000021
+#define FILE_DEVICE_UNKNOWN             0x00000022
+#define FILE_DEVICE_VIDEO               0x00000023
+#define FILE_DEVICE_VIRTUAL_DISK        0x00000024
+#define FILE_DEVICE_WAVE_IN             0x00000025
+#define FILE_DEVICE_WAVE_OUT            0x00000026
+#define FILE_DEVICE_8042_PORT           0x00000027
+#define FILE_DEVICE_NETWORK_REDIRECTOR  0x00000028
+#define FILE_DEVICE_BATTERY             0x00000029
+#define FILE_DEVICE_BUS_EXTENDER        0x0000002a
+#define FILE_DEVICE_MODEM               0x0000002b
+#define FILE_DEVICE_VDM                 0x0000002c
+#define FILE_DEVICE_MASS_STORAGE        0x0000002d
+#define FILE_DEVICE_SMB                 0x0000002e
+#define FILE_DEVICE_KS                  0x0000002f
+#define FILE_DEVICE_CHANGER             0x00000030
+#define FILE_DEVICE_SMARTCARD           0x00000031
+#define FILE_DEVICE_ACPI                0x00000032
+#define FILE_DEVICE_DVD                 0x00000033
+#define FILE_DEVICE_FULLSCREEN_VIDEO    0x00000034
+#define FILE_DEVICE_DFS_FILE_SYSTEM     0x00000035
+#define FILE_DEVICE_DFS_VOLUME          0x00000036
+#define FILE_DEVICE_SERENUM             0x00000037
+#define FILE_DEVICE_TERMSRV             0x00000038
+#define FILE_DEVICE_KSEC                0x00000039
+#define FILE_DEVICE_FIPS                0x0000003A
+#define FILE_DEVICE_INFINIBAND          0x0000003B
+#define FILE_DEVICE_VMBUS               0x0000003E
+#define FILE_DEVICE_CRYPT_PROVIDER      0x0000003F
+#define FILE_DEVICE_WPD                 0x00000040
+#define FILE_DEVICE_BLUETOOTH           0x00000041
+#define FILE_DEVICE_MT_COMPOSITE        0x00000042
+#define FILE_DEVICE_MT_TRANSPORT        0x00000043
+#define FILE_DEVICE_BIOMETRIC           0x00000044
+#define FILE_DEVICE_PMI                 0x00000045
+
+#define CTL_CODE( DeviceType, Function, Method, Access ) (                 \
+    ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
+)
+#define DEVICE_TYPE_FROM_CTL_CODE(ctrlCode)     (((ULONG)(ctrlCode & 0xffff0000)) >> 16)
+#define METHOD_FROM_CTL_CODE(ctrlCode)          ((ULONG)(ctrlCode & 3))
+
+#define METHOD_BUFFERED                 0
+#define METHOD_IN_DIRECT                1
+#define METHOD_OUT_DIRECT               2
+#define METHOD_NEITHER                  3
+#define METHOD_DIRECT_TO_HARDWARE       METHOD_IN_DIRECT
+#define METHOD_DIRECT_FROM_HARDWARE     METHOD_OUT_DIRECT
+
+#define FILE_ANY_ACCESS                 0
+#define FILE_SPECIAL_ACCESS             (FILE_ANY_ACCESS)
+#define FILE_READ_ACCESS                ( 0x0001 )
+#define FILE_WRITE_ACCESS               ( 0x0002 )
+
 #pragma pack(push,4)
 
 #ifndef VER_PRODUCTBUILD
@@ -6098,15 +6335,6 @@ PsRevertToSelf (
     VOID
 );
 
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlAbsoluteToSelfRelativeSD (
-    IN PSECURITY_DESCRIPTOR              AbsoluteSecurityDescriptor,
-    IN OUT PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor,
-    IN PULONG                            BufferLength
-);
-
 NTSYSAPI
 VOID
 NTAPI
@@ -6117,41 +6345,6 @@ RtlGenerate8dot3Name (
     OUT PUNICODE_STRING             Name8dot3
 );
 
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlGetDaclSecurityDescriptor (
-    IN PSECURITY_DESCRIPTOR SecurityDescriptor,
-    OUT PBOOLEAN            DaclPresent,
-    OUT PACL                *Dacl,
-    OUT PBOOLEAN            DaclDefaulted
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlGetGroupSecurityDescriptor (
-    IN PSECURITY_DESCRIPTOR SecurityDescriptor,
-    OUT PSID                *Group,
-    OUT PBOOLEAN            GroupDefaulted
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlGetOwnerSecurityDescriptor (
-    IN PSECURITY_DESCRIPTOR SecurityDescriptor,
-    OUT PSID                *Owner,
-    OUT PBOOLEAN            OwnerDefaulted
-);
-
-NTSYSAPI
-ULONG
-NTAPI
-RtlNtStatusToDosError (
-    IN NTSTATUS Status
-);
-
 NTSYSAPI
 VOID
 NTAPI
@@ -6160,24 +6353,6 @@ RtlSecondsSince1970ToTime (
     OUT PLARGE_INTEGER  Time
 );
 
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlSetGroupSecurityDescriptor (
-    IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
-    IN PSID                     Group,
-    IN BOOLEAN                  GroupDefaulted
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlSetOwnerSecurityDescriptor (
-    IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
-    IN PSID                     Owner,
-    IN BOOLEAN                  OwnerDefaulted
-);
-
 NTSYSAPI
 NTSTATUS
 NTAPI