Add missing stuff to NDK
Modified: trunk/reactos/include/ndk/rtlfuncs.h
Modified: trunk/reactos/include/ndk/umtypes.h
Modified: trunk/reactos/include/ndk/zwtypes.h
Modified: trunk/reactos/include/reactos/helper.h
_____
Modified: trunk/reactos/include/ndk/rtlfuncs.h
--- trunk/reactos/include/ndk/rtlfuncs.h 2005-06-19 22:53:49 UTC
(rev 16127)
+++ trunk/reactos/include/ndk/rtlfuncs.h 2005-06-19 23:59:40 UTC
(rev 16128)
@@ -332,6 +332,22 @@
PSID Sid
);
+NTSTATUS
+STDCALL
+RtlAllocateAndInitializeSid (
+ IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
+ IN UCHAR SubAuthorityCount,
+ IN ULONG SubAuthority0,
+ IN ULONG SubAuthority1,
+ IN ULONG SubAuthority2,
+ IN ULONG SubAuthority3,
+ IN ULONG SubAuthority4,
+ IN ULONG SubAuthority5,
+ IN ULONG SubAuthority6,
+ IN ULONG SubAuthority7,
+ OUT PSID *Sid
+);
+
PVOID
STDCALL
RtlAllocateHeap (
@@ -461,6 +477,10 @@
IN PSID Source
);
+VOID STDCALL
+RtlCopyUnicodeString(PUNICODE_STRING DestinationString,
+ PUNICODE_STRING SourceString);
+
NTSTATUS
STDCALL
RtlCreateAcl(
@@ -489,6 +509,19 @@
NTSTATUS
STDCALL
+RtlCreateSecurityDescriptor(
+ PSECURITY_DESCRIPTOR SecurityDescriptor,
+ ULONG Revision
+);
+
+NTSTATUS STDCALL
+RtlCreateSecurityDescriptorRelative(
+ PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
+ ULONG Revision
+);
+
+NTSTATUS
+STDCALL
RtlCreateUserThread (
IN HANDLE ProcessHandle,
IN PSECURITY_DESCRIPTOR SecurityDescriptor,
@@ -617,6 +650,14 @@
ULONG MbSize
);
+BOOLEAN
+STDCALL
+RtlPrefixUnicodeString (
+ PUNICODE_STRING String1,
+ PUNICODE_STRING String2,
+ BOOLEAN CaseInsensitive
+ );
+
CHAR STDCALL
RtlUpperChar (CHAR Source);
@@ -650,6 +691,14 @@
POEM_STRING AnsiString
);
+NTSTATUS
+STDCALL
+RtlOemStringToUnicodeString (
+ PUNICODE_STRING DestinationString,
+ POEM_STRING SourceString,
+ BOOLEAN AllocateDestinationString
+ );
+
PVOID
STDCALL
RtlImageDirectoryEntryToData (
@@ -720,6 +769,12 @@
IN PUNICODE_STRING UnicodeString
);
+ULONG
+STDCALL
+RtlUnicodeStringToOemSize (
+ IN PUNICODE_STRING UnicodeString
+ );
+
NTSTATUS
STDCALL
RtlUnicodeStringToAnsiString (
@@ -764,6 +819,12 @@
OUT PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry
);
+VOID
+STDCALL
+RtlFreeAnsiString (
+ IN PANSI_STRING AnsiString
+);
+
BOOLEAN
STDCALL
RtlFreeHeap (
@@ -772,6 +833,12 @@
IN PVOID P
);
+PVOID
+STDCALL
+RtlFreeSid (
+ IN PSID Sid
+);
+
VOID
STDCALL
RtlFreeUnicodeString(
@@ -902,6 +969,12 @@
IN OUT PUNICODE_STRING DestinationString,
IN PCWSTR SourceString);
+VOID
+STDCALL
+RtlInitAnsiString (
+ PANSI_STRING DestinationString,
+ PCSZ SourceString
+ );
BOOLEAN
STDCALL
@@ -985,6 +1058,15 @@
NTSTATUS
STDCALL
+RtlSetDaclSecurityDescriptor (
+ PSECURITY_DESCRIPTOR SecurityDescriptor,
+ BOOLEAN DaclPresent,
+ PACL Dacl,
+ BOOLEAN DaclDefaulted
+);
+
+NTSTATUS
+STDCALL
RtlSetGroupSecurityDescriptor (
IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
IN PSID Group,
_____
Modified: trunk/reactos/include/ndk/umtypes.h
--- trunk/reactos/include/ndk/umtypes.h 2005-06-19 22:53:49 UTC (rev
16127)
+++ trunk/reactos/include/ndk/umtypes.h 2005-06-19 23:59:40 UTC (rev
16128)
@@ -165,6 +165,25 @@
#define RTL_QUERY_REGISTRY_DIRECT 0x00000020
#define RTL_QUERY_REGISTRY_DELETE 0x00000040
+/* File Result Flags */
+#define FILE_SUPERSEDED 0x00000000
+#define FILE_OPENED 0x00000001
+#define FILE_CREATED 0x00000002
+#define FILE_OVERWRITTEN 0x00000003
+#define FILE_EXISTS 0x00000004
+#define FILE_DOES_NOT_EXIST 0x00000005
+
+/* Pipe Flags */
+#define FILE_PIPE_BYTE_STREAM_MODE 0x00000000
+#define FILE_PIPE_MESSAGE_MODE 0x00000001
+#define FILE_PIPE_QUEUE_OPERATION 0x00000000
+#define FILE_PIPE_COMPLETE_OPERATION 0x00000001
+#define FILE_PIPE_INBOUND 0x00000000
+#define FILE_PIPE_OUTBOUND 0x00000001
+#define FILE_PIPE_FULL_DUPLEX 0x00000002
+#define FILE_PIPE_CLIENT_END 0x00000000
+#define FILE_PIPE_SERVER_END 0x00000001
+
/* Device Charactertics */
#define FILE_REMOVABLE_MEDIA 0x00000001
@@ -749,6 +768,31 @@
LARGE_INTEGER BeyondFinalZero;
} FILE_ZERO_DATA_INFORMATION, *PFILE_ZERO_DATA_INFORMATION;
+typedef struct _FILE_EA_INFORMATION
+{
+ ULONG EaSize;
+} FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
+
+typedef struct _FILE_COMPRESSION_INFORMATION
+{
+ LARGE_INTEGER CompressedFileSize;
+ USHORT CompressionFormat;
+ UCHAR CompressionUnitShift;
+ UCHAR ChunkShift;
+ UCHAR ClusterShift;
+ UCHAR Reserved[3];
+} FILE_COMPRESSION_INFORMATION, *PFILE_COMPRESSION_INFORMATION;
+
+typedef struct _FILE_POSITION_INFORMATION
+{
+ LARGE_INTEGER CurrentByteOffset;
+} FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
+
+typedef struct _FILE_DISPOSITION_INFORMATION
+{
+ BOOLEAN DeleteFile;
+} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
+
typedef struct FILE_ALLOCATED_RANGE_BUFFER
{
LARGE_INTEGER FileOffset;
@@ -766,6 +810,112 @@
SID Sid;
} FILE_QUOTA_INFORMATION, *PFILE_QUOTA_INFORMATION;
+typedef struct _FILE_INTERNAL_INFORMATION
+{
+ LARGE_INTEGER IndexNumber;
+} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
+
+typedef struct _FILE_RENAME_INFORMATION
+{
+ BOOLEAN ReplaceIfExists;
+ HANDLE RootDirectory;
+ ULONG FileNameLength;
+ WCHAR FileName[1];
+} FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
+
+typedef struct _FILE_PIPE_INFORMATION
+{
+ ULONG ReadMode;
+ ULONG CompletionMode;
+} FILE_PIPE_INFORMATION, *PFILE_PIPE_INFORMATION;
+
+typedef struct _FILE_PIPE_LOCAL_INFORMATION
+{
+ ULONG NamedPipeType;
+ ULONG NamedPipeConfiguration;
+ ULONG MaximumInstances;
+ ULONG CurrentInstances;
+ ULONG InboundQuota;
+ ULONG ReadDataAvailable;
+ ULONG OutboundQuota;
+ ULONG WriteQuotaAvailable;
+ ULONG NamedPipeState;
+ ULONG NamedPipeEnd;
+} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
+
+typedef struct _FILE_PIPE_REMOTE_INFORMATION
+{
+ LARGE_INTEGER CollectDataTime;
+ ULONG MaximumCollectionCount;
+} FILE_PIPE_REMOTE_INFORMATION, *PFILE_PIPE_REMOTE_INFORMATION;
+
+typedef struct _FILE_MAILSLOT_QUERY_INFORMATION
+{
+ ULONG MaximumMessageSize;
+ ULONG MailslotQuota;
+ ULONG NextMessageSize;
+ ULONG MessagesAvailable;
+ LARGE_INTEGER ReadTimeout;
+} FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
+
+typedef struct _FILE_MAILSLOT_SET_INFORMATION
+{
+ LARGE_INTEGER ReadTimeout;
+} FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
+
+typedef struct _FILE_BOTH_DIR_INFORMATION
+{
+ ULONG NextEntryOffset;
+ ULONG FileIndex;
+ LARGE_INTEGER CreationTime;
+ LARGE_INTEGER LastAccessTime;
+ LARGE_INTEGER LastWriteTime;
+ LARGE_INTEGER ChangeTime;
+ LARGE_INTEGER EndOfFile;
+ LARGE_INTEGER AllocationSize;
+ ULONG FileAttributes;
+ ULONG FileNameLength;
+ ULONG EaSize;
+ CCHAR ShortNameLength;
+ WCHAR ShortName[12];
+ WCHAR FileName[1];
+} FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
+
+typedef struct _FILE_COMPLETION_INFORMATION
+{
+ HANDLE Port;
+ PVOID Key;
+} FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
+
+typedef struct _FILE_LINK_INFORMATION
+{
+ BOOLEAN ReplaceIfExists;
+ HANDLE RootDirectory;
+ ULONG FileNameLength;
+ WCHAR FileName[1];
+} FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION;
+
+typedef struct _FILE_NAME_INFORMATION
+{
+ ULONG FileNameLength;
+ WCHAR FileName[1];
+} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
+
+typedef struct _FILE_ALLOCATION_INFORMATION
+{
+ LARGE_INTEGER AllocationSize;
+} FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
+
+typedef struct _FILE_END_OF_FILE_INFORMATION
+{
+ LARGE_INTEGER EndOfFile;
+} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
+
+typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION
+{
+ LARGE_INTEGER ValidDataLength;
+} FILE_VALID_DATA_LENGTH_INFORMATION,
*PFILE_VALID_DATA_LENGTH_INFORMATION;
+
/*
* File System
*/
@@ -775,6 +925,15 @@
ULONG Characteristics;
} FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION;
+typedef struct _FILE_FS_VOLUME_INFORMATION
+{
+ LARGE_INTEGER VolumeCreationTime;
+ ULONG VolumeSerialNumber;
+ ULONG VolumeLabelLength;
+ BOOLEAN SupportsObjects;
+ WCHAR VolumeLabel[1];
+} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
+
/*
* Registry Key Value
*/
@@ -845,7 +1004,24 @@
ULONG InheritedFromUniqueProcessId;
} PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
+/* File Pipe Structures for the FSCTLs */
+typedef struct _FILE_PIPE_WAIT_FOR_BUFFER
+{
+ LARGE_INTEGER Timeout;
+ ULONG NameLength;
+ BOOLEAN TimeoutSpecified;
+ WCHAR Name[1];
+} FILE_PIPE_WAIT_FOR_BUFFER, *PFILE_PIPE_WAIT_FOR_BUFFER;
+typedef struct _FILE_PIPE_PEEK_BUFFER
+{
+ ULONG NamedPipeState;
+ ULONG ReadDataAvailable;
+ ULONG NumberOfMessages;
+ ULONG MessageLength;
+ CHAR Data[1];
+} FILE_PIPE_PEEK_BUFFER, *PFILE_PIPE_PEEK_BUFFER;
+
/* The Kerner/User Shared Data Structure */
typedef struct _KUSER_SHARED_DATA
{
_____
Modified: trunk/reactos/include/ndk/zwtypes.h
--- trunk/reactos/include/ndk/zwtypes.h 2005-06-19 22:53:49 UTC (rev
16127)
+++ trunk/reactos/include/ndk/zwtypes.h 2005-06-19 23:59:40 UTC (rev
16128)
@@ -281,6 +281,15 @@
} ATOM_TABLE_INFORMATION, *PATOM_TABLE_INFORMATION;
/*
+ * Object Directory
+ */
+typedef struct _OBJECT_DIRECTORY_INFORMATION
+{
+ UNICODE_STRING ObjectName;
+ UNICODE_STRING ObjectTypeName;
+} OBJECT_DIRECTORY_INFORMATION, *POBJECT_DIRECTORY_INFORMATION;
+
+/*
* Memory
*/
_____
Modified: trunk/reactos/include/reactos/helper.h
--- trunk/reactos/include/reactos/helper.h 2005-06-19 22:53:49 UTC
(rev 16127)
+++ trunk/reactos/include/reactos/helper.h 2005-06-19 23:59:40 UTC
(rev 16128)
@@ -34,4 +34,11 @@
#define NT_SEVERITY(StatCode) (((StatCode) >> NTSTAT_SEVERITY_SHIFT) &
NTSTAT_SEVERITY_MASK)
#define NT_FACILITY(StatCode) (((StatCode) >> NTSTAT_FACILITY_SHIFT) &
NTSTAT_FACILITY_MASK)
#define NT_CUSTOMER(StatCode) ((StatCode) & NTSTAT_CUSTOMER_MASK)
+#define RELATIVE_TIME(wait) (-(wait))
+#define NANOS_TO_100NS(nanos) (((LONGLONG)(nanos)) / 100)
+#define MICROS_TO_100NS(micros) (((LONGLONG)(micros)) *
NANOS_TO_100NS(1000))
+#define MILLIS_TO_100NS(milli) (((LONGLONG)(milli)) *
MICROS_TO_100NS(1000))
+#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) *
MILLIS_TO_100NS(1000))
+#define MINUTES_TO_100NS(minutes) (((LONGLONG)(minutes)) *
SECONDS_TO_100NS(60))
+#define HOURS_TO_100NS(hours) (((LONGLONG)(hours)) *
MINUTES_TO_100NS(60))
#endif