#include "precomp.h"
#include <debug.h>
Go to the source code of this file.
|
NTSTATUS NTAPI | PsaCaptureProcessesAndThreads (OUT PSYSTEM_PROCESS_INFORMATION *ProcessesAndThreads) |
|
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) |
|
NTSTATUS NTAPI | PsaEnumerateProcessesAndThreads (IN PPROC_ENUM_ROUTINE ProcessCallback, IN OUT PVOID ProcessCallbackContext, IN PTHREAD_ENUM_ROUTINE ThreadCallback, IN OUT PVOID ThreadCallbackContext) |
|
VOID NTAPI | PsaFreeCapture (IN PVOID Capture) |
|
NTSTATUS NTAPI | PsaWalkProcesses (IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads, IN PPROC_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext) |
|
NTSTATUS NTAPI | PsaWalkThreads (IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads, IN PTHREAD_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext) |
|
NTSTATUS NTAPI | PsaEnumerateProcesses (IN PPROC_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext) |
|
NTSTATUS NTAPI | PsaEnumerateThreads (IN PTHREAD_ENUM_ROUTINE Callback, IN OUT PVOID CallbackContext) |
|
PSYSTEM_PROCESS_INFORMATION FASTCALL | PsaWalkFirstProcess (IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads) |
|
PSYSTEM_PROCESS_INFORMATION FASTCALL | PsaWalkNextProcess (IN PSYSTEM_PROCESS_INFORMATION CurrentProcess) |
|
PSYSTEM_THREAD_INFORMATION FASTCALL | PsaWalkFirstThread (IN PSYSTEM_PROCESS_INFORMATION CurrentProcess) |
|
PSYSTEM_THREAD_INFORMATION FASTCALL | PsaWalkNextThread (IN PSYSTEM_THREAD_INFORMATION CurrentThread) |
|
◆ NDEBUG
◆ PsaCaptureProcessesAndThreads()
Definition at line 38 of file processes.c.
39{
43
44 if(ProcessesAndThreads ==
NULL)
45 {
47 }
48
49
50
51
52
53
54 do
55 {
57
58
59
60
63
65 {
68 break;
69 }
70
71 pInfoBuffer = pTmp;
72
73
75 pInfoBuffer,
78
79
82
84 {
87 }
88
89 *ProcessesAndThreads = pInfoBuffer;
91}
void * PsaiMalloc(SIZE_T size)
#define NT_SUCCESS(StatCode)
@ SystemProcessInformation
#define FAILED_WITH_STATUS
#define STATUS_INVALID_PARAMETER_1
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
#define STATUS_INFO_LENGTH_MISMATCH
*nSize LPSTR _Inout_ LPDWORD nSize
Referenced by PsaEnumerateProcessesAndThreads().
◆ PsaEnumerateProcesses()
Definition at line 218 of file processes.c.
220{
225}
NTSTATUS NTAPI PsaEnumerateProcessesAndThreads(IN PPROC_ENUM_ROUTINE ProcessCallback, IN OUT PVOID ProcessCallbackContext, IN PTHREAD_ENUM_ROUTINE ThreadCallback, IN OUT PVOID ThreadCallbackContext)
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR _In_ ULONGLONG _In_ ULONGLONG _In_opt_ PEVENT_FILTER_DESCRIPTOR _Inout_opt_ PVOID CallbackContext
◆ PsaEnumerateProcessesAndThreads()
Definition at line 153 of file processes.c.
157{
160
162 {
164 }
165
166
168
170 {
171 goto Bail;
172 }
173
174
176 ProcessCallback,
177 ProcessCallbackContext,
179 ThreadCallbackContext);
180
181Bail:
183
185}
VOID NTAPI PsaFreeCapture(IN PVOID Capture)
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)
NTSTATUS NTAPI PsaCaptureProcessesAndThreads(OUT PSYSTEM_PROCESS_INFORMATION *ProcessesAndThreads)
#define STATUS_INVALID_PARAMETER
Referenced by PsaEnumerateProcesses(), and PsaEnumerateThreads().
◆ PsaEnumerateThreads()
◆ PsaFreeCapture()
◆ PsaWalkFirstProcess()
◆ PsaWalkFirstThread()
◆ PsaWalkNextProcess()
◆ PsaWalkNextThread()
◆ PsaWalkProcesses()
◆ PsaWalkProcessesAndThreads()
Definition at line 94 of file processes.c.
99{
101
103 {
105 }
106
108
110
111
112 do
113 {
114 if(ProcessCallback)
115 {
116 Status = ProcessCallback(ProcessesAndThreads, ProcessCallbackContext);
117
119 {
120 break;
121 }
122 }
123
124
126 {
129
130
132 i < ProcessesAndThreads->NumberOfThreads;
134 {
136
138 {
139 goto Bail;
140 }
141 }
142 }
143
144
146 } while(ProcessesAndThreads);
147
148Bail:
150}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
PSYSTEM_PROCESS_INFORMATION FASTCALL PsaWalkNextProcess(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess)
PSYSTEM_THREAD_INFORMATION FASTCALL PsaWalkFirstThread(IN PSYSTEM_PROCESS_INFORMATION CurrentProcess)
PSYSTEM_PROCESS_INFORMATION FASTCALL PsaWalkFirstProcess(IN PSYSTEM_PROCESS_INFORMATION ProcessesAndThreads)
PSYSTEM_THREAD_INFORMATION FASTCALL PsaWalkNextThread(IN PSYSTEM_THREAD_INFORMATION CurrentThread)
Referenced by PsaEnumerateProcessesAndThreads(), PsaWalkProcesses(), and PsaWalkThreads().
◆ PsaWalkThreads()