[NDK/NTOSKRNK]

- Finally make EPROCESS::Session  PVOID, as it's supposed to be
- add missing Wow64Process member

svn path=/trunk/; revision=56263
This commit is contained in:
Timo Kreuzer 2012-03-28 18:46:30 +00:00
parent 5491e8fbde
commit 549c33f2ff
2 changed files with 16 additions and 12 deletions

View file

@ -1112,13 +1112,17 @@ typedef struct _EPROCESS
HARDWARE_PTE PageDirectoryPte;
ULONGLONG Filler;
};
ULONG Session; // FIXME: PVOID
PVOID Session;
CHAR ImageFileName[16];
LIST_ENTRY JobLinks;
PVOID LockedPagesList;
LIST_ENTRY ThreadListHead;
PVOID SecurityPort;
#ifdef _M_AMD64
struct _WOW64_PROCESS *Wow64Process;
#else
PVOID PaeTop;
#endif
ULONG ActiveThreads;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
ULONG ImagePathHash;

View file

@ -880,10 +880,10 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
Status = STATUS_INFO_LENGTH_MISMATCH;
break;
}
/* Indicate success */
Status = STATUS_SUCCESS;
/* Protect write in SEH */
_SEH2_TRY
{
@ -958,14 +958,14 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
{
/* Get the WOW64 process structure */
#ifdef _WIN64
Wow64 = Process->Wow64Process;
Wow64 = (ULONG_PTR)Process->Wow64Process;
#else
Wow64 = 0;
#endif
/* Release the lock */
ExReleaseRundownProtection(&Process->RundownProtect);
}
/* Protect write with SEH */
_SEH2_TRY
{
@ -982,9 +982,9 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
/* Dereference the process */
ObDereferenceObject(Process);
break;
case ProcessExecuteFlags:
/* Set return length */
Length = sizeof(ULONG);
if (ProcessInformationLength != Length)
@ -1322,7 +1322,7 @@ NtSetInformationProcess(IN HANDLE ProcessHandle,
if (!NT_SUCCESS(Status)) break;
/* Write the session ID in the EPROCESS */
Process->Session = SessionInfo.SessionId;
Process->Session = UlongToPtr(SessionInfo.SessionId); // HACK!!!
/* Check if the process also has a PEB */
if (Process->Peb)
@ -1811,11 +1811,11 @@ NtSetInformationProcess(IN HANDLE ProcessHandle,
KeSetAutoAlignmentProcess(&Process->Pcb, FALSE);
Status = STATUS_SUCCESS;
break;
case ProcessUserModeIOPL:
/* Only TCB can do this */
if (!SeSinglePrivilegeCheck(SeTcbPrivilege, PreviousMode))
if (!SeSinglePrivilegeCheck(SeTcbPrivilege, PreviousMode))
{
/* Fail */
DPRINT1("Need TCB to set IOPL\n");
@ -1863,7 +1863,7 @@ NtSetInformationProcess(IN HANDLE ProcessHandle,
/* Call Mm for the update */
Status = MmSetExecuteOptions(NoExecute);
break;
/* We currently don't implement any of these */
case ProcessLdtInformation:
case ProcessLdtSize:
@ -2319,7 +2319,7 @@ NtSetInformationThread(IN HANDLE ThreadHandle,
/* All done */
break;
case ThreadBreakOnTermination:
/* Check buffer length */