NTSTATUS
NTAPI
-PsLockProcess(PEPROCESS Process, BOOLEAN Timeout)
+PsLockProcess(PROS_EPROCESS Process, BOOLEAN Timeout)
{
ULONG Attempts = 0;
PKTHREAD PrevLockOwner;
VOID
NTAPI
-PsUnlockProcess(PEPROCESS Process)
+PsUnlockProcess(PROS_EPROCESS Process)
{
PAGED_CODE();
ObjectAttributes,
PreviousMode,
NULL,
- sizeof(EPROCESS),
+ sizeof(ROS_EPROCESS),
0,
0,
(PVOID*)&Process);
/* Clean up the Object */
DPRINT("Cleaning Process Object\n");
- RtlZeroMemory(Process, sizeof(EPROCESS));
+ RtlZeroMemory(Process, sizeof(ROS_EPROCESS));
/* Inherit stuff from the Parent since we now have the object created */
if (pParentProcess)
/* Setup the Lock Event */
DPRINT("Initialzing Process Lock\n");
- KeInitializeEvent(&Process->LockEvent, SynchronizationEvent, FALSE);
+ KeInitializeEvent(&((PROS_EPROCESS)Process)->LockEvent, SynchronizationEvent, FALSE);
/* Setup the Thread List Head */
DPRINT("Initialzing Process ThreadListHead\n");
/* Set Process's Directory Base */
DPRINT("Initialzing Process Directory Base\n");
- MmCopyMmInfo(pParentProcess ? pParentProcess : PsInitialSystemProcess,
- Process,
+ MmCopyMmInfo((PROS_EPROCESS)(pParentProcess ? pParentProcess : PsInitialSystemProcess),
+ (PROS_EPROCESS)Process,
&DirectoryTableBase);
/* Now initialize the Kernel Process */
/* Create the Process' Address Space */
DPRINT("Initialzing Process Address Space\n");
- Status = MmCreateProcessAddressSpace(Process, SectionObject);
+ Status = MmCreateProcessAddressSpace((PROS_EPROCESS)Process, (PROS_SECTION_OBJECT)SectionObject);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to create Address Space\n");
if (pParentProcess)
{
DPRINT("Creating PEB\n");
- Status = MmCreatePeb(Process);
+ Status = MmCreatePeb((PROS_EPROCESS)Process);
if (!NT_SUCCESS(Status))
{
DbgPrint("NtCreateProcess() Peb creation failed: Status %x\n",Status);