- Status = NtOpenProcess(&ProcessHandle,
- PROCESS_QUERY_INFORMATION,
- &ObjectAttributes,
- &ClientId);
- if(NT_SUCCESS(Status))
- {
- Status = NtQueryInformationProcess(ProcessHandle,
- ProcessSessionInformation,
- &SessionInformation,
- sizeof(SessionInformation),
- NULL);
- NtClose(ProcessHandle);
+ InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);