Modified: trunk/reactos/include/ndk/ketypes.h
Modified: trunk/reactos/include/ndk/ldrtypes.h
Modified: trunk/reactos/include/ndk/obtypes.h
Modified: trunk/reactos/include/ndk/psfuncs.h
Modified: trunk/reactos/include/ndk/pstypes.h
Modified: trunk/reactos/include/ndk/zwtypes.h
Modified: trunk/reactos/lib/ntdll/ldr/startup.c
Modified: trunk/reactos/lib/ntdll/ldr/utils.c
Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
Modified: trunk/reactos/ntoskrnl/ntoskrnl.def
Modified: trunk/reactos/ntoskrnl/ps/process.c
Modified: trunk/reactos/ntoskrnl/ps/win32.c
Modified: trunk/reactos/w32api/include/ddk/winddk.h
--- trunk/reactos/include/ndk/ketypes.h 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/include/ndk/ketypes.h 2005-06-26 16:06:32 UTC (rev 16290)
@@ -251,13 +251,38 @@
ULONG PageFrameNumber : 20;
} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86;
+typedef struct _DESCRIPTOR
+{
+ WORD Pad;
+ WORD Limit;
+ DWORD Base;
+} KDESCRIPTOR, *PKDESCRIPTOR;
+
+typedef struct _KSPECIAL_REGISTERS
+{
+ DWORD Cr0;
+ DWORD Cr2;
+ DWORD Cr3;
+ DWORD Cr4;
+ DWORD KernelDr0;
+ DWORD KernelDr1;
+ DWORD KernelDr2;
+ DWORD KernelDr3;
+ DWORD KernelDr6;
+ DWORD KernelDr7;
+ KDESCRIPTOR Gdtr;
+ KDESCRIPTOR Idtr;
+ WORD Tr;
+ WORD Ldtr;
+ DWORD Reserved[6];
+} KSPECIAL_REGISTERS, *PKSPECIAL_REGISTERS;
+
#pragma pack(push,4)
-/* Fixme: Use correct types? */
typedef struct _KPROCESSOR_STATE
{
PCONTEXT ContextFrame;
- PVOID SpecialRegisters;
+ KSPECIAL_REGISTERS SpecialRegisters;
} KPROCESSOR_STATE;
/* Processor Control Block */
--- trunk/reactos/include/ndk/ldrtypes.h 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/include/ndk/ldrtypes.h 2005-06-26 16:06:32 UTC (rev 16290)
@@ -19,19 +19,24 @@
#define RESOURCE_LANGUAGE_LEVEL 2
#define RESOURCE_DATA_LEVEL 3
-/* FIXME: USE CORRRECT LDR_ FLAGS */
-#define IMAGE_DLL 0x00000004
-#define LOAD_IN_PROGRESS 0x00001000
-#define UNLOAD_IN_PROGRESS 0x00002000
-#define ENTRY_PROCESSED 0x00004000
-#define DONT_CALL_FOR_THREAD 0x00040000
-#define PROCESS_ATTACH_CALLED 0x00080000
-#define IMAGE_NOT_AT_BASE 0x00200000
+/* LDR_DATA_TABLE_ENTRY Flags */
+#define LDRP_STATIC_LINK 0x00000002
+#define LDRP_IMAGE_DLL 0x00000004
+#define LDRP_LOAD_IN_PROGRESS 0x00001000
+#define LDRP_UNLOAD_IN_PROGRESS 0x00002000
+#define LDRP_ENTRY_PROCESSED 0x00004000
+#define LDRP_ENTRY_INSERTED 0x00008000
+#define LDRP_CURRENT_LOAD 0x00010000
+#define LDRP_FAILED_BUILTIN_LOAD 0x00020000
+#define LDRP_DONT_CALL_FOR_THREADS 0x00040000
+#define LDRP_PROCESS_ATTACH_CALLED 0x00080000
+#define LDRP_DEBUG_SYMBOLS_LOADED 0x00100000
+#define LDRP_IMAGE_NOT_AT_BASE 0x00200000
+#define LDRP_WX86_IGNORE_MACHINETYPE 0x00400000
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
-/* FIXME: Update with _LDR_DATA_TABLE_ENTRY and LDR_ flags */
typedef struct _PEB_LDR_DATA
{
ULONG Length;
@@ -54,8 +59,8 @@
UNICODE_STRING FullDllName;
UNICODE_STRING BaseDllName;
ULONG Flags;
- USHORT LoadCount; /* FIXME: HACK!!! FIX ASAP */
- USHORT TlsIndex; /* FIXME: HACK!!! FIX ASAP */
+ USHORT LoadCount;
+ USHORT TlsIndex;
LIST_ENTRY HashLinks;
PVOID SectionPointer;
ULONG CheckSum;
--- trunk/reactos/include/ndk/obtypes.h 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/include/ndk/obtypes.h 2005-06-26 16:06:32 UTC (rev 16290)
@@ -115,17 +115,6 @@
/* TYPES *********************************************************************/
-/* FIXME: Does this match NT's? */
-typedef struct _W32_OBJECT_CALLBACK
-{
- OB_OPEN_METHOD WinStaCreate;
- OB_PARSE_METHOD WinStaParse;
- OB_DELETE_METHOD WinStaDelete;
- OB_FIND_METHOD WinStaFind;
- OB_CREATE_METHOD DesktopCreate;
- OB_DELETE_METHOD DesktopDelete;
-} W32_OBJECT_CALLBACK, *PW32_OBJECT_CALLBACK;
-
typedef struct _OBJECT_BASIC_INFORMATION
{
ULONG Attributes;
--- trunk/reactos/include/ndk/psfuncs.h 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/include/ndk/psfuncs.h 2005-06-26 16:06:32 UTC (rev 16290)
@@ -14,8 +14,30 @@
/* PROTOTYPES ****************************************************************/
+PVOID
+STDCALL
+PsGetProcessWin32Process(PEPROCESS Process);
+
VOID
STDCALL
+PsSetProcessWin32Process(
+ PEPROCESS Process,
+ PVOID Win32Process
+);
+
+VOID
+STDCALL
+PsSetThreadWin32Thread(
+ PETHREAD Thread,
+ PVOID Win32Thread
+);
+
+PVOID
+STDCALL
+PsGetThreadWin32Thread(PETHREAD Thread);
+
+VOID
+STDCALL
PsRevertThreadToSelf(
IN struct _ETHREAD* Thread
);
@@ -34,14 +56,7 @@
VOID
STDCALL
-PsEstablishWin32Callouts(
- PW32_PROCESS_CALLBACK W32ProcessCallback,
- PW32_THREAD_CALLBACK W32ThreadCallback,
- PW32_OBJECT_CALLBACK W32ObjectCallback,
- PVOID Param4,
- ULONG W32ThreadSize,
- ULONG W32ProcessSize
-);
+PsEstablishWin32Callouts(PW32_CALLOUT_DATA CalloutData);
HANDLE
STDCALL
--- trunk/reactos/include/ndk/pstypes.h 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/include/ndk/pstypes.h 2005-06-26 16:06:32 UTC (rev 16290)
@@ -617,6 +617,29 @@
} EJOB, *PEJOB;
#include <poppack.h>
+typedef struct _W32_CALLOUT_DATA
+{
+ PW32_PROCESS_CALLBACK W32ProcessCallout;
+ PW32_THREAD_CALLBACK W32ThreadCallout;
+ PVOID UserGlobalAtomTableCallout;
+ PVOID UserPowerEventCallout;
+ PVOID UserPowerStateCallout;
+ PVOID UserJobCallout;
+ PVOID NtGdiUserFlushUserBatch;
+ OB_OPEN_METHOD DesktopOpen;
+ PVOID DesktopUnmap;
+ OB_DELETE_METHOD DesktopDelete;
+ OB_OKAYTOCLOSE_METHOD WinstaOkayToClose;
+ OB_DELETE_METHOD WinStaDelete;
+ OB_PARSE_METHOD WinStaParse;
+ OB_OPEN_METHOD WinStaOpen;
+
+ /* FIXME: These are ROS-ONLY and are fixed in a future local patch */
+ OB_FIND_METHOD WinStaFind;
+ OB_OPEN_METHOD WinStaCreate;
+ OB_CREATE_METHOD DesktopCreate;
+} W32_CALLOUT_DATA, *PW32_CALLOUT_DATA;
+
#endif
#endif
--- trunk/reactos/include/ndk/zwtypes.h 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/include/ndk/zwtypes.h 2005-06-26 16:06:32 UTC (rev 16290)
@@ -95,16 +95,14 @@
/*
* Process (extra ones not defined in DDK)
*/
-/* FIXME: Temporary hack until all KMODE stuf are NDK */
-#ifndef __WINDDK_H
typedef enum _PROCESS_INFORMATION_FLAGS
{
ProcessUnknown33 = 33,
ProcessUnknown34,
ProcessUnknown35,
- ProcessCookie
+ ProcessCookie,
+ MaximumProcessInformationClass
} PROCESS_INFORMATION_FLAGS;
-#endif
/*
* System
--- trunk/reactos/lib/ntdll/ldr/startup.c 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/lib/ntdll/ldr/startup.c 2005-06-26 16:06:32 UTC (rev 16290)
@@ -366,7 +366,7 @@
FullNtDllPath);
RtlCreateUnicodeString (&NtModule->BaseDllName,
L"ntdll.dll");
- NtModule->Flags = IMAGE_DLL|ENTRY_PROCESSED;
+ NtModule->Flags = LDRP_IMAGE_DLL|LDRP_ENTRY_PROCESSED;
NtModule->LoadCount = -1; /* don't unload */
NtModule->TlsIndex = -1;
@@ -415,7 +415,7 @@
&ExeModule->BaseDllName,
&ExeModule->FullDllName);
- ExeModule->Flags = ENTRY_PROCESSED;
+ ExeModule->Flags = LDRP_ENTRY_PROCESSED;
ExeModule->LoadCount = -1; /* don't unload */
ExeModule->TlsIndex = -1;
ExeModule->SectionPointer = NULL;
--- trunk/reactos/lib/ntdll/ldr/utils.c 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/lib/ntdll/ldr/utils.c 2005-06-26 16:06:32 UTC (rev 16290)
@@ -170,7 +170,7 @@
static BOOLEAN LdrpCallDllEntry(PLDR_DATA_TABLE_ENTRY Module, DWORD dwReason, PVOID lpReserved)
{
- if (!(Module->Flags & IMAGE_DLL) ||
+ if (!(Module->Flags & LDRP_IMAGE_DLL) ||
Module->EntryPoint == 0)
{
return TRUE;
@@ -1723,7 +1723,7 @@
{
BOOLEAN WrongForwarder;
WrongForwarder = FALSE;
- if (ImportedModule->Flags & IMAGE_NOT_AT_BASE)
+ if (ImportedModule->Flags & LDRP_IMAGE_NOT_AT_BASE)
{
TRACE_LDR("%wZ has stale binding to %s\n",
&Module->BaseDllName, ImportedName);
@@ -1757,7 +1757,7 @@
LdrpDecrementLoadCount(Module, FALSE);
}
if (ForwarderModule->TimeDateStamp != BoundForwarderRef->TimeDateStamp ||
- ForwarderModule->Flags & IMAGE_NOT_AT_BASE)
+ ForwarderModule->Flags & LDRP_IMAGE_NOT_AT_BASE)
{
TRACE_LDR("%wZ has stale binding to %s\n",
&Module->BaseDllName, ForwarderName);
@@ -1771,7 +1771,7 @@
}
}
if (WrongForwarder ||
- ImportedModule->Flags & IMAGE_NOT_AT_BASE)
+ ImportedModule->Flags & LDRP_IMAGE_NOT_AT_BASE)
{
Status = LdrpProcessImportDirectory(Module, ImportedModule, ImportedName);
if (!NT_SUCCESS(Status))
@@ -1780,7 +1780,7 @@
return Status;
}
}
- else if (ImportedModule->Flags & IMAGE_NOT_AT_BASE)
+ else if (ImportedModule->Flags & LDRP_IMAGE_NOT_AT_BASE)
{
TRACE_LDR("Adjust imports for %s from %wZ\n",
ImportedName, &Module->BaseDllName);
@@ -1938,7 +1938,7 @@
if (ImageBase != (PVOID) NTHeaders->OptionalHeader.ImageBase)
{
- (*Module)->Flags |= IMAGE_NOT_AT_BASE;
+ (*Module)->Flags |= LDRP_IMAGE_NOT_AT_BASE;
}
/*
@@ -2107,11 +2107,11 @@
(*Module)->SectionPointer = SectionHandle;
if (ImageBase != (PVOID) NtHeaders->OptionalHeader.ImageBase)
{
- (*Module)->Flags |= IMAGE_NOT_AT_BASE;
+ (*Module)->Flags |= LDRP_IMAGE_NOT_AT_BASE;
}
if (NtHeaders->FileHeader.Characteristics & IMAGE_FILE_DLL)
{
- (*Module)->Flags |= IMAGE_DLL;
+ (*Module)->Flags |= LDRP_IMAGE_DLL;
}
/* fixup the imported calls entry points */
Status = LdrFixupImports(SearchPath, *Module);
@@ -2292,7 +2292,7 @@
{
if (Module->TlsIndex == 0xFFFF)
{
- Module->Flags |= DONT_CALL_FOR_THREAD;
+ Module->Flags |= LDRP_DONT_CALL_FOR_THREADS;
Status = STATUS_SUCCESS;
}
break;
@@ -2420,15 +2420,15 @@
{
Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
if (((UnloadAll && Module->LoadCount <= 0) || Module->LoadCount == 0) &&
- Module->Flags & ENTRY_PROCESSED &&
- !(Module->Flags & UNLOAD_IN_PROGRESS))
+ Module->Flags & LDRP_ENTRY_PROCESSED &&
+ !(Module->Flags & LDRP_UNLOAD_IN_PROGRESS))
{
- Module->Flags |= UNLOAD_IN_PROGRESS;
+ Module->Flags |= LDRP_UNLOAD_IN_PROGRESS;
if (Module == LdrpLastModule)
{
LdrpLastModule = NULL;
}
- if (Module->Flags & PROCESS_ATTACH_CALLED)
+ if (Module->Flags & LDRP_PROCESS_ATTACH_CALLED)
{
TRACE_LDR("Unload %wZ - Calling entry point at %x\n",
&Module->BaseDllName, Module->EntryPoint);
@@ -2453,7 +2453,7 @@
{
Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
Entry = Entry->Blink;
- if (Module->Flags & UNLOAD_IN_PROGRESS &&
+ if (Module->Flags & LDRP_UNLOAD_IN_PROGRESS &&
((UnloadAll && Module->LoadCount != 0xFFFF) || Module->LoadCount == 0))
{
/* remove the module entry from the list */
@@ -2512,9 +2512,9 @@
while (Entry != ModuleListHead)
{
Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
- if (!(Module->Flags & (LOAD_IN_PROGRESS|UNLOAD_IN_PROGRESS|ENTRY_PROCESSED)))
+ if (!(Module->Flags & (LDRP_LOAD_IN_PROGRESS|LDRP_UNLOAD_IN_PROGRESS|LDRP_ENTRY_PROCESSED)))
{
- Module->Flags |= LOAD_IN_PROGRESS;
+ Module->Flags |= LDRP_LOAD_IN_PROGRESS;
TRACE_LDR("%wZ loaded - Calling init routine at %x for process attaching\n",
&Module->BaseDllName, Module->EntryPoint);
Result = LdrpCallDllEntry(Module, DLL_PROCESS_ATTACH, (PVOID)(Module->LoadCount == 0xFFFF ? 1 : 0));
@@ -2523,15 +2523,15 @@
Status = STATUS_DLL_INIT_FAILED;
break;
}
- if (Module->Flags & IMAGE_DLL && Module->EntryPoint != 0)
+ if (Module->Flags & LDRP_IMAGE_DLL && Module->EntryPoint != 0)
{
- Module->Flags |= PROCESS_ATTACH_CALLED|ENTRY_PROCESSED;
+ Module->Flags |= LDRP_PROCESS_ATTACH_CALLED|LDRP_ENTRY_PROCESSED;
}
else
{
- Module->Flags |= ENTRY_PROCESSED;
+ Module->Flags |= LDRP_ENTRY_PROCESSED;
}
- Module->Flags &= ~LOAD_IN_PROGRESS;
+ Module->Flags &= ~LDRP_LOAD_IN_PROGRESS;
}
Entry = Entry->Flink;
}
@@ -2578,9 +2578,9 @@
while (Entry != ModuleListHead)
{
Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
- if (Module->Flags & PROCESS_ATTACH_CALLED &&
- !(Module->Flags & DONT_CALL_FOR_THREAD) &&
- !(Module->Flags & UNLOAD_IN_PROGRESS))
+ if (Module->Flags & LDRP_PROCESS_ATTACH_CALLED &&
+ !(Module->Flags & LDRP_DONT_CALL_FOR_THREADS) &&
+ !(Module->Flags & LDRP_UNLOAD_IN_PROGRESS))
{
TRACE_LDR("%wZ - Calling entry point at %x for thread attaching\n",
&Module->BaseDllName, Module->EntryPoint);
@@ -2623,9 +2623,9 @@
{
Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
- if (Module->Flags & PROCESS_ATTACH_CALLED &&
- !(Module->Flags & DONT_CALL_FOR_THREAD) &&
- !(Module->Flags & UNLOAD_IN_PROGRESS))
+ if (Module->Flags & LDRP_PROCESS_ATTACH_CALLED &&
+ !(Module->Flags & LDRP_DONT_CALL_FOR_THREADS) &&
+ !(Module->Flags & LDRP_UNLOAD_IN_PROGRESS))
{
TRACE_LDR("%wZ - Calling entry point at %x for thread detaching\n",
&Module->BaseDllName, Module->EntryPoint);
--- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h 2005-06-26 16:06:32 UTC (rev 16290)
@@ -43,7 +43,7 @@
/*
* Defines a descriptor as it appears in the processor tables
*/
-typedef struct _DESCRIPTOR
+typedef struct __DESCRIPTOR
{
ULONG a;
ULONG b;
--- trunk/reactos/ntoskrnl/ntoskrnl.def 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/ntoskrnl/ntoskrnl.def 2005-06-26 16:06:32 UTC (rev 16290)
@@ -871,11 +871,10 @@
PsChargeProcessPoolQuota@12
PsCreateSystemProcess@12
PsCreateSystemThread@28
-PsCreateWin32Process@4
PsDereferenceImpersonationToken@4=PsDereferencePrimaryToken@4
PsDereferencePrimaryToken@4
PsDisableImpersonation@8
-PsEstablishWin32Callouts@24
+PsEstablishWin32Callouts@4
PsGetCurrentProcessId@0
PsGetCurrentProcessSessionId@0
PsGetCurrentThreadId@0
--- trunk/reactos/ntoskrnl/ps/process.c 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/ntoskrnl/ps/process.c 2005-06-26 16:06:32 UTC (rev 16290)
@@ -669,6 +669,20 @@
return (HANDLE)Process->Session;
}
+struct _W32THREAD*
+STDCALL
+PsGetWin32Thread(VOID)
+{
+ return(PsGetCurrentThread()->Tcb.Win32Thread);
+}
+
+struct _W32PROCESS*
+STDCALL
+PsGetWin32Process(VOID)
+{
+ return (struct _W32PROCESS*)PsGetCurrentProcess()->Win32Process;
+}
+
/*
* @implemented
*/
--- trunk/reactos/ntoskrnl/ps/win32.c 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/ntoskrnl/ps/win32.c 2005-06-26 16:06:32 UTC (rev 16290)
@@ -18,8 +18,6 @@
static PW32_PROCESS_CALLBACK PspWin32ProcessCallback = NULL;
static PW32_THREAD_CALLBACK PspWin32ThreadCallback = NULL;
-static ULONG PspWin32ProcessSize = 0;
-static ULONG PspWin32ThreadSize = 0;
extern OB_OPEN_METHOD ExpWindowStationObjectOpen;
extern OB_PARSE_METHOD ExpWindowStationObjectParse;
@@ -45,106 +43,48 @@
/* FUNCTIONS ***************************************************************/
-struct _W32THREAD*
-STDCALL
-PsGetWin32Thread(VOID)
-{
- return(PsGetCurrentThread()->Tcb.Win32Thread);
-}
-
-struct _W32PROCESS*
-STDCALL
-PsGetWin32Process(VOID)
-{
- return (struct _W32PROCESS*)PsGetCurrentProcess()->Win32Process;
-}
-
-NTSTATUS STDCALL
-PsCreateWin32Process(PEPROCESS Process)
-{
- if (Process->Win32Process != NULL)
- return(STATUS_SUCCESS);
-
- Process->Win32Process = ExAllocatePool(NonPagedPool,
- PspWin32ProcessSize);
- if (Process->Win32Process == NULL)
- return(STATUS_NO_MEMORY);
-
- RtlZeroMemory(Process->Win32Process,
- PspWin32ProcessSize);
-
- return(STATUS_SUCCESS);
-}
-
-
/*
* @implemented
*/
-VOID STDCALL
-PsEstablishWin32Callouts (PW32_PROCESS_CALLBACK W32ProcessCallback,
- PW32_THREAD_CALLBACK W32ThreadCallback,
- PW32_OBJECT_CALLBACK W32ObjectCallback,
- PVOID Param4,
- ULONG W32ThreadSize,
- ULONG W32ProcessSize)
+VOID
+STDCALL
+PsEstablishWin32Callouts(PW32_CALLOUT_DATA CalloutData)
{
- PspWin32ProcessCallback = W32ProcessCallback;
- PspWin32ThreadCallback = W32ThreadCallback;
-
- PspWin32ProcessSize = W32ProcessSize;
- PspWin32ThreadSize = W32ThreadSize;
-
- ExpWindowStationObjectOpen = W32ObjectCallback->WinStaCreate;
- ExpWindowStationObjectParse = W32ObjectCallback->WinStaParse;
- ExpWindowStationObjectDelete = W32ObjectCallback->WinStaDelete;
- ExpWindowStationObjectFind = W32ObjectCallback->WinStaFind;
- ExpDesktopObjectCreate = W32ObjectCallback->DesktopCreate;
- ExpDesktopObjectDelete = W32ObjectCallback->DesktopDelete;
+ PspWin32ProcessCallback = CalloutData->W32ProcessCallout;
+ PspWin32ThreadCallback = CalloutData->W32ThreadCallout;
+ ExpWindowStationObjectOpen = CalloutData->WinStaCreate;
+ ExpWindowStationObjectParse = CalloutData->WinStaParse;
+ ExpWindowStationObjectDelete = CalloutData->WinStaDelete;
+ ExpWindowStationObjectFind = CalloutData->WinStaFind;
+ ExpDesktopObjectCreate = CalloutData->DesktopCreate;
+ ExpDesktopObjectDelete = CalloutData->DesktopDelete;
}
NTSTATUS
PsInitWin32Thread (PETHREAD Thread)
{
- PEPROCESS Process;
+ PEPROCESS Process;
+ NTSTATUS Status;
- Process = Thread->ThreadsProcess;
+ Process = Thread->ThreadsProcess;
- if (Process->Win32Process == NULL)
+ if (Process->Win32Process == NULL)
{
- /* FIXME - lock the process */
- Process->Win32Process = ExAllocatePool (NonPagedPool,
- PspWin32ProcessSize);
-
- if (Process->Win32Process == NULL)
- return STATUS_NO_MEMORY;
-
- RtlZeroMemory (Process->Win32Process,
- PspWin32ProcessSize);
- /* FIXME - unlock the process */
-
- if (PspWin32ProcessCallback != NULL)
- {
- PspWin32ProcessCallback (Process, TRUE);
- }
+ if (PspWin32ProcessCallback != NULL)
+ {
+ Status = PspWin32ProcessCallback(Process, TRUE);
+ }
}
- if (Thread->Tcb.Win32Thread == NULL)
+ if (Thread->Tcb.Win32Thread == NULL)
{
- Thread->Tcb.Win32Thread = ExAllocatePool (NonPagedPool,
- PspWin32ThreadSize);
- if (Thread->Tcb.Win32Thread == NULL)
- return STATUS_NO_MEMORY;
-
- RtlZeroMemory (Thread->Tcb.Win32Thread,
- PspWin32ThreadSize);
-
- if (PspWin32ThreadCallback != NULL)
- {
- PspWin32ThreadCallback (Thread, TRUE);
- }
+ if (PspWin32ThreadCallback != NULL)
+ {
+ Status = PspWin32ThreadCallback(Thread, TRUE);
+ }
}
- return(STATUS_SUCCESS);
+ return Status;
}
--- trunk/reactos/w32api/include/ddk/winddk.h 2005-06-26 15:49:56 UTC (rev 16289)
+++ trunk/reactos/w32api/include/ddk/winddk.h 2005-06-26 16:06:32 UTC (rev 16290)
@@ -4330,10 +4330,6 @@
ProcessDebugObjectHandle,
ProcessDebugFlags,
ProcessHandleTracing,
- ProcessUnknown33,
- ProcessUnknown34,
- ProcessUnknown35,
- ProcessCookie,
MaxProcessInfoClass
} PROCESSINFOCLASS;