Major cleanup to rtlfuncs.h. Not yet perfect but much better organized.
Modified: trunk/reactos/include/ndk/rtlfuncs.h
Modified: trunk/reactos/lib/kernel32/k32.h
Modified: trunk/reactos/lib/kernel32/misc/lzexpand_main.c

Modified: trunk/reactos/include/ndk/rtlfuncs.h
--- trunk/reactos/include/ndk/rtlfuncs.h	2005-06-20 05:11:48 UTC (rev 16137)
+++ trunk/reactos/include/ndk/rtlfuncs.h	2005-06-20 05:36:32 UTC (rev 16138)
@@ -9,226 +9,118 @@
 #ifndef _RTLFUNCS_H
 #define _RTLFUNCS_H
 
+/* DEPENDENCIES **************************************************************/
 #include <ndk/rtltypes.h>
 #include <ndk/pstypes.h>
 
+/* PROTOTYPES ****************************************************************/
+
 /* FIXME: FILE NEEDS TO BE CLEANED UP AT THE END WHEN ALL THE FUNCTIONS HAVE BEEN ADDED */
 
-/*
- * VOID
- * InitializeListHead (
- *		PLIST_ENTRY	ListHead
- *		);
- *
- * FUNCTION: Initializes a double linked list
- * ARGUMENTS:
- *         ListHead = Caller supplied storage for the head of the list
- */
-static __inline VOID
+/* List Macros */
+static __inline 
+VOID
 InitializeListHead(
-	IN PLIST_ENTRY  ListHead)
+    IN PLIST_ENTRY  ListHead)
 {
-	ListHead->Flink = ListHead->Blink = ListHead;
+    ListHead->Flink = ListHead->Blink = ListHead;
 }
 
-
-/*
- * VOID
- * InsertHeadList (
- *		PLIST_ENTRY	ListHead,
- *		PLIST_ENTRY	Entry
- *		);
- *
- * FUNCTION: Inserts an entry in a double linked list
- * ARGUMENTS:
- *        ListHead = Head of the list
- *        Entry = Entry to insert
- */
-static __inline VOID
+static __inline 
+VOID
 InsertHeadList(
-	IN PLIST_ENTRY  ListHead,
-	IN PLIST_ENTRY  Entry)
+    IN PLIST_ENTRY  ListHead,
+    IN PLIST_ENTRY  Entry)
 {
-	PLIST_ENTRY OldFlink;
-	OldFlink = ListHead->Flink;
-	Entry->Flink = OldFlink;
-	Entry->Blink = ListHead;
-	OldFlink->Blink = Entry;
-	ListHead->Flink = Entry;
+    PLIST_ENTRY OldFlink;
+    OldFlink = ListHead->Flink;
+    Entry->Flink = OldFlink;
+    Entry->Blink = ListHead;
+    OldFlink->Blink = Entry;
+    ListHead->Flink = Entry;
 }
 
-
-/*
- * VOID
- * InsertTailList (
- *		PLIST_ENTRY	ListHead,
- *		PLIST_ENTRY	Entry
- *		);
- *
- * FUNCTION:
- *	Inserts an entry in a double linked list
- *
- * ARGUMENTS:
- *	ListHead = Head of the list
- *	Entry = Entry to insert
- */
-static __inline VOID
+static __inline 
+VOID
 InsertTailList(
-	IN PLIST_ENTRY  ListHead,
-	IN PLIST_ENTRY  Entry)
+    IN PLIST_ENTRY  ListHead,
+    IN PLIST_ENTRY  Entry)
 {
-	PLIST_ENTRY OldBlink;
-	OldBlink = ListHead->Blink;
-	Entry->Flink = ListHead;
-	Entry->Blink = OldBlink;
-	OldBlink->Flink = Entry;
-	ListHead->Blink = Entry;
+    PLIST_ENTRY OldBlink;
+    OldBlink = ListHead->Blink;
+    Entry->Flink = ListHead;
+    Entry->Blink = OldBlink;
+    OldBlink->Flink = Entry;
+    ListHead->Blink = Entry;
 }
 
-/*
- * BOOLEAN
- * IsListEmpty (
- *	PLIST_ENTRY	ListHead
- *	);
- *
- * FUNCTION:
- *	Checks if a double linked list is empty
- *
- * ARGUMENTS:
- *	ListHead = Head of the list
-*/
 #define IsListEmpty(ListHead) \
-	((ListHead)->Flink == (ListHead))
+    ((ListHead)->Flink == (ListHead))
 
-
-/*
- * PSINGLE_LIST_ENTRY
- * PopEntryList (
- *	PSINGLE_LIST_ENTRY	ListHead
- *	);
- *
- * FUNCTION:
- *	Removes an entry from the head of a single linked list
- *
- * ARGUMENTS:
- *	ListHead = Head of the list
- *
- * RETURNS:
- *	The removed entry
- */
 #define PopEntryList(ListHead) \
-	(ListHead)->Next; \
-	{ \
-		PSINGLE_LIST_ENTRY _FirstEntry; \
-		_FirstEntry = (ListHead)->Next; \
-		if (_FirstEntry != NULL) \
-			(ListHead)->Next = _FirstEntry->Next; \
-	}
+    (ListHead)->Next; \
+    { \
+        PSINGLE_LIST_ENTRY _FirstEntry; \
+        _FirstEntry = (ListHead)->Next; \
+        if (_FirstEntry != NULL) \
+            (ListHead)->Next = _FirstEntry->Next; \
+    }
 
 #define PushEntryList(_ListHead, _Entry) \
-	(_Entry)->Next = (_ListHead)->Next; \
-	(_ListHead)->Next = (_Entry); \
+    (_Entry)->Next = (_ListHead)->Next; \
+    (_ListHead)->Next = (_Entry); \
 
-/*
- *BOOLEAN
- *RemoveEntryList (
- *	PLIST_ENTRY	Entry
- *	);
- *
- * FUNCTION:
- *	Removes an entry from a double linked list
- *
- * ARGUMENTS:
- *	ListEntry = Entry to remove
- */
-static __inline BOOLEAN
+static __inline 
+BOOLEAN
 RemoveEntryList(
-  IN PLIST_ENTRY  Entry)
+    IN PLIST_ENTRY  Entry)
 {
-  PLIST_ENTRY OldFlink;
-  PLIST_ENTRY OldBlink;
+    PLIST_ENTRY OldFlink;
+    PLIST_ENTRY OldBlink;
 
-  OldFlink = Entry->Flink;
-  OldBlink = Entry->Blink;
-  OldFlink->Blink = OldBlink;
-  OldBlink->Flink = OldFlink;
-  return (OldFlink == OldBlink);
+    OldFlink = Entry->Flink;
+    OldBlink = Entry->Blink;
+    OldFlink->Blink = OldBlink;
+    OldBlink->Flink = OldFlink;
+    return (OldFlink == OldBlink);
 }
 
-
-/*
- * PLIST_ENTRY
- * RemoveHeadList (
- *	PLIST_ENTRY	ListHead
- *	);
- *
- * FUNCTION:
- *	Removes the head entry from a double linked list
- *
- * ARGUMENTS:
- *	ListHead = Head of the list
- *
- * RETURNS:
- *	The removed entry
- */
-static __inline PLIST_ENTRY 
+static __inline 
+PLIST_ENTRY 
 RemoveHeadList(
-  IN PLIST_ENTRY  ListHead)
+    IN PLIST_ENTRY  ListHead)
 {
-  PLIST_ENTRY Flink;
-  PLIST_ENTRY Entry;
+    PLIST_ENTRY Flink;
+    PLIST_ENTRY Entry;
 
-  Entry = ListHead->Flink;
-  Flink = Entry->Flink;
-  ListHead->Flink = Flink;
-  Flink->Blink = ListHead;
-  return Entry;
+    Entry = ListHead->Flink;
+    Flink = Entry->Flink;
+    ListHead->Flink = Flink;
+    Flink->Blink = ListHead;
+    return Entry;
 }
 
-
-/*
- * PLIST_ENTRY
- * RemoveTailList (
- *	PLIST_ENTRY	ListHead
- *	);
- *
- * FUNCTION:
- *	Removes the tail entry from a double linked list
- *
- * ARGUMENTS:
- *	ListHead = Head of the list
- *
- * RETURNS:
- *	The removed entry
- */
-static __inline PLIST_ENTRY
+static __inline 
+PLIST_ENTRY
 RemoveTailList(
-  IN PLIST_ENTRY  ListHead)
+    IN PLIST_ENTRY  ListHead)
 {
-  PLIST_ENTRY Blink;
-  PLIST_ENTRY Entry;
+    PLIST_ENTRY Blink;
+    PLIST_ENTRY Entry;
 
-  Entry = ListHead->Blink;
-  Blink = Entry->Blink;
-  ListHead->Blink = Blink;
-  Blink->Flink = ListHead;
-  return Entry;
+    Entry = ListHead->Blink;
+    Blink = Entry->Blink;
+    ListHead->Blink = Blink;
+    Blink->Flink = ListHead;
+    return Entry;
 }
 
-/*
- * BOOLEAN
- * IsXstEntry (
- *  PLIST_ENTRY ListHead,
- *  PLIST_ENTRY Entry
- *  );
-*/
-#define IsFirstEntry(ListHead, Entry) ((ListHead)->Flink == Entry)
+#define IsFirstEntry(ListHead, Entry) \
+    ((ListHead)->Flink == Entry)
   
-#define IsLastEntry(ListHead, Entry) ((ListHead)->Blink == Entry)
-
-                      
-#define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
-
+#define IsLastEntry(ListHead, Entry) \
+    ((ListHead)->Blink == Entry)
+    
 #define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
 {\
   PLIST_ENTRY current;\
@@ -247,7 +139,6 @@
   InsertTailList(current, &((NewEntry)->ListEntryField));\
 }
 
-
 #define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
 {\
   PLIST_ENTRY current;\
@@ -266,7 +157,6 @@
   InsertTailList(current, &((NewEntry)->ListEntryField));\
 }
 
-
 #define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
 {\
   PLIST_ENTRY current;\
@@ -285,7 +175,6 @@
   InsertTailList(current, &((NewEntry)->ListEntryField));\
 }
 
-
 #define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
 {\
   PLIST_ENTRY current;\
@@ -304,19 +193,128 @@
   InsertTailList(current, &((NewEntry)->ListEntryField));\
 }
 
+/*
+ * Debug Functions 
+ */
+
 ULONG
 CDECL
 DbgPrint(
-  IN PCH  Format,
-  IN ...);
+    IN PCH  Format,
+    IN ...
+);
 
 VOID
 STDCALL
 DbgBreakPoint(VOID);
 
+VOID
+STDCALL
+RtlAssert(
+    PVOID FailedAssertion,
+    PVOID FileName,
+    ULONG LineNumber,
+    PCHAR Message
+);
+
+ULONG
+STDCALL
+RtlNtStatusToDosError(IN NTSTATUS Status);
+
+VOID
+STDCALL
+RtlRaiseException(IN PEXCEPTION_RECORD ExceptionRecord);
+
+VOID 
+STDCALL 
+RtlRaiseStatus(NTSTATUS Status);
+
+VOID
+STDCALL
+RtlUnwind(
+  PEXCEPTION_REGISTRATION RegistrationFrame,
+  PVOID ReturnAddress,
+  PEXCEPTION_RECORD ExceptionRecord,
+  DWORD EaxValue
+);
+
+/*
+ * Heap Functions 
+ */
+ 
+PVOID
+STDCALL
+RtlAllocateHeap(
+    IN HANDLE HeapHandle,
+    IN ULONG Flags,
+    IN ULONG Size
+);
+
+PVOID
+STDCALL
+RtlCreateHeap(
+    IN ULONG Flags,
+    IN PVOID BaseAddress OPTIONAL,
+    IN ULONG SizeToReserve OPTIONAL,
+    IN ULONG SizeToCommit OPTIONAL,
+    IN PVOID Lock OPTIONAL,
+    IN PRTL_HEAP_DEFINITION Definition OPTIONAL
+);
+
+HANDLE 
+STDCALL
+RtlDestroyHeap(HANDLE hheap);
+
+BOOLEAN
+STDCALL
+RtlFreeHeap(
+    IN HANDLE HeapHandle,
+    IN ULONG Flags,
+    IN PVOID P
+);
+
+PVOID 
+STDCALL
+RtlReAllocateHeap(
+    HANDLE Heap,
+    ULONG Flags,
+    PVOID Ptr,
+    ULONG Size
+);
+
+BOOLEAN 
+STDCALL
+RtlLockHeap(IN HANDLE Heap);
+
+BOOLEAN 
+STDCALL
+RtlUnlockHeap(IN HANDLE Heap);
+
+ULONG 
+STDCALL
+RtlSizeHeap(
+    IN PVOID HeapHandle, 
+    IN ULONG Flags, 
+    IN PVOID MemoryPointer
+);
+    
+BOOLEAN 
+STDCALL
+RtlValidateHeap(
+    HANDLE Heap,
+    ULONG Flags,
+    PVOID pmem
+);
+
+#define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
+
+
+/*
+ * Security Functions
+ */
 NTSTATUS
 STDCALL
-RtlAbsoluteToSelfRelativeSD (
+RtlAbsoluteToSelfRelativeSD(
     IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
     IN OUT PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor,
     IN PULONG BufferLength
@@ -324,7 +322,7 @@
 
 NTSTATUS
 STDCALL
-RtlAddAccessAllowedAce (
+RtlAddAccessAllowedAce(
     PACL Acl,
     ULONG Revision,
     ACCESS_MASK AccessMask,
@@ -333,7 +331,7 @@
             
 NTSTATUS
 STDCALL
-RtlAllocateAndInitializeSid (
+RtlAllocateAndInitializeSid(
     IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
     IN UCHAR SubAuthorityCount,
     IN ULONG SubAuthority0,
@@ -347,47 +345,8 @@
     OUT PSID *Sid
 );
 
-PVOID
-STDCALL
-RtlAllocateHeap (
-    IN HANDLE  HeapHandle,
-    IN ULONG   Flags,
-    IN ULONG   Size
-);
-
-NTSTATUS
-STDCALL
-RtlAppendUnicodeToString (
-    PUNICODE_STRING Destination,
-    PCWSTR Source
-);
-
-NTSTATUS
-STDCALL
-RtlAppendUnicodeStringToString (
-    PUNICODE_STRING	Destination,
-    PUNICODE_STRING	Source
-);
-
-NTSTATUS
-STDCALL
-RtlAddAtomToAtomTable (
-    IN PRTL_ATOM_TABLE AtomTable,
-    IN PWSTR AtomName,
-    OUT PRTL_ATOM Atom
-);
-
 VOID
 STDCALL
-RtlAssert (
-	PVOID FailedAssertion,
-	PVOID FileName,
-	ULONG LineNumber,
-	PCHAR Message
-	);
-
-VOID
-STDCALL
 RtlCopyLuid(
     IN PLUID LuidDest,
     IN PLUID LuidSrc
@@ -413,73 +372,22 @@
     PULONG RemainingSidAreaSize
 );
 
-SIZE_T 
-STDCALL
-RtlCompareMemory(IN const VOID *Source1,
-                 IN const VOID *Source2,
-                 IN SIZE_T Length);
-                 
-LONG
-STDCALL
-RtlCompareUnicodeString (
-    PUNICODE_STRING String1,
-    PUNICODE_STRING String2,
-    BOOLEAN CaseInsensitive
-);
-    
-BOOLEAN
-STDCALL
-RtlEqualUnicodeString (
-    PCUNICODE_STRING String1,
-    PCUNICODE_STRING String2,
-    BOOLEAN CaseInsensitive
-);
-                 
-VOID
-STDCALL
-RtlAcquirePebLock (
-	VOID
-	);
-
-VOID
-STDCALL
-RtlReleasePebLock (
-	VOID
-	);
-
 NTSTATUS
 STDCALL
-RtlCompressBuffer (
-    IN USHORT   CompressionFormatAndEngine,
-    IN PUCHAR   UncompressedBuffer,
-    IN ULONG    UncompressedBufferSize,
-    OUT PUCHAR  CompressedBuffer,
-    IN ULONG    CompressedBufferSize,
-    IN ULONG    UncompressedChunkSize,
-    OUT PULONG  FinalCompressedSize,
-    IN PVOID    WorkSpace
-);
-
-NTSTATUS
-STDCALL
-RtlConvertSidToUnicodeString (
+RtlConvertSidToUnicodeString(
     OUT PUNICODE_STRING DestinationString,
-    IN PSID             Sid,
-    IN BOOLEAN          AllocateDestinationString
+    IN PSID Sid,
+    IN BOOLEAN AllocateDestinationString
 );
 
 NTSTATUS
 STDCALL
-RtlCopySid (
-    IN ULONG   Length,
-    IN PSID    Destination,
-    IN PSID    Source
+RtlCopySid(
+    IN ULONG Length,
+    IN PSID Destination,
+    IN PSID Source
 );
 
-VOID STDCALL
-RtlCopyUnicodeString(PUNICODE_STRING DestinationString,
-		     PUNICODE_STRING SourceString);
-             
 NTSTATUS
 STDCALL
 RtlCreateAcl(
@@ -488,535 +396,525 @@
     ULONG AclRevision
 );
 
-PVOID
-STDCALL
-RtlCreateHeap(
-    IN ULONG Flags,
-    IN PVOID BaseAddress OPTIONAL,
-    IN ULONG SizeToReserve OPTIONAL,
-    IN ULONG SizeToCommit OPTIONAL,
-    IN PVOID Lock OPTIONAL,
-    IN PRTL_HEAP_DEFINITION Definition OPTIONAL
-);
-          
 NTSTATUS
 STDCALL
-RtlCreateAtomTable(
-    IN ULONG TableSize,
-    IN OUT PRTL_ATOM_TABLE *AtomTable
-);
-
-NTSTATUS
-STDCALL
 RtlCreateSecurityDescriptor(
     PSECURITY_DESCRIPTOR SecurityDescriptor,
     ULONG Revision
 );
 
-NTSTATUS STDCALL
+NTSTATUS 
+STDCALL
 RtlCreateSecurityDescriptorRelative(
     PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
     ULONG Revision
 );
 
-NTSTATUS
+BOOLEAN
 STDCALL
-RtlCreateUserThread (
-    IN HANDLE ProcessHandle,
-    IN PSECURITY_DESCRIPTOR SecurityDescriptor,
-    IN BOOLEAN CreateSuspended,
-    IN LONG StackZeroBits,
-    IN OUT PULONG StackReserve,
-    IN OUT PULONG StackCommit,
-    IN PTHREAD_START_ROUTINE StartAddress,
-    IN PVOID Parameter,
-    IN OUT PHANDLE ThreadHandle,
-    IN OUT PCLIENT_ID ClientId
+RtlEqualSid (
+    IN PSID Sid1,
+    IN PSID Sid2
 );
 
-BOOLEAN
+PVOID
 STDCALL
-RtlCreateUnicodeString(
-    OUT PUNICODE_STRING DestinationString,
-    IN PCWSTR           SourceString
+RtlFreeSid (
+    IN PSID Sid
 );
 
 NTSTATUS
 STDCALL
-RtlDecompressBuffer (
-    IN USHORT   CompressionFormat,
-    OUT PUCHAR  UncompressedBuffer,
-    IN ULONG    UncompressedBufferSize,
-    IN PUCHAR   CompressedBuffer,
-    IN ULONG    CompressedBufferSize,
-    OUT PULONG  FinalUncompressedSize
+RtlGetDaclSecurityDescriptor(
+    IN PSECURITY_DESCRIPTOR SecurityDescriptor,
+    OUT PBOOLEAN DaclPresent,
+    OUT PACL *Dacl,
+    OUT PBOOLEAN DaclDefaulted
 );
 
 NTSTATUS
 STDCALL
-RtlExpandEnvironmentStrings_U (
-    PWSTR Environment,
-    PUNICODE_STRING Source,
-    PUNICODE_STRING Destination,
-    PULONG Length
+RtlGetSaclSecurityDescriptor(
+    PSECURITY_DESCRIPTOR SecurityDescriptor,
+    PBOOLEAN SaclPresent,
+    PACL* Sacl,
+    PBOOLEAN SaclDefaulted
 );
 
-PRTL_USER_PROCESS_PARAMETERS
+NTSTATUS
 STDCALL
-RtlDeNormalizeProcessParams (
-    IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters
+RtlGetGroupSecurityDescriptor(
+    IN PSECURITY_DESCRIPTOR SecurityDescriptor,
+    OUT PSID *Group,
+    OUT PBOOLEAN GroupDefaulted
 );
 
-PRTL_USER_PROCESS_PARAMETERS
+NTSTATUS
 STDCALL
-RtlNormalizeProcessParams (
-    IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters
+RtlGetOwnerSecurityDescriptor(
+    IN PSECURITY_DESCRIPTOR SecurityDescriptor,
+    OUT PSID *Owner,
+    OUT PBOOLEAN OwnerDefaulted
 );
 
 NTSTATUS
 STDCALL
-RtlDeleteAtomFromAtomTable (
-	IN PRTL_ATOM_TABLE AtomTable,
-	IN RTL_ATOM Atom
+RtlInitializeSid(
+    IN OUT PSID Sid,
+    IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
+    IN UCHAR SubAuthorityCount
 );
 
+ULONG
+STDCALL
+RtlLengthRequiredSid(IN UCHAR SubAuthorityCount);
+
+ULONG
+STDCALL
+RtlLengthSid(IN PSID Sid);
+
+#if (VER_PRODUCTBUILD >= 2195)
+
 NTSTATUS
 STDCALL
-RtlDeleteCriticalSection (
-     PRTL_CRITICAL_SECTION CriticalSection
+RtlSelfRelativeToAbsoluteSD(
+    IN PSECURITY_DESCRIPTOR SelfRelativeSD,
+    OUT PSECURITY_DESCRIPTOR AbsoluteSD,
+    IN PULONG AbsoluteSDSize,
+    IN PACL Dacl,
+    IN PULONG DaclSize,
+    IN PACL Sacl,
+    IN PULONG SaclSize,
+    IN PSID Owner,
+    IN PULONG OwnerSize,
+    IN PSID PrimaryGroup,
+    IN PULONG PrimaryGroupSize
 );
 
-NTSTATUS 
+#endif /* (VER_PRODUCTBUILD >= 2195) */
+
+NTSTATUS
 STDCALL
-RtlDestroyAtomTable (
-	IN PRTL_ATOM_TABLE AtomTable
+RtlSetDaclSecurityDescriptor (
+    PSECURITY_DESCRIPTOR SecurityDescriptor,
+    BOOLEAN DaclPresent,
+    PACL Dacl,
+    BOOLEAN DaclDefaulted
 );
 
 NTSTATUS
 STDCALL
-RtlEnterCriticalSection (
-     PRTL_CRITICAL_SECTION CriticalSection
+RtlSetGroupSecurityDescriptor(
+    IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
+    IN PSID Group,
+    IN BOOLEAN GroupDefaulted
 );
 
-NTSTATUS 
+NTSTATUS
 STDCALL
-RtlInitializeCriticalSection (
-     PRTL_CRITICAL_SECTION CriticalSection
+RtlSetOwnerSecurityDescriptor(
+    IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
+    IN PSID Owner,
+    IN BOOLEAN OwnerDefaulted
 );
 
 NTSTATUS
 STDCALL
-RtlLeaveCriticalSection (
-     PRTL_CRITICAL_SECTION CriticalSection
+RtlSetSaclSecurityDescriptor(
+    IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
+    IN BOOLEAN SaclPresent,
+    IN PACL Sacl,
+    IN BOOLEAN SaclDefaulted
 );
 
-VOID
+PUCHAR
 STDCALL
-RtlInitializeBitMap(
-  IN PRTL_BITMAP  BitMapHeader,
-  IN PULONG  BitMapBuffer,
-  IN ULONG  SizeOfBitMap); 
-  
-BOOLEAN
+RtlSubAuthorityCountSid(
+    IN PSID Sid
+);
+
+PULONG
 STDCALL
-RtlAreBitsClear(
-  IN PRTL_BITMAP  BitMapHeader,
-  IN ULONG  StartingIndex,
-  IN ULONG  Length); 
+RtlSubAuthoritySid(
+    IN PSID Sid,
+    IN ULONG SubAuthority
+);
 
 BOOLEAN
 STDCALL
-RtlAreBitsSet(
-  IN PRTL_BITMAP  BitMapHeader,
-  IN ULONG  StartingIndex,
-  IN ULONG  Length); 
+RtlValidSid(IN PSID Sid);
 
-VOID
+BOOLEAN 
 STDCALL
-RtlClearBits (
-	IN	PRTL_BITMAP	BitMapHeader,
-	IN	ULONG		StartingIndex,
-	IN	ULONG		NumberToClear
-	);
+RtlValidAcl(PACL Acl);
 
-ULONG
+/*
+ * Single-Character Functions
+ */
+NTSTATUS 
 STDCALL
-RtlFindClearBits (
-	PRTL_BITMAP	BitMapHeader,
-	ULONG		NumberToFind,
-	ULONG		HintIndex
-	);
+RtlLargeIntegerToChar(
+    IN PLARGE_INTEGER Value,
+    IN ULONG Base,
+    IN ULONG Length,
+    IN OUT PCHAR String
+);
+    
+CHAR 
+STDCALL
+RtlUpperChar(CHAR Source);
 
-ULONG
+WCHAR
 STDCALL
-RtlFindClearBitsAndSet (
-	PRTL_BITMAP	BitMapHeader,
-	ULONG		NumberToFind,
-	ULONG		HintIndex
-	);
+RtlUpcaseUnicodeChar(WCHAR Source);
     
+WCHAR 
+STDCALL
+RtlDowncaseUnicodeChar(IN WCHAR Source);
+
 NTSTATUS
 STDCALL
-RtlMultiByteToUnicodeN (
-    PWCHAR UnicodeString,
-    ULONG  UnicodeSize,
-    PULONG ResultSize,
-    const PCHAR  MbString,
-    ULONG  MbSize
+RtlIntegerToChar(
+    IN ULONG Value,
+    IN ULONG Base,
+    IN ULONG Length,
+    IN OUT PCHAR String
 );
 
+NTSTATUS 
+STDCALL
+RtlIntegerToUnicode(
+    IN ULONG Value,
+    IN ULONG Base  OPTIONAL,
+    IN ULONG Length OPTIONAL,
+    IN OUT LPWSTR String
+);
+
 NTSTATUS
 STDCALL
-RtlMultiByteToUnicodeSize (
-    PULONG UnicodeSize,
-    PCHAR  MbString,
-    ULONG  MbSize
+RtlIntegerToUnicodeString(
+    IN ULONG Value,
+    IN ULONG Base,
+    IN OUT PUNICODE_STRING String
 );
 
-BOOLEAN
+NTSTATUS
 STDCALL
-RtlPrefixUnicodeString (
-	PUNICODE_STRING	String1,
-	PUNICODE_STRING	String2,
-	BOOLEAN		CaseInsensitive
-	);
+RtlCharToInteger(
+    PCSZ String,
+    ULONG Base,
+    PULONG Value
+);
     
-CHAR STDCALL
-RtlUpperChar (CHAR Source);
+USHORT 
+FASTCALL
+RtlUshortByteSwap(IN USHORT Source);
 
-WCHAR
+/*
+ * Unicode->Ansi String Functions 
+ */     
+ULONG
 STDCALL
-RtlUpcaseUnicodeChar (
-	WCHAR Source
-	);
-    
+RtlUnicodeStringToAnsiSize(IN PUNICODE_STRING UnicodeString);
+   
 NTSTATUS
 STDCALL
-RtlAnsiStringToUnicodeString (
-	PUNICODE_STRING	DestinationString,
-	PANSI_STRING	SourceString,
-	BOOLEAN		AllocateDestinationString
-	);
-    
-ULONG
+RtlUnicodeStringToAnsiString(
+    PANSI_STRING DestinationString,
+    PUNICODE_STRING SourceString,
+    BOOLEAN AllocateDestinationString
+);
+
+/*
+ * Unicode->OEM String Functions
+ */
+NTSTATUS
 STDCALL
-RtlAnsiStringToUnicodeSize (
-	PANSI_STRING	AnsiString
-	);
+RtlUpcaseUnicodeStringToOemString(
+    POEM_STRING DestinationString,
+    PUNICODE_STRING SourceString,
+    BOOLEAN AllocateDestinationString
+);
 
 NTSTATUS
 STDCALL
-RtlUnicodeToMultiByteN (
-	PCHAR	MbString,
-	ULONG	MbSize,
-	PULONG	ResultSize,
-	PWCHAR	UnicodeString,
-	ULONG	UnicodeSize
-	);
-    
-ULONG
+RtlUpcaseUnicodeStringToCountedOemString(
+    IN OUT POEM_STRING DestinationString,
+    IN PUNICODE_STRING SourceString,
+    IN BOOLEAN AllocateDestinationString
[truncated at 1000 lines; 1114 more skipped]