mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
22bf8a798e
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@1099 21ef857c-d57f-4fe0-8362-d861dc6d29cd
88 lines
2.9 KiB
C
88 lines
2.9 KiB
C
/*
|
|
* Process Hacker Driver -
|
|
* system calls
|
|
*
|
|
* Copyright (C) 2009 wj32
|
|
*
|
|
* This file is part of Process Hacker.
|
|
*
|
|
* Process Hacker is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Process Hacker is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with Process Hacker. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef _ZW_H
|
|
#define _ZW_H
|
|
|
|
#include "types.h"
|
|
|
|
#define PROCESS_TERMINATE (0x0001)
|
|
#define PROCESS_CREATE_THREAD (0x0002)
|
|
#define PROCESS_SET_SESSIONID (0x0004)
|
|
#define PROCESS_VM_OPERATION (0x0008)
|
|
#define PROCESS_VM_READ (0x0010)
|
|
#define PROCESS_VM_WRITE (0x0020)
|
|
#define PROCESS_DUP_HANDLE (0x0040)
|
|
#define PROCESS_CREATE_PROCESS (0x0080)
|
|
#define PROCESS_SET_QUOTA (0x0100)
|
|
#define PROCESS_SET_INFORMATION (0x0200)
|
|
#define PROCESS_QUERY_INFORMATION (0x0400)
|
|
#define PROCESS_SUSPEND_RESUME (0x0800)
|
|
#define PROCESS_QUERY_LIMITED_INFORMATION (0x1000)
|
|
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
|
|
#define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | \
|
|
0xFFFF)
|
|
#else
|
|
#define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | \
|
|
0xFFF)
|
|
#endif
|
|
|
|
#define JOB_OBJECT_ASSIGN_PROCESS (0x0001)
|
|
#define JOB_OBJECT_SET_ATTRIBUTES (0x0002)
|
|
#define JOB_OBJECT_QUERY (0x0004)
|
|
#define JOB_OBJECT_TERMINATE (0x0008)
|
|
#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES (0x0010)
|
|
#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | \
|
|
0x1F)
|
|
|
|
typedef struct _SYSTEM_MODULE_INFORMATION
|
|
{
|
|
ULONG Reserved[2];
|
|
PVOID Base;
|
|
ULONG Size;
|
|
ULONG Flags;
|
|
USHORT Index;
|
|
USHORT Unknown;
|
|
USHORT LoadCount;
|
|
USHORT ModuleNameOffset;
|
|
CHAR ImageName[256];
|
|
} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
|
|
|
|
NTSTATUS NTAPI ZwOpenProcessToken(
|
|
HANDLE ProcessHandle,
|
|
ACCESS_MASK DesiredAccess,
|
|
PHANDLE TokenHandle
|
|
);
|
|
|
|
NTSTATUS NTAPI ZwSetInformationProcess(
|
|
HANDLE ProcessHandle,
|
|
PROCESSINFOCLASS ProcessInformationClass,
|
|
PVOID ProcessInformation,
|
|
ULONG ProcessInformationLength
|
|
);
|
|
|
|
typedef NTSTATUS (NTAPI *_NtClose)(
|
|
HANDLE Handle
|
|
);
|
|
|
|
#endif
|