ReactOS 0.4.15-dev-8222-g9164419
epsapi.h
Go to the documentation of this file.
1/*
2 * epsapi.h
3 *
4 * Process Status Helper API, native interface
5 *
6 * This file is part of the ReactOS Operating System.
7 *
8 * Contributors:
9 * Created by KJK::Hyperion <noog@libero.it>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23#ifndef __EPSAPI_H_INCLUDED__
24#define __EPSAPI_H_INCLUDED__
25
26/* TYPES */
29
32
35
37 IN PLDR_DATA_TABLE_ENTRY CurrentModule,
39
40/* CONSTANTS */
41#define FAILED_WITH_STATUS DEFINE_DBG_MSG("%s() failed, status 0x%08X")
42
43/* PROTOTYPES */
44/* Processes and threads */
45/* enumeration */
48 IN OUT PVOID ProcessCallbackContext,
50 IN OUT PVOID ThreadCallbackContext);
51
55
59
60/* capturing & walking */
63
66 IN PPROC_ENUM_ROUTINE ProcessCallback,
67 IN OUT PVOID ProcessCallbackContext,
69 IN OUT PVOID ThreadCallbackContext);
70
75
80
83
86
89
92
93/* System modules */
94/* enumeration */
98
99/* capturing & walking */
102
107
110
113
114/* Process modules */
119
120/* Miscellaneous */
123
124/* The user must define these functions. They are called by PSAPI to allocate
125 memory. This allows PSAPI to be called from any environment */
126void *PsaiMalloc(SIZE_T size);
127void *PsaiRealloc(void *ptr, SIZE_T size);
128void PsaiFree(void *ptr);
129
130/* MACROS */
131#define DEFINE_DBG_MSG(__str__) "PSAPI: " __str__ "\n"
132
133#endif /* __EPSAPI_H_INCLUDED__ */
LONG NTSTATUS
Definition: precomp.h:26
struct _Capture Capture
Definition: capture.h:24
@ ThreadCallback
Definition: dbghelp.h:626
#define NTSTATUS
Definition: precomp.h:21
NTSTATUS NTAPI PsaEnumerateThreads(IN PTHREAD_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext)
Definition: processes.c:228
VOID NTAPI PsaFreeCapture(IN PVOID Capture)
Definition: processes.c:188
void PsaiFree(void *ptr)
Definition: ctm.c:103
NTSTATUS NTAPI PsaWalkProcesses(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads, IN PPROC_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext)
Definition: processes.c:194
NTSTATUS(NTAPI * PTHREAD_ENUM_ROUTINE)(IN PSYSTEM_THREAD_INFORMATION CurrentThread, IN OUT PVOID CallbackContext)
Definition: epsapi.h:30
PSYSTEM_PROCESS_INFORMATION FASTCALL PsaWalkNextProcess(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess)
Definition: processes.c:244
void * PsaiMalloc(SIZE_T size)
Definition: ctm.c:101
NTSTATUS NTAPI PsaEnumerateProcesses(IN PPROC_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext)
Definition: processes.c:218
PSYSTEM_THREAD_INFORMATION FASTCALL PsaWalkFirstThread(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess)
Definition: processes.c:257
PSYSTEM_PROCESS_INFORMATION FASTCALL PsaWalkFirstProcess(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads)
Definition: processes.c:238
void * PsaiRealloc(void *ptr, SIZE_T size)
Definition: ctm.c:102
NTSTATUS NTAPI PsaWalkThreads(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads, IN PTHREAD_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext)
Definition: processes.c:206
NTSTATUS(NTAPI * PPROCMOD_ENUM_ROUTINE)(IN HANDLE ProcessHandle, IN PLDR_DATA_TABLE_ENTRY CurrentModule, IN OUT PVOID CallbackContext)
Definition: epsapi.h:36
NTSTATUS NTAPI PsaWalkSystemModules(IN PRTL_PROCESS_MODULES SystemModules, IN PSYSMOD_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext)
Definition: drivers.c:154
NTSTATUS NTAPI PsaWalkProcessesAndThreads(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads, IN PPROC_ENUM_ROUTINE ProcessCallback, IN OUT PVOID ProcessCallbackContext, IN PTHREAD_ENUM_ROUTINE ThreadCallback, IN OUT PVOID ThreadCallbackContext)
Definition: processes.c:94
PRTL_PROCESS_MODULE_INFORMATION FASTCALL PsaWalkNextSystemModule(IN PRTL_PROCESS_MODULES CurrentSystemModule)
Definition: drivers.c:183
NTSTATUS(NTAPI * PSYSMOD_ENUM_ROUTINE)(IN PRTL_PROCESS_MODULE_INFORMATION CurrentModule, IN OUT PVOID CallbackContext)
Definition: epsapi.h:33
NTSTATUS NTAPI PsaEnumerateProcessesAndThreads(IN PPROC_ENUM_ROUTINE ProcessCallback, IN OUT PVOID ProcessCallbackContext, IN PTHREAD_ENUM_ROUTINE ThreadCallback, IN OUT PVOID ThreadCallbackContext)
Definition: processes.c:153
NTSTATUS NTAPI PsaEnumerateSystemModules(IN PSYSMOD_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext)
Definition: drivers.c:21
NTSTATUS(NTAPI * PPROC_ENUM_ROUTINE)(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess, IN OUT PVOID CallbackContext)
Definition: epsapi.h:27
NTSTATUS NTAPI PsaCaptureSystemModules(OUT PRTL_PROCESS_MODULES *SystemModules)
Definition: drivers.c:61
NTSTATUS NTAPI PsaEnumerateProcessModules(IN HANDLE ProcessHandle, IN PPROCMOD_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext)
Definition: modules.c:30
NTSTATUS NTAPI PsaCaptureProcessesAndThreads(OUT PSYSTEM_PROCESS_INFORMATION *ProcessesAndThreads)
Definition: processes.c:38
PRTL_PROCESS_MODULE_INFORMATION FASTCALL PsaWalkFirstSystemModule(IN PRTL_PROCESS_MODULES SystemModules)
Definition: drivers.c:177
PSYSTEM_THREAD_INFORMATION FASTCALL PsaWalkNextThread(IN PSYSTEM_THREAD_INFORMATION CurrentThread)
Definition: processes.c:268
GLsizeiptr size
Definition: glext.h:5919
static PVOID ptr
Definition: dispmode.c:27
_In_ HANDLE ProcessHandle
Definition: mmfuncs.h:403
#define FASTCALL
Definition: nt_native.h:50
Definition: btrfs_drv.h:1876
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR _In_ ULONGLONG _In_ ULONGLONG _In_opt_ PEVENT_FILTER_DESCRIPTOR _Inout_opt_ PVOID CallbackContext
Definition: wmitypes.h:60