From a86b74f2fe2aac0d1de75c087328eec2b22ed66d Mon Sep 17 00:00:00 2001 From: Casper Hornstrup Date: Sat, 7 Jun 2003 16:16:39 +0000 Subject: [PATCH] 2003-06-07 Casper S. Hornstrup * include/ddk/dbgfuncs.h: Move ... * include/ntos/dbgfuncs.h: ... here. * include/basetsd.h (LONG32): Make it a long. * include/ntos.h: Include ntos/dbgfuncs.h. * include/ddk/dbgfuncs.h (DBG_STATUS_*, DBG_GET_SHOW_*): Move to include/ntos/dbgfuncs.h. * include/ddk/exfuncs.h (ExNotifyCallback): Match w32api prototype. (*BinaryTree, *SplayTree, *HashTable): Move to include/ntos/zw.h. * include/ddk/extypes.h (TRAVERSE_METHOD, PKEY_COMPARATOR, PTRAVERSE_ROUTINE, _BINARY_TREE_NODE, BINARY_TREE, SPLAY_TREE_NODE, SPLAY_TREE, HASH_TABLE): Move to include/ntos/zwtypes.h. * include/ddk/status.h (STATUS_PATH_SYNTAX_BAD): Rename to STATUS_OBJECT_PATH_SYNTAX_BAD. * apps/utils/objdir/objdir.c (StatusToName): Change STATUS_PATH_SYNTAX_BAD to STATUS_OBJECT_PATH_SYNTAX_BAD. * ntoskrnl/dbg/errinfo.c: Use STATUS_OBJECT_PATH_SYNTAX_BAD. * include/ntos/rtl.h (RtlQueryRegistryValues, RtlWriteRegistryValue, RtlDeleteRegistryValue): Match w32api prototypes. * include/ntos/zw.h (ZwQuerySystemTime): Ditto. * lib/kernel32/file/cnotify.c (FindFirstChangeNotificationW): Use STATUS_OBJECT_PATH_SYNTAX_BAD. * lib/ntdll/rtl/registry.c (RtlDeleteRegistryValue, RtlQueryRegistryValues, RtlWriteRegistryValue): Match w32api prototypes. * ntoskrnl/cm/cm.h, ntoskrnl/cm/ntfunc.c, ntoskrnl/cm/regfile.c: Change FILETIME to LARGE_INTEGER. * ntoskrnl/cm/rtlfunc.c (RtlDeleteRegistryValue, RtlQueryRegistryValues, RtlWriteRegistryValue): Match w32api prototypes. * ntoskrnl/ex/callback.c (ExNotifyCallback): Ditto. * ntoskrnl/ex/time.c (NtQuerySystemTime): Ditto. svn path=/trunk/; revision=4870 --- reactos/ChangeLog | 32 ++++ reactos/apps/utils/objdir/objdir.c | 4 +- reactos/include/basetsd.h | 2 +- reactos/include/ddk/dbgfuncs.h | 15 +- reactos/include/ddk/exfuncs.h | 96 +----------- reactos/include/ddk/extypes.h | 77 +--------- reactos/include/ddk/status.h | 20 +-- reactos/include/ntos.h | 4 +- reactos/include/ntos/rtl.h | 12 +- reactos/include/ntos/types.h | 18 +++ reactos/include/ntos/zw.h | 205 +++++++++++++++++++------ reactos/include/ntos/zwtypes.h | 77 +++++++++- reactos/lib/kernel32/file/cnotify.c | 4 +- reactos/lib/ntdll/rtl/registry.c | 12 +- reactos/ntoskrnl/cm/cm.h | 6 +- reactos/ntoskrnl/cm/ntfunc.c | 42 +++-- reactos/ntoskrnl/cm/regfile.c | 26 ++-- reactos/ntoskrnl/cm/rtlfunc.c | 16 +- reactos/ntoskrnl/dbg/dbgctrl.c | 2 +- reactos/ntoskrnl/dbg/errinfo.c | 9 +- reactos/ntoskrnl/ex/callback.c | 4 +- reactos/ntoskrnl/ex/time.c | 4 +- reactos/ntoskrnl/include/internal/ex.h | 4 +- reactos/ntoskrnl/ke/main.c | 5 +- 24 files changed, 379 insertions(+), 317 deletions(-) diff --git a/reactos/ChangeLog b/reactos/ChangeLog index 38acb6196b1..a8e6b25163b 100644 --- a/reactos/ChangeLog +++ b/reactos/ChangeLog @@ -1,3 +1,35 @@ +2003-06-07 Casper S. Hornstrup + + * include/ddk/dbgfuncs.h: Move ... + * include/ntos/dbgfuncs.h: ... here. + * include/basetsd.h (LONG32): Make it a long. + * include/ntos.h: Include ntos/dbgfuncs.h. + * include/ddk/dbgfuncs.h (DBG_STATUS_*, DBG_GET_SHOW_*): Move to + include/ntos/dbgfuncs.h. + * include/ddk/exfuncs.h (ExNotifyCallback): Match w32api prototype. + (*BinaryTree, *SplayTree, *HashTable): Move to include/ntos/zw.h. + * include/ddk/extypes.h (TRAVERSE_METHOD, PKEY_COMPARATOR, + PTRAVERSE_ROUTINE, _BINARY_TREE_NODE, BINARY_TREE, SPLAY_TREE_NODE, + SPLAY_TREE, HASH_TABLE): Move to include/ntos/zwtypes.h. + * include/ddk/status.h (STATUS_PATH_SYNTAX_BAD): Rename to + STATUS_OBJECT_PATH_SYNTAX_BAD. + * apps/utils/objdir/objdir.c (StatusToName): Change + STATUS_PATH_SYNTAX_BAD to STATUS_OBJECT_PATH_SYNTAX_BAD. + * ntoskrnl/dbg/errinfo.c: Use STATUS_OBJECT_PATH_SYNTAX_BAD. + * include/ntos/rtl.h (RtlQueryRegistryValues, RtlWriteRegistryValue, + RtlDeleteRegistryValue): Match w32api prototypes. + * include/ntos/zw.h (ZwQuerySystemTime): Ditto. + * lib/kernel32/file/cnotify.c (FindFirstChangeNotificationW): Use + STATUS_OBJECT_PATH_SYNTAX_BAD. + * lib/ntdll/rtl/registry.c (RtlDeleteRegistryValue, + RtlQueryRegistryValues, RtlWriteRegistryValue): Match w32api prototypes. + * ntoskrnl/cm/cm.h, ntoskrnl/cm/ntfunc.c, ntoskrnl/cm/regfile.c: Change + FILETIME to LARGE_INTEGER. + * ntoskrnl/cm/rtlfunc.c (RtlDeleteRegistryValue, RtlQueryRegistryValues, + RtlWriteRegistryValue): Match w32api prototypes. + * ntoskrnl/ex/callback.c (ExNotifyCallback): Ditto. + * ntoskrnl/ex/time.c (NtQuerySystemTime): Ditto. + 2003-06-07 Casper S. Hornstrup * hal/halx86/dma.c (AdapterObjects): Don't put braces on scalar diff --git a/reactos/apps/utils/objdir/objdir.c b/reactos/apps/utils/objdir/objdir.c index c8eaf4de094..477fff90b97 100644 --- a/reactos/apps/utils/objdir/objdir.c +++ b/reactos/apps/utils/objdir/objdir.c @@ -1,4 +1,4 @@ -/* $Id: objdir.c,v 1.10 2002/09/08 10:22:01 chorns Exp $ +/* $Id: objdir.c,v 1.11 2003/06/07 16:16:38 chorns Exp $ * * DESCRIPTION: Object Manager Simple Explorer * PROGRAMMER: David Welch @@ -75,7 +75,7 @@ StatusToName (NTSTATUS Status) return "STATUS_OBJECT_NAME_INVALID"; case STATUS_OBJECT_NAME_NOT_FOUND: return "STATUS_OBJECT_NAME_NOT_FOUND"; - case STATUS_PATH_SYNTAX_BAD: + case STATUS_OBJECT_PATH_SYNTAX_BAD: return "STATUS_PATH_SYNTAX_BAD"; case STATUS_NO_MORE_ENTRIES: return "STATUS_NO_MORE_ENTRIES"; diff --git a/reactos/include/basetsd.h b/reactos/include/basetsd.h index 65eec25e3f2..16ca870fa05 100644 --- a/reactos/include/basetsd.h +++ b/reactos/include/basetsd.h @@ -47,7 +47,7 @@ #ifdef __cplusplus extern "C" { #endif -typedef int LONG32, *PLONG32; +typedef long LONG32, *PLONG32; #ifndef XFree86Server typedef int INT32, *PINT32; #endif /* ndef XFree86Server */ diff --git a/reactos/include/ddk/dbgfuncs.h b/reactos/include/ddk/dbgfuncs.h index 8649d255766..c08e712e0af 100644 --- a/reactos/include/ddk/dbgfuncs.h +++ b/reactos/include/ddk/dbgfuncs.h @@ -1,23 +1,10 @@ #ifndef __INCLUDE_DDK_DBGFUNCS_H #define __INCLUDE_DDK_DBGFUNCS_H -/* $Id: dbgfuncs.h,v 1.7 2002/09/08 10:47:43 chorns Exp $ */ +/* $Id: dbgfuncs.h,v 1.8 2003/06/07 16:16:38 chorns Exp $ */ -#define DBG_STATUS_CONTROL_C 1 -#define DBG_STATUS_SYSRQ 2 -#define DBG_STATUS_BUGCHECK_FIRST 3 -#define DBG_STATUS_BUGCHECK_SECOND 4 -#define DBG_STATUS_FATAL 5 VOID STDCALL DbgBreakPointWithStatus (ULONG Status); VOID STDCALL DbgBreakPoint(VOID); ULONG DbgPrint(PCH Format,...); VOID STDCALL DbgPrompt (PCH OutputString, PCH InputString, USHORT InputSize); - -#define DBG_GET_SHOW_FACILITY 0x0001 -#define DBG_GET_SHOW_SEVERITY 0x0002 -#define DBG_GET_SHOW_ERRCODE 0x0004 -#define DBG_GET_SHOW_ERRTEXT 0x0008 -VOID DbgGetErrorText(NTSTATUS ErrorCode, PUNICODE_STRING ErrorText, ULONG Flags); -VOID DbgPrintErrorMessage(NTSTATUS ErrorCode); - #endif /* __INCLUDE_DDK_DBGFUNCS_H */ diff --git a/reactos/include/ddk/exfuncs.h b/reactos/include/ddk/exfuncs.h index 78872207bca..b9cc4e7a76d 100644 --- a/reactos/include/ddk/exfuncs.h +++ b/reactos/include/ddk/exfuncs.h @@ -457,7 +457,7 @@ ExLocalTimeToSystemTime ( VOID STDCALL ExNotifyCallback ( - IN PVOID CallbackObject, + IN PCALLBACK_OBJECT CallbackObject, IN PVOID Argument1, IN PVOID Argument2 ); @@ -820,98 +820,4 @@ ExHookException ( unsigned int exp ); -/* BEGIN REACTOS ONLY */ - -BOOLEAN STDCALL -ExInitializeBinaryTree(IN PBINARY_TREE Tree, - IN PKEY_COMPARATOR Compare, - IN BOOLEAN UseNonPagedPool); - -VOID STDCALL -ExDeleteBinaryTree(IN PBINARY_TREE Tree); - -VOID STDCALL -ExInsertBinaryTree(IN PBINARY_TREE Tree, - IN PVOID Key, - IN PVOID Value); - -BOOLEAN STDCALL -ExSearchBinaryTree(IN PBINARY_TREE Tree, - IN PVOID Key, - OUT PVOID * Value); - -BOOLEAN STDCALL -ExRemoveBinaryTree(IN PBINARY_TREE Tree, - IN PVOID Key, - IN PVOID * Value); - -BOOLEAN STDCALL -ExTraverseBinaryTree(IN PBINARY_TREE Tree, - IN TRAVERSE_METHOD Method, - IN PTRAVERSE_ROUTINE Routine, - IN PVOID Context); - -BOOLEAN STDCALL -ExInitializeSplayTree(IN PSPLAY_TREE Tree, - IN PKEY_COMPARATOR Compare, - IN BOOLEAN Weighted, - IN BOOLEAN UseNonPagedPool); - -VOID STDCALL -ExDeleteSplayTree(IN PSPLAY_TREE Tree); - -VOID STDCALL -ExInsertSplayTree(IN PSPLAY_TREE Tree, - IN PVOID Key, - IN PVOID Value); - -BOOLEAN STDCALL -ExSearchSplayTree(IN PSPLAY_TREE Tree, - IN PVOID Key, - OUT PVOID * Value); - -BOOLEAN STDCALL -ExRemoveSplayTree(IN PSPLAY_TREE Tree, - IN PVOID Key, - IN PVOID * Value); - -BOOLEAN STDCALL -ExWeightOfSplayTree(IN PSPLAY_TREE Tree, - OUT PULONG Weight); - -BOOLEAN STDCALL -ExTraverseSplayTree(IN PSPLAY_TREE Tree, - IN TRAVERSE_METHOD Method, - IN PTRAVERSE_ROUTINE Routine, - IN PVOID Context); - -BOOLEAN STDCALL -ExInitializeHashTable(IN PHASH_TABLE HashTable, - IN ULONG HashTableSize, - IN PKEY_COMPARATOR Compare OPTIONAL, - IN BOOLEAN UseNonPagedPool); - -VOID STDCALL -ExDeleteHashTable(IN PHASH_TABLE HashTable); - -VOID STDCALL -ExInsertHashTable(IN PHASH_TABLE HashTable, - IN PVOID Key, - IN ULONG KeyLength, - IN PVOID Value); - -BOOLEAN STDCALL -ExSearchHashTable(IN PHASH_TABLE HashTable, - IN PVOID Key, - IN ULONG KeyLength, - OUT PVOID * Value); - -BOOLEAN STDCALL -ExRemoveHashTable(IN PHASH_TABLE HashTable, - IN PVOID Key, - IN ULONG KeyLength, - IN PVOID * Value); - -/* END REACTOS ONLY */ - #endif /* ndef _NTOS_EXFUNCS_H */ diff --git a/reactos/include/ddk/extypes.h b/reactos/include/ddk/extypes.h index 35a681ce03f..b0c9dd30169 100644 --- a/reactos/include/ddk/extypes.h +++ b/reactos/include/ddk/extypes.h @@ -1,4 +1,4 @@ -/* $Id: extypes.h,v 1.14 2003/04/10 23:14:46 hyperion Exp $ */ +/* $Id: extypes.h,v 1.15 2003/06/07 16:16:38 chorns Exp $ */ #ifndef __INCLUDE_DDK_EXTYPES_H #define __INCLUDE_DDK_EXTYPES_H @@ -160,81 +160,6 @@ typedef VOID STDCALL_FUNC PVOID Argument1, PVOID Argument2); -/* BEGIN REACTOS ONLY */ - -typedef enum _TRAVERSE_METHOD { - TraverseMethodPreorder, - TraverseMethodInorder, - TraverseMethodPostorder -} TRAVERSE_METHOD; - -typedef LONG STDCALL_FUNC -(*PKEY_COMPARATOR)(IN PVOID Key1, - IN PVOID Key2); - -typedef BOOLEAN STDCALL_FUNC -(*PTRAVERSE_ROUTINE)(IN PVOID Context, - IN PVOID Key, - IN PVOID Value); - -struct _BINARY_TREE_NODE; - -typedef struct _BINARY_TREE -{ - struct _BINARY_TREE_NODE * RootNode; - PKEY_COMPARATOR Compare; - BOOLEAN UseNonPagedPool; - union { - NPAGED_LOOKASIDE_LIST NonPaged; - PAGED_LOOKASIDE_LIST Paged; - } List; - union { - KSPIN_LOCK NonPaged; - FAST_MUTEX Paged; - } Lock; -} BINARY_TREE, *PBINARY_TREE; - - -struct _SPLAY_TREE_NODE; - -typedef struct _SPLAY_TREE -{ - struct _SPLAY_TREE_NODE * RootNode; - PKEY_COMPARATOR Compare; - BOOLEAN Weighted; - BOOLEAN UseNonPagedPool; - union { - NPAGED_LOOKASIDE_LIST NonPaged; - PAGED_LOOKASIDE_LIST Paged; - } List; - union { - KSPIN_LOCK NonPaged; - FAST_MUTEX Paged; - } Lock; - PVOID Reserved[4]; -} SPLAY_TREE, *PSPLAY_TREE; - - -typedef struct _HASH_TABLE -{ - // Size of hash table in number of bits - ULONG HashTableSize; - - // Use non-paged pool memory? - BOOLEAN UseNonPagedPool; - - // Lock for this structure - union { - KSPIN_LOCK NonPaged; - FAST_MUTEX Paged; - } Lock; - - // Pointer to array of hash buckets with splay trees - PSPLAY_TREE HashTrees; -} HASH_TABLE, *PHASH_TABLE; - -/* END REACTOS ONLY */ - #endif /* __INCLUDE_DDK_EXTYPES_H */ /* EOF */ diff --git a/reactos/include/ddk/status.h b/reactos/include/ddk/status.h index b8bd209058a..760baaec672 100644 --- a/reactos/include/ddk/status.h +++ b/reactos/include/ddk/status.h @@ -3,15 +3,6 @@ #ifndef __ASM__ -#define NTSTAT_SEVERITY_SHIFT 30 -#define NTSTAT_SEVERITY_MASK 0x00000003 -#define NTSTAT_FACILITY_SHIFT 16 -#define NTSTAT_FACILITY_MASK 0x00000FFF -#define NTSTAT_CUSTOMER_MASK 0x20000000 - -#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 NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode) >= 0) /* @@ -192,7 +183,7 @@ #define STATUS_DEVICE_ALREADY_ATTACHED ((NTSTATUS)0xc0000038) #define STATUS_OBJECT_PATH_INVALID ((NTSTATUS)0xc0000039) #define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS)0xc000003a) -#define STATUS_PATH_SYNTAX_BAD ((NTSTATUS)0xc000003b) +#define STATUS_OBJECT_PATH_SYNTAX_BAD ((NTSTATUS)0xc000003b) #define STATUS_DATA_OVERRUN ((NTSTATUS)0xc000003c) #define STATUS_DATA_LATE_ERROR ((NTSTATUS)0xc000003d) #define STATUS_DATA_ERROR ((NTSTATUS)0xc000003e) @@ -697,15 +688,6 @@ #define RPC_NT_SS_IN_NULL_CONTEXT ((NTSTATUS)0xC0030004) - -/* FIXME: Are these official values ?? */ -#define STATUS_FS_QUERY_REQUIRED ((NTSTATUS)0xC1000001) -#define STATUS_HANDLE_NOT_WAITABLE ((NTSTATUS)0xC1000002) -#define STATUS_OBJECT_FILE_MISMATCH ((NTSTATUS)0xC1000003) -#define STATUS_INVALID_PARAMETER_MAX ((NTSTATUS)0xC1000004) -#define STATUS_CONFLICTING_ADDRESS ((NTSTATUS)0xC1000005) -#define STATUS_NO_MEDIA_IN_DRIVE ((NTSTATUS)0xC1000006) - #else /* !__ASM__ */ #define STATUS_INVALID_SYSTEM_SERVICE 0xc000001c diff --git a/reactos/include/ntos.h b/reactos/include/ntos.h index eadde9c7f30..39380b6e314 100644 --- a/reactos/include/ntos.h +++ b/reactos/include/ntos.h @@ -1,6 +1,6 @@ #ifndef _NTOS_H #define _NTOS_H -/* $Id: ntos.h,v 1.11 2003/06/07 10:14:39 chorns Exp $ */ +/* $Id: ntos.h,v 1.12 2003/06/07 16:16:38 chorns Exp $ */ #if defined(NTOS_MODE_USER) // include windows.h before ntddk.h to get user mode prototype for InterlockedXxx functions @@ -38,6 +38,7 @@ #include "ntos/rtl.h" #include "ntos/zwtypes.h" #include "ntos/zw.h" +#include "ntos/dbgfuncs.h" #include "ntos/service.h" #include "ntdll/csr.h" #include "ntdll/dbg.h" @@ -81,6 +82,7 @@ #include "ntos/rtl.h" #include "ntos/zwtypes.h" #include "ntos/zw.h" +#include "ntos/dbgfuncs.h" #include "ntos/service.h" #include "ntos/haltypes.h" #include "ntos/halfuncs.h" diff --git a/reactos/include/ntos/rtl.h b/reactos/include/ntos/rtl.h index e3ea0a6e082..569303ce13a 100755 --- a/reactos/include/ntos/rtl.h +++ b/reactos/include/ntos/rtl.h @@ -1,4 +1,4 @@ -/* $Id: rtl.h,v 1.11 2003/06/07 11:29:30 ekohl Exp $ +/* $Id: rtl.h,v 1.12 2003/06/07 16:16:38 chorns Exp $ * */ @@ -394,7 +394,7 @@ NTSTATUS STDCALL RtlQueryRegistryValues ( IN ULONG RelativeTo, - IN PWSTR Path, + IN PCWSTR Path, IN PRTL_QUERY_REGISTRY_TABLE QueryTable, IN PVOID Context, IN PVOID Environment @@ -404,8 +404,8 @@ NTSTATUS STDCALL RtlWriteRegistryValue ( ULONG RelativeTo, - PWSTR Path, - PWSTR ValueName, + PCWSTR Path, + PCWSTR ValueName, ULONG ValueType, PVOID ValueData, ULONG ValueLength @@ -413,8 +413,8 @@ RtlWriteRegistryValue ( NTSTATUS STDCALL RtlDeleteRegistryValue(IN ULONG RelativeTo, - IN PWSTR Path, - IN PWSTR ValueName); + IN PCWSTR Path, + IN PCWSTR ValueName); VOID STDCALL RtlMoveMemory (PVOID Destination, CONST VOID* Source, ULONG Length); diff --git a/reactos/include/ntos/types.h b/reactos/include/ntos/types.h index 20810c325fc..3fa6475edce 100644 --- a/reactos/include/ntos/types.h +++ b/reactos/include/ntos/types.h @@ -524,4 +524,22 @@ typedef enum _KAPC_ENVIRONMENT CurrentApcEnvironment } KAPC_ENVIRONMENT; +/* FIXME: Are these official values ?? */ +#define STATUS_FS_QUERY_REQUIRED ((NTSTATUS)0xC1000001) +#define STATUS_HANDLE_NOT_WAITABLE ((NTSTATUS)0xC1000002) +#define STATUS_OBJECT_FILE_MISMATCH ((NTSTATUS)0xC1000003) +#define STATUS_INVALID_PARAMETER_MAX ((NTSTATUS)0xC1000004) +#define STATUS_CONFLICTING_ADDRESS ((NTSTATUS)0xC1000005) +#define STATUS_NO_MEDIA_IN_DRIVE ((NTSTATUS)0xC1000006) + +#define NTSTAT_SEVERITY_SHIFT 30 +#define NTSTAT_SEVERITY_MASK 0x00000003 +#define NTSTAT_FACILITY_SHIFT 16 +#define NTSTAT_FACILITY_MASK 0x00000FFF +#define NTSTAT_CUSTOMER_MASK 0x20000000 + +#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) + #endif /* __INCLUDE_TYPES_H */ diff --git a/reactos/include/ntos/zw.h b/reactos/include/ntos/zw.h index d893f401d48..f513b37d7be 100755 --- a/reactos/include/ntos/zw.h +++ b/reactos/include/ntos/zw.h @@ -1,5 +1,5 @@ -/* $Id: zw.h,v 1.11 2003/04/26 23:13:27 hyperion Exp $ +/* $Id: zw.h,v 1.12 2003/06/07 16:16:38 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -4301,16 +4301,10 @@ NTSTATUS STDCALL ZwContinue(IN PCONTEXT Context, IN CINT IrqLevel); * */ -NTSTATUS -STDCALL -NtQuerySystemTime ( - OUT TIME *CurrentTime - ); - NTSTATUS STDCALL ZwQuerySystemTime ( - OUT TIME *CurrentTime + OUT PLARGE_INTEGER CurrentTime ); /* @@ -4672,31 +4666,6 @@ ZwLoadKey( IN POBJECT_ATTRIBUTES FileObjectAttributes ); -/* - * FUNCTION: Loads a registry key. - * ARGUMENTS: - * KeyObjectAttributes = Key to be loaded - * FileObjectAttributes = File to load the key from - * Flags = ??? - * REMARK: - * This procedure maps to the win32 procedure RegLoadKey - * RETURNS: Status - */ -NTSTATUS -STDCALL -NtLoadKey2( - IN POBJECT_ATTRIBUTES KeyObjectAttributes, - IN POBJECT_ATTRIBUTES FileObjectAttributes, - IN ULONG Flags - ); -NTSTATUS -STDCALL -ZwLoadKey2( - IN POBJECT_ATTRIBUTES KeyObjectAttributes, - IN POBJECT_ATTRIBUTES FileObjectAttributes, - IN ULONG Flags - ); - /* * FUNCTION: Locks a range of virtual memory. * ARGUMENTS: @@ -4946,16 +4915,6 @@ ZwQueryIntervalProfile( ResultLength = Bytes written */ -NTSTATUS -STDCALL -NtQueryObject( - IN HANDLE ObjectHandle, - IN CINT ObjectInformationClass, - OUT PVOID ObjectInformation, - IN ULONG Length, - OUT PULONG ResultLength - ); - NTSTATUS STDCALL ZwQueryObject( @@ -5420,4 +5379,164 @@ typedef struct _SECTION_IMAGE_INFORMATION #endif /* !__USE_W32API */ +/* + * FUNCTION: Loads a registry key. + * ARGUMENTS: + * KeyObjectAttributes = Key to be loaded + * FileObjectAttributes = File to load the key from + * Flags = ??? + * REMARK: + * This procedure maps to the win32 procedure RegLoadKey + * RETURNS: Status + */ +NTSTATUS +STDCALL +NtLoadKey2( + IN POBJECT_ATTRIBUTES KeyObjectAttributes, + IN POBJECT_ATTRIBUTES FileObjectAttributes, + IN ULONG Flags + ); + +NTSTATUS +STDCALL +ZwLoadKey2( + IN POBJECT_ATTRIBUTES KeyObjectAttributes, + IN POBJECT_ATTRIBUTES FileObjectAttributes, + IN ULONG Flags + ); + +/* + * FUNCTION: Retrieves the system time + * ARGUMENTS: + * CurrentTime (OUT) = Caller should supply storage for the resulting time. + * RETURNS: Status + * +*/ + +NTSTATUS +STDCALL +NtQuerySystemTime ( + OUT PLARGE_INTEGER CurrentTime + ); + +/* + * FUNCTION: Queries the information of a object. + * ARGUMENTS: + ObjectHandle = Handle to a object + ObjectInformationClass = Index to a certain information structure + + ObjectBasicInformation + ObjectTypeInformation OBJECT_TYPE_INFORMATION + ObjectNameInformation OBJECT_NAME_INFORMATION + ObjectDataInformation OBJECT_DATA_INFORMATION + + ObjectInformation = Caller supplies storage for resulting information + Length = Size of the supplied storage + ResultLength = Bytes written + */ + +NTSTATUS +STDCALL +NtQueryObject( + IN HANDLE ObjectHandle, + IN CINT ObjectInformationClass, + OUT PVOID ObjectInformation, + IN ULONG Length, + OUT PULONG ResultLength + ); + +/* BEGIN REACTOS ONLY */ + +BOOLEAN STDCALL +ExInitializeBinaryTree(IN PBINARY_TREE Tree, + IN PKEY_COMPARATOR Compare, + IN BOOLEAN UseNonPagedPool); + +VOID STDCALL +ExDeleteBinaryTree(IN PBINARY_TREE Tree); + +VOID STDCALL +ExInsertBinaryTree(IN PBINARY_TREE Tree, + IN PVOID Key, + IN PVOID Value); + +BOOLEAN STDCALL +ExSearchBinaryTree(IN PBINARY_TREE Tree, + IN PVOID Key, + OUT PVOID * Value); + +BOOLEAN STDCALL +ExRemoveBinaryTree(IN PBINARY_TREE Tree, + IN PVOID Key, + IN PVOID * Value); + +BOOLEAN STDCALL +ExTraverseBinaryTree(IN PBINARY_TREE Tree, + IN TRAVERSE_METHOD Method, + IN PTRAVERSE_ROUTINE Routine, + IN PVOID Context); + +BOOLEAN STDCALL +ExInitializeSplayTree(IN PSPLAY_TREE Tree, + IN PKEY_COMPARATOR Compare, + IN BOOLEAN Weighted, + IN BOOLEAN UseNonPagedPool); + +VOID STDCALL +ExDeleteSplayTree(IN PSPLAY_TREE Tree); + +VOID STDCALL +ExInsertSplayTree(IN PSPLAY_TREE Tree, + IN PVOID Key, + IN PVOID Value); + +BOOLEAN STDCALL +ExSearchSplayTree(IN PSPLAY_TREE Tree, + IN PVOID Key, + OUT PVOID * Value); + +BOOLEAN STDCALL +ExRemoveSplayTree(IN PSPLAY_TREE Tree, + IN PVOID Key, + IN PVOID * Value); + +BOOLEAN STDCALL +ExWeightOfSplayTree(IN PSPLAY_TREE Tree, + OUT PULONG Weight); + +BOOLEAN STDCALL +ExTraverseSplayTree(IN PSPLAY_TREE Tree, + IN TRAVERSE_METHOD Method, + IN PTRAVERSE_ROUTINE Routine, + IN PVOID Context); + +BOOLEAN STDCALL +ExInitializeHashTable(IN PHASH_TABLE HashTable, + IN ULONG HashTableSize, + IN PKEY_COMPARATOR Compare OPTIONAL, + IN BOOLEAN UseNonPagedPool); + +VOID STDCALL +ExDeleteHashTable(IN PHASH_TABLE HashTable); + +VOID STDCALL +ExInsertHashTable(IN PHASH_TABLE HashTable, + IN PVOID Key, + IN ULONG KeyLength, + IN PVOID Value); + +BOOLEAN STDCALL +ExSearchHashTable(IN PHASH_TABLE HashTable, + IN PVOID Key, + IN ULONG KeyLength, + OUT PVOID * Value); + +BOOLEAN STDCALL +ExRemoveHashTable(IN PHASH_TABLE HashTable, + IN PVOID Key, + IN ULONG KeyLength, + IN PVOID * Value); + +/* END REACTOS ONLY */ + #endif /* __DDK_ZW_H */ diff --git a/reactos/include/ntos/zwtypes.h b/reactos/include/ntos/zwtypes.h index cd46c998bcf..6fd992f4b3a 100755 --- a/reactos/include/ntos/zwtypes.h +++ b/reactos/include/ntos/zwtypes.h @@ -18,7 +18,7 @@ typedef enum _DEBUG_CONTROL_CODE { DebugGetTraceInformation = 1, DebugSetInternalBreakpoint, - DebugSetSpecialCalls, + DebugSetSpecialCall, DebugClearSpecialCalls, DebugQuerySpecialCalls, DebugDbgBreakPoint, @@ -1673,4 +1673,79 @@ ObRosCreateObject(OUT PHANDLE Handle, IN POBJECT_TYPE Type, OUT PVOID *Object); +/* BEGIN REACTOS ONLY */ + +typedef enum _TRAVERSE_METHOD { + TraverseMethodPreorder, + TraverseMethodInorder, + TraverseMethodPostorder +} TRAVERSE_METHOD; + +typedef LONG STDCALL_FUNC +(*PKEY_COMPARATOR)(IN PVOID Key1, + IN PVOID Key2); + +typedef BOOLEAN STDCALL_FUNC +(*PTRAVERSE_ROUTINE)(IN PVOID Context, + IN PVOID Key, + IN PVOID Value); + +struct _BINARY_TREE_NODE; + +typedef struct _BINARY_TREE +{ + struct _BINARY_TREE_NODE * RootNode; + PKEY_COMPARATOR Compare; + BOOLEAN UseNonPagedPool; + union { + NPAGED_LOOKASIDE_LIST NonPaged; + PAGED_LOOKASIDE_LIST Paged; + } List; + union { + KSPIN_LOCK NonPaged; + FAST_MUTEX Paged; + } Lock; +} BINARY_TREE, *PBINARY_TREE; + + +struct _SPLAY_TREE_NODE; + +typedef struct _SPLAY_TREE +{ + struct _SPLAY_TREE_NODE * RootNode; + PKEY_COMPARATOR Compare; + BOOLEAN Weighted; + BOOLEAN UseNonPagedPool; + union { + NPAGED_LOOKASIDE_LIST NonPaged; + PAGED_LOOKASIDE_LIST Paged; + } List; + union { + KSPIN_LOCK NonPaged; + FAST_MUTEX Paged; + } Lock; + PVOID Reserved[4]; +} SPLAY_TREE, *PSPLAY_TREE; + + +typedef struct _HASH_TABLE +{ + // Size of hash table in number of bits + ULONG HashTableSize; + + // Use non-paged pool memory? + BOOLEAN UseNonPagedPool; + + // Lock for this structure + union { + KSPIN_LOCK NonPaged; + FAST_MUTEX Paged; + } Lock; + + // Pointer to array of hash buckets with splay trees + PSPLAY_TREE HashTrees; +} HASH_TABLE, *PHASH_TABLE; + +/* END REACTOS ONLY */ + #endif diff --git a/reactos/lib/kernel32/file/cnotify.c b/reactos/lib/kernel32/file/cnotify.c index db973c328c4..9ef6fa99040 100644 --- a/reactos/lib/kernel32/file/cnotify.c +++ b/reactos/lib/kernel32/file/cnotify.c @@ -1,4 +1,4 @@ -/* $Id: cnotify.c,v 1.5 2003/03/23 19:51:11 gdalsnes Exp $ +/* $Id: cnotify.c,v 1.6 2003/06/07 16:16:39 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -87,7 +87,7 @@ FindFirstChangeNotificationW ( NULL, NULL)) { - SetLastErrorByStatus(STATUS_PATH_SYNTAX_BAD); + SetLastErrorByStatus(STATUS_OBJECT_PATH_SYNTAX_BAD); return INVALID_HANDLE_VALUE; } diff --git a/reactos/lib/ntdll/rtl/registry.c b/reactos/lib/ntdll/rtl/registry.c index 41863d5f640..7e61e758133 100644 --- a/reactos/lib/ntdll/rtl/registry.c +++ b/reactos/lib/ntdll/rtl/registry.c @@ -1,4 +1,4 @@ -/* $Id: registry.c,v 1.19 2002/10/28 15:50:25 robd Exp $ +/* $Id: registry.c,v 1.20 2003/06/07 16:16:39 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -72,8 +72,8 @@ RtlCreateRegistryKey(IN ULONG RelativeTo, NTSTATUS STDCALL RtlDeleteRegistryValue(IN ULONG RelativeTo, - IN PWSTR Path, - IN PWSTR ValueName) + IN PCWSTR Path, + IN PCWSTR ValueName) { HANDLE KeyHandle; NTSTATUS Status; @@ -149,7 +149,7 @@ RtlOpenCurrentUser(IN ACCESS_MASK DesiredAccess, NTSTATUS STDCALL RtlQueryRegistryValues(IN ULONG RelativeTo, - IN PWSTR Path, + IN PCWSTR Path, IN PRTL_QUERY_REGISTRY_TABLE QueryTable, IN PVOID Context, IN PVOID Environment) @@ -658,8 +658,8 @@ RtlQueryRegistryValues(IN ULONG RelativeTo, NTSTATUS STDCALL RtlWriteRegistryValue(IN ULONG RelativeTo, - IN PWSTR Path, - IN PWSTR ValueName, + IN PCWSTR Path, + IN PCWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength) diff --git a/reactos/ntoskrnl/cm/cm.h b/reactos/ntoskrnl/cm/cm.h index 211eb866251..63412078f57 100644 --- a/reactos/ntoskrnl/cm/cm.h +++ b/reactos/ntoskrnl/cm/cm.h @@ -64,7 +64,7 @@ typedef struct _HIVE_HEADER ULONG UpdateCounter2; /* When this hive file was last modified */ - FILETIME DateModified; + LARGE_INTEGER DateModified; /* Registry format version ? (1?) */ ULONG Unused3; @@ -113,7 +113,7 @@ typedef struct _HBIN ULONG Unused1; /* When this bin was last modified */ - FILETIME DateModified; + LARGE_INTEGER DateModified; /* ? */ ULONG Unused2; @@ -137,7 +137,7 @@ typedef struct _KEY_CELL USHORT Flags; /* Time of last flush */ - FILETIME LastWriteTime; + LARGE_INTEGER LastWriteTime; /* ? */ ULONG UnUsed1; diff --git a/reactos/ntoskrnl/cm/ntfunc.c b/reactos/ntoskrnl/cm/ntfunc.c index 691b7a24781..76af5d66fad 100644 --- a/reactos/ntoskrnl/cm/ntfunc.c +++ b/reactos/ntoskrnl/cm/ntfunc.c @@ -379,8 +379,8 @@ NtEnumerateKey(IN HANDLE KeyHandle, { /* Fill buffer with requested info */ BasicInformation = (PKEY_BASIC_INFORMATION) KeyInformation; - BasicInformation->LastWriteTime.u.LowPart = SubKeyCell->LastWriteTime.dwLowDateTime; - BasicInformation->LastWriteTime.u.HighPart = SubKeyCell->LastWriteTime.dwHighDateTime; + BasicInformation->LastWriteTime.u.LowPart = SubKeyCell->LastWriteTime.u.LowPart; + BasicInformation->LastWriteTime.u.HighPart = SubKeyCell->LastWriteTime.u.HighPart; BasicInformation->TitleIndex = Index; BasicInformation->NameLength = NameSize; @@ -420,8 +420,8 @@ NtEnumerateKey(IN HANDLE KeyHandle, { /* Fill buffer with requested info */ NodeInformation = (PKEY_NODE_INFORMATION) KeyInformation; - NodeInformation->LastWriteTime.u.LowPart = SubKeyCell->LastWriteTime.dwLowDateTime; - NodeInformation->LastWriteTime.u.HighPart = SubKeyCell->LastWriteTime.dwHighDateTime; + NodeInformation->LastWriteTime.u.LowPart = SubKeyCell->LastWriteTime.u.LowPart; + NodeInformation->LastWriteTime.u.HighPart = SubKeyCell->LastWriteTime.u.HighPart; NodeInformation->TitleIndex = Index; NodeInformation->ClassOffset = sizeof(KEY_NODE_INFORMATION) + NameSize; NodeInformation->ClassLength = SubKeyCell->ClassSize; @@ -465,8 +465,8 @@ NtEnumerateKey(IN HANDLE KeyHandle, { /* Fill buffer with requested info */ FullInformation = (PKEY_FULL_INFORMATION) KeyInformation; - FullInformation->LastWriteTime.u.LowPart = SubKeyCell->LastWriteTime.dwLowDateTime; - FullInformation->LastWriteTime.u.HighPart = SubKeyCell->LastWriteTime.dwHighDateTime; + FullInformation->LastWriteTime.u.LowPart = SubKeyCell->LastWriteTime.u.LowPart; + FullInformation->LastWriteTime.u.HighPart = SubKeyCell->LastWriteTime.u.HighPart; FullInformation->TitleIndex = Index; FullInformation->ClassOffset = sizeof(KEY_FULL_INFORMATION) - sizeof(WCHAR); @@ -492,6 +492,10 @@ NtEnumerateKey(IN HANDLE KeyHandle, } } break; + + default: + DPRINT1("Not handling 0x%x\n", KeyInformationClass); + break; } ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource); @@ -706,6 +710,10 @@ NtEnumerateValueKey(IN HANDLE KeyHandle, } } break; + + default: + DPRINT1("Not handling 0x%x\n", KeyValueInformationClass); + break; } } else @@ -885,8 +893,8 @@ NtQueryKey(IN HANDLE KeyHandle, { /* Fill buffer with requested info */ BasicInformation = (PKEY_BASIC_INFORMATION) KeyInformation; - BasicInformation->LastWriteTime.u.LowPart = KeyCell->LastWriteTime.dwLowDateTime; - BasicInformation->LastWriteTime.u.HighPart = KeyCell->LastWriteTime.dwHighDateTime; + BasicInformation->LastWriteTime.u.LowPart = KeyCell->LastWriteTime.u.LowPart; + BasicInformation->LastWriteTime.u.HighPart = KeyCell->LastWriteTime.u.HighPart; BasicInformation->TitleIndex = 0; BasicInformation->NameLength = KeyObject->Name.Length; RtlCopyMemory(BasicInformation->Name, @@ -908,8 +916,8 @@ NtQueryKey(IN HANDLE KeyHandle, { /* Fill buffer with requested info */ NodeInformation = (PKEY_NODE_INFORMATION) KeyInformation; - NodeInformation->LastWriteTime.u.LowPart = KeyCell->LastWriteTime.dwLowDateTime; - NodeInformation->LastWriteTime.u.HighPart = KeyCell->LastWriteTime.dwHighDateTime; + NodeInformation->LastWriteTime.u.LowPart = KeyCell->LastWriteTime.u.LowPart; + NodeInformation->LastWriteTime.u.HighPart = KeyCell->LastWriteTime.u.HighPart; NodeInformation->TitleIndex = 0; NodeInformation->ClassOffset = sizeof(KEY_NODE_INFORMATION) + KeyObject->Name.Length; @@ -944,8 +952,8 @@ NtQueryKey(IN HANDLE KeyHandle, { /* Fill buffer with requested info */ FullInformation = (PKEY_FULL_INFORMATION) KeyInformation; - FullInformation->LastWriteTime.u.LowPart = KeyCell->LastWriteTime.dwLowDateTime; - FullInformation->LastWriteTime.u.HighPart = KeyCell->LastWriteTime.dwHighDateTime; + FullInformation->LastWriteTime.u.LowPart = KeyCell->LastWriteTime.u.LowPart; + FullInformation->LastWriteTime.u.HighPart = KeyCell->LastWriteTime.u.HighPart; FullInformation->TitleIndex = 0; FullInformation->ClassOffset = sizeof(KEY_FULL_INFORMATION) - sizeof(WCHAR); FullInformation->ClassLength = KeyCell->ClassSize; @@ -970,6 +978,9 @@ NtQueryKey(IN HANDLE KeyHandle, } } break; + default: + DPRINT1("Not handling 0x%x\n", KeyInformationClass); + break; } ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource); @@ -1176,6 +1187,9 @@ NtQueryValueKey(IN HANDLE KeyHandle, } } break; + default: + DPRINT1("Not handling 0x%x\n", KeyValueInformationClass); + break; } } else @@ -1303,7 +1317,7 @@ NtSetValueKey(IN HANDLE KeyHandle, /* Update time of heap */ if (!IsNoFileHive(RegistryHive)) { - NtQuerySystemTime((PTIME) &pBin->DateModified); + NtQuerySystemTime(&pBin->DateModified); } CmiMarkBlockDirty(RegistryHive, ValueCell->DataOffset); } @@ -1358,7 +1372,7 @@ NtSetValueKey(IN HANDLE KeyHandle, /* Update time of heap */ if (!IsNoFileHive(RegistryHive) && CmiGetBlock(RegistryHive, VBOffset, &pBin)) { - NtQuerySystemTime((PTIME) &pBin->DateModified); + NtQuerySystemTime(&pBin->DateModified); } ExReleaseResourceLite(&KeyObject->RegistryHive->HiveResource); diff --git a/reactos/ntoskrnl/cm/regfile.c b/reactos/ntoskrnl/cm/regfile.c index de13e5db02a..3292def2253 100644 --- a/reactos/ntoskrnl/cm/regfile.c +++ b/reactos/ntoskrnl/cm/regfile.c @@ -46,8 +46,8 @@ CmiCreateDefaultHiveHeader(PHIVE_HEADER Header) Header->BlockId = REG_HIVE_ID; Header->UpdateCounter1 = 0; Header->UpdateCounter2 = 0; - Header->DateModified.dwLowDateTime = 0; - Header->DateModified.dwHighDateTime = 0; + Header->DateModified.u.LowPart = 0; + Header->DateModified.u.HighPart = 0; Header->Unused3 = 1; Header->Unused4 = 3; Header->Unused5 = 0; @@ -66,8 +66,8 @@ CmiCreateDefaultBinCell(PHBIN BinCell) assert(BinCell); RtlZeroMemory(BinCell, sizeof(HBIN)); BinCell->BlockId = REG_BIN_ID; - BinCell->DateModified.dwLowDateTime = 0; - BinCell->DateModified.dwHighDateTime = 0; + BinCell->DateModified.u.LowPart = 0; + BinCell->DateModified.u.HighPart = 0; BinCell->BlockSize = REG_BLOCK_SIZE; } @@ -80,7 +80,7 @@ CmiCreateDefaultRootKeyCell(PKEY_CELL RootKeyCell) RootKeyCell->CellSize = -sizeof(KEY_CELL); RootKeyCell->Id = REG_KEY_CELL_ID; RootKeyCell->Flags = REG_KEY_ROOT_CELL | REG_KEY_NAME_PACKED; - NtQuerySystemTime((PTIME) &RootKeyCell->LastWriteTime); + NtQuerySystemTime(&RootKeyCell->LastWriteTime); RootKeyCell->ParentKeyOffset = 0; RootKeyCell->NumberOfSubKeys = 0; RootKeyCell->HashTableOffset = -1; @@ -1942,7 +1942,7 @@ CmiFlushRegistryHive(PREGISTRY_HIVE RegistryHive) &RegistryHive->LogFileName); /* Update hive header modification time */ - NtQuerySystemTime((PTIME)&RegistryHive->HiveHeader->DateModified); + NtQuerySystemTime(&RegistryHive->HiveHeader->DateModified); /* Start log update */ Status = CmiStartLogUpdate(RegistryHive); @@ -2320,7 +2320,7 @@ CmiAddSubKey(PREGISTRY_HIVE RegistryHive, { NewKeyCell->Id = REG_KEY_CELL_ID; NewKeyCell->Flags = 0; - NtQuerySystemTime((PTIME) &NewKeyCell->LastWriteTime); + NtQuerySystemTime(&NewKeyCell->LastWriteTime); NewKeyCell->ParentKeyOffset = -1; NewKeyCell->NumberOfSubKeys = 0; NewKeyCell->HashTableOffset = -1; @@ -2588,7 +2588,7 @@ CmiRemoveSubKey(PREGISTRY_HIVE RegistryHive, } } - NtQuerySystemTime((PTIME)&ParentKey->KeyCell->LastWriteTime); + NtQuerySystemTime(&ParentKey->KeyCell->LastWriteTime); CmiMarkBlockDirty(RegistryHive, ParentKey->BlockOffset); } @@ -3054,7 +3054,7 @@ CmiDestroyValueCell(PREGISTRY_HIVE RegistryHive, /* Update time of heap */ if (!IsNoFileHive(RegistryHive)) - NtQuerySystemTime((PTIME) &pBin->DateModified); + NtQuerySystemTime(&pBin->DateModified); } /* Destroy the value cell */ @@ -3063,7 +3063,7 @@ CmiDestroyValueCell(PREGISTRY_HIVE RegistryHive, /* Update time of heap */ if (!IsNoFileHive(RegistryHive) && CmiGetBlock(RegistryHive, VBOffset, &pBin)) { - NtQuerySystemTime((PTIME) &pBin->DateModified); + NtQuerySystemTime(&pBin->DateModified); } return Status; @@ -3090,7 +3090,7 @@ CmiAddBin(PREGISTRY_HIVE RegistryHive, RegistryHive->FileSize += REG_BLOCK_SIZE; tmpBin->BlockSize = REG_BLOCK_SIZE; tmpBin->Unused1 = 0; - ZwQuerySystemTime((PTIME) &tmpBin->DateModified); + ZwQuerySystemTime(&tmpBin->DateModified); tmpBin->Unused2 = 0; /* Increase size of list of blocks */ @@ -3214,7 +3214,7 @@ CmiAllocateBlock(PREGISTRY_HIVE RegistryHive, if (Temp) { - NtQuerySystemTime((PTIME) &pBin->DateModified); + NtQuerySystemTime(&pBin->DateModified); CmiMarkBlockDirty(RegistryHive, RegistryHive->FreeListOffset[i]); } @@ -3301,7 +3301,7 @@ CmiDestroyBlock(PREGISTRY_HIVE RegistryHive, /* Update time of heap */ if (!IsNoFileHive(RegistryHive) && CmiGetBlock(RegistryHive, Offset,&pBin)) - NtQuerySystemTime((PTIME) &pBin->DateModified); + NtQuerySystemTime(&pBin->DateModified); CmiMarkBlockDirty(RegistryHive, Offset); } diff --git a/reactos/ntoskrnl/cm/rtlfunc.c b/reactos/ntoskrnl/cm/rtlfunc.c index 7e36694ab81..ca1b46e520e 100644 --- a/reactos/ntoskrnl/cm/rtlfunc.c +++ b/reactos/ntoskrnl/cm/rtlfunc.c @@ -70,15 +70,15 @@ RtlCreateRegistryKey(IN ULONG RelativeTo, NTSTATUS STDCALL RtlDeleteRegistryValue(IN ULONG RelativeTo, - IN PWSTR Path, - IN PWSTR ValueName) + IN PCWSTR Path, + IN PCWSTR ValueName) { HANDLE KeyHandle; NTSTATUS Status; UNICODE_STRING Name; Status = RtlpGetRegistryHandle(RelativeTo, - Path, + (PWSTR) Path, TRUE, &KeyHandle); if (!NT_SUCCESS(Status)) @@ -134,7 +134,7 @@ RtlOpenCurrentUser(IN ACCESS_MASK DesiredAccess, NTSTATUS STDCALL RtlQueryRegistryValues(IN ULONG RelativeTo, - IN PWSTR Path, + IN PCWSTR Path, IN PRTL_QUERY_REGISTRY_TABLE QueryTable, IN PVOID Context, IN PVOID Environment) @@ -160,7 +160,7 @@ RtlQueryRegistryValues(IN ULONG RelativeTo, #endif Status = RtlpGetRegistryHandle(RelativeTo, - Path, + (PWSTR) Path, FALSE, &BaseKeyHandle); if (!NT_SUCCESS(Status)) @@ -545,8 +545,8 @@ ByeBye: NTSTATUS STDCALL RtlWriteRegistryValue(IN ULONG RelativeTo, - IN PWSTR Path, - IN PWSTR ValueName, + IN PCWSTR Path, + IN PCWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength) @@ -556,7 +556,7 @@ RtlWriteRegistryValue(IN ULONG RelativeTo, UNICODE_STRING Name; Status = RtlpGetRegistryHandle(RelativeTo, - Path, + (PWSTR) Path, TRUE, &KeyHandle); if (!NT_SUCCESS(Status)) diff --git a/reactos/ntoskrnl/dbg/dbgctrl.c b/reactos/ntoskrnl/dbg/dbgctrl.c index 6dbc5d27e82..33df5344fc9 100644 --- a/reactos/ntoskrnl/dbg/dbgctrl.c +++ b/reactos/ntoskrnl/dbg/dbgctrl.c @@ -46,7 +46,7 @@ NtSystemDebugControl(DEBUG_CONTROL_CODE ControlCode, switch (ControlCode) { case DebugGetTraceInformation: case DebugSetInternalBreakpoint: - case DebugSetSpecialCalls: + case DebugSetSpecialCall: case DebugClearSpecialCalls: case DebugQuerySpecialCalls: case DebugDbgBreakPoint: diff --git a/reactos/ntoskrnl/dbg/errinfo.c b/reactos/ntoskrnl/dbg/errinfo.c index b4ea4852f10..a9cd6b6ed11 100644 --- a/reactos/ntoskrnl/dbg/errinfo.c +++ b/reactos/ntoskrnl/dbg/errinfo.c @@ -27,7 +27,8 @@ /* INCLUDES ******************************************************************/ -#include +#define NTOS_MODE_KERNEL +#include #include /* GLOBALS *******************************************************************/ @@ -165,7 +166,7 @@ static struct _ERRLIST {STATUS_OBJECT_PATH_INVALID, "OBJECT_PATH_INVALID", NULL}, {STATUS_OBJECT_PATH_NOT_FOUND, "OBJECT_PATH_NOT_FOUND", NULL}, {STATUS_DFS_EXIT_PATH_FOUND, "DFS_EXIT_PATH_FOUND", NULL}, - {STATUS_PATH_SYNTAX_BAD, "PATH_SYNTAX_BAD", NULL}, + {STATUS_OBJECT_PATH_SYNTAX_BAD, "OBJECT_PATH_SYNTAX_BAD", NULL}, {STATUS_DATA_OVERRUN, "DATA_OVERRUN", NULL}, {STATUS_DATA_LATE_ERROR, "DATA_LATE_ERROR", NULL}, {STATUS_DATA_ERROR, "DATA_ERROR", NULL}, @@ -257,11 +258,11 @@ DbgGetErrorText(NTSTATUS ErrorCode, PUNICODE_STRING ErrorText, ULONG Flags) { if (Flags & DBG_GET_SHOW_FACILITY) { - sprintf(NumBuf, "%08x", ErrorCode); + sprintf(NumBuf, "%08lx", ErrorCode); strcat(TempBuf, NumBuf); strcat(TempBuf, " "); } - sprintf(NumBuf, "Unknown Message #%08x", ErrorCode); + sprintf(NumBuf, "Unknown Message #%08lx", ErrorCode); strcat(TempBuf, NumBuf); } RtlInitAnsiString(&AnsiString, TempBuf); diff --git a/reactos/ntoskrnl/ex/callback.c b/reactos/ntoskrnl/ex/callback.c index 514cb3865c3..d271ef1c958 100644 --- a/reactos/ntoskrnl/ex/callback.c +++ b/reactos/ntoskrnl/ex/callback.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: callback.c,v 1.8 2002/09/08 10:23:19 chorns Exp $ +/* $Id: callback.c,v 1.9 2003/06/07 16:16:39 chorns Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/callback.c @@ -56,7 +56,7 @@ ExCreateCallback ( VOID STDCALL ExNotifyCallback ( - IN PVOID CallbackObject, + IN PCALLBACK_OBJECT CallbackObject, IN PVOID Argument1, IN PVOID Argument2 ) diff --git a/reactos/ntoskrnl/ex/time.c b/reactos/ntoskrnl/ex/time.c index 1cb1af734fa..d0c654e7cd6 100644 --- a/reactos/ntoskrnl/ex/time.c +++ b/reactos/ntoskrnl/ex/time.c @@ -1,4 +1,4 @@ -/* $Id: time.c,v 1.15 2002/12/09 20:13:12 hbirr Exp $ +/* $Id: time.c,v 1.16 2003/06/07 16:16:39 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -89,7 +89,7 @@ NtSetSystemTime (IN PLARGE_INTEGER UnsafeNewSystemTime, NTSTATUS STDCALL -NtQuerySystemTime (OUT TIME* UnsafeCurrentTime) +NtQuerySystemTime (OUT PLARGE_INTEGER UnsafeCurrentTime) /* * FUNCTION: Retrieves the system time. * PARAMETERS: diff --git a/reactos/ntoskrnl/include/internal/ex.h b/reactos/ntoskrnl/include/internal/ex.h index 75cc857abf1..e754c2f0205 100644 --- a/reactos/ntoskrnl/include/internal/ex.h +++ b/reactos/ntoskrnl/include/internal/ex.h @@ -5,8 +5,8 @@ #ifndef __NTOSKRNL_INCLUDE_INTERNAL_EXECUTIVE_H #define __NTOSKRNL_INCLUDE_INTERNAL_EXECUTIVE_H -#include -#include +#define NTOS_MODE_KERNEL +#include typedef struct _WINSTATION_OBJECT { diff --git a/reactos/ntoskrnl/ke/main.c b/reactos/ntoskrnl/ke/main.c index e97b7cc9303..4eedaac2d42 100644 --- a/reactos/ntoskrnl/ke/main.c +++ b/reactos/ntoskrnl/ke/main.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: main.c,v 1.159 2003/06/05 11:51:13 chorns Exp $ +/* $Id: main.c,v 1.160 2003/06/07 16:16:39 chorns Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/main.c @@ -28,7 +28,8 @@ /* INCLUDES *****************************************************************/ -#include +#define NTOS_MODE_KERNEL +#include #include #include #include