Fix KeRaiseUserException and rename Object Information Structure
Modified: trunk/reactos/config
Modified: trunk/reactos/include/ntos/zwtypes.h
Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c
Modified: trunk/reactos/ntoskrnl/ob/dirobj.c
_____
Modified: trunk/reactos/config
--- trunk/reactos/config 2005-01-02 20:49:00 UTC (rev 12737)
+++ trunk/reactos/config 2005-01-02 20:51:02 UTC (rev 12738)
@@ -30,7 +30,7 @@
#
# Whether to compile with optimizations
#
-OPTIMIZED := 0
+OPTIMIZED := 0
#
# Whether to compile a multiprocessor or single processor version
_____
Modified: trunk/reactos/include/ntos/zwtypes.h
--- trunk/reactos/include/ntos/zwtypes.h 2005-01-02 20:49:00 UTC
(rev 12737)
+++ trunk/reactos/include/ntos/zwtypes.h 2005-01-02 20:51:02 UTC
(rev 12738)
@@ -1659,11 +1659,11 @@
// directory information
-typedef struct _DIRECTORY_BASIC_INFORMATION
+typedef struct _OBJECT_DIRECTORY_INFORMATION
{
UNICODE_STRING ObjectName;
UNICODE_STRING ObjectTypeName; // Directory, Device ...
-} DIRECTORY_BASIC_INFORMATION, *PDIRECTORY_BASIC_INFORMATION;
+} OBJECT_DIRECTORY_INFORMATION, *POBJECT_DIRECTORY_INFORMATION;
// power information levels
_____
Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c
--- trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-01-02 20:49:00 UTC
(rev 12737)
+++ trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-01-02 20:51:02 UTC
(rev 12738)
@@ -857,18 +857,20 @@
/*
* @implemented
*/
-
NTSTATUS STDCALL
KeRaiseUserException(IN NTSTATUS ExceptionCode)
{
- /* FIXME: This needs SEH */
ULONG OldEip;
PKTHREAD Thread = KeGetCurrentThread();
- ProbeForWrite(&Thread->Teb->ExceptionCode, sizeof(NTSTATUS),
sizeof(NTSTATUS)); /* NT doesn't check this -- bad? */
+ _SEH_TRY {
+ Thread->Teb->ExceptionCode = ExceptionCode;
+ } _SEH_HANDLE {
+ return(ExceptionCode);
+ } _SEH_END;
+
OldEip = Thread->TrapFrame->Eip;
Thread->TrapFrame->Eip =
(ULONG_PTR)LdrpGetSystemDllRaiseExceptionDispatcher();
- Thread->Teb->ExceptionCode = ExceptionCode;
return((NTSTATUS)OldEip);
}
_____
Modified: trunk/reactos/ntoskrnl/ob/dirobj.c
--- trunk/reactos/ntoskrnl/ob/dirobj.c 2005-01-02 20:49:00 UTC (rev
12737)
+++ trunk/reactos/ntoskrnl/ob/dirobj.c 2005-01-02 20:51:02 UTC (rev
12738)
@@ -1,4 +1,4 @@
-/* $Id: dirobj.c,v 1.26 2004/09/05 22:26:17 hbirr Exp $
+/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -179,8 +179,8 @@
NTSTATUS Status = STATUS_SUCCESS;
ULONG DirectoryCount = 0;
ULONG DirectoryIndex = 0;
- PDIRECTORY_BASIC_INFORMATION current_odi =
(PDIRECTORY_BASIC_INFORMATION) Buffer;
- DIRECTORY_BASIC_INFORMATION ZeroOdi;
+ POBJECT_DIRECTORY_INFORMATION current_odi =
(POBJECT_DIRECTORY_INFORMATION) Buffer;
+ OBJECT_DIRECTORY_INFORMATION ZeroOdi;
PUCHAR FirstFree = (PUCHAR) Buffer;
ULONG Context;
ULONG RequiredSize;
@@ -248,14 +248,14 @@
*/
DirectoryCount = 0;
/* For the end sentenil */
- RequiredSize = sizeof(DIRECTORY_BASIC_INFORMATION);
+ RequiredSize = sizeof(OBJECT_DIRECTORY_INFORMATION);
for (current_entry = start_entry;
current_entry != &dir->head;
current_entry = current_entry->Flink)
{
current = CONTAINING_RECORD(current_entry, OBJECT_HEADER,
Entry);
- RequiredSize += sizeof(DIRECTORY_BASIC_INFORMATION) +
+ RequiredSize += sizeof(OBJECT_DIRECTORY_INFORMATION) +
current->Name.Length + sizeof(WCHAR) +
current->ObjectType->TypeName.Length +
sizeof(WCHAR);
if (RequiredSize <= BufferLength &&
@@ -284,7 +284,7 @@
/*
* Move FirstFree to point to the Unicode strings area
*/
- FirstFree += (DirectoryCount + 1) *
sizeof(DIRECTORY_BASIC_INFORMATION);
+ FirstFree += (DirectoryCount + 1) *
sizeof(OBJECT_DIRECTORY_INFORMATION);
/* Scan the directory */
current_entry = start_entry;
@@ -326,8 +326,8 @@
ObDereferenceObject(dir);
/* Terminate with all zero entry */
- memset(&ZeroOdi, '\0', sizeof(DIRECTORY_BASIC_INFORMATION));
- Status = MmCopyToCaller(current_odi, &ZeroOdi,
sizeof(DIRECTORY_BASIC_INFORMATION));
+ memset(&ZeroOdi, '\0', sizeof(OBJECT_DIRECTORY_INFORMATION));
+ Status = MmCopyToCaller(current_odi, &ZeroOdi,
sizeof(OBJECT_DIRECTORY_INFORMATION));
if (! NT_SUCCESS(Status))
{
return Status;
Show replies by date