7#include <reactos/buildno.h>
25#define ALREADY_PROCESSED ((DWORD)-1)
68 printf (
"ReactOS "KERNEL_VERSION_STR
" T(ask)List\n");
69 printf (
"Copyright (c) 2000,2001 Emanuele Aliberti\n\n");
76 printf (
"Usage: tlist [-t | PID | -l]\n\n"
77 " -t print the task list tree\n"
78 " PID print module information for this ID\n"
79 " -l print license information\n");
87"This program is free software; you can redistribute it and/or modify\n"
88"it under the terms of the GNU General Public License as published by\n"
89"the Free Software Foundation; either version 2 of the License, or\n"
90"(at your option) any later version.\n\n");
92"This program is distributed in the hope that it will be useful,\n"
93"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
94"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
95"GNU General Public License for more details.\n\n");
97"You should have received a copy of the GNU General Public License\n"
98"along with this program; if not, write to the Free Software\n"
99"Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\n");
117 if (
NULL == pInfo)
return 0;
226 if (
FALSE == DisplayTree)
230 L"%4d %-16s %s (%04d)\n",
300 (
PVOID) & Win32StartAddress,
301 sizeof Win32StartAddress,
313 wprintf (
L" %4d Win32StartAddr:0x%p LastErr:0x%08x State:%s\n",
416 printf (
" CWD: %s\n",
"");
417 printf (
" CmdLine: %s\n",
"");
419 printf (
" VirtualSize: %5ld kb PeakVirtualSize: %5ld kb\n",
423 printf (
" WorkingSetSize: %5ld kb PeakWorkingSetSize: %5ld kb\n",
int getopt(int nargc, char *const *nargv, const char *ostr)
#define UlongToHandle(ul)
#define NT_SUCCESS(StatCode)
static const WCHAR Title[]
#define INVALID_HANDLE_VALUE
@ ThreadQuerySetWin32StartAddress
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
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
_Check_return_ long __cdecl atol(_In_z_ const char *_Str)
#define PROCESS_QUERY_INFORMATION
#define THREAD_QUERY_INFORMATION
@ ProcessBasicInformation
_In_ BOOL _In_ HANDLE hProcess
VOID NTAPI PsaFreeCapture(IN PVOID Capture)
PSYSTEM_THREADS FASTCALL PsaWalkNextThread(IN PSYSTEM_THREADS CurrentThread)
PSYSTEM_PROCESSES FASTCALL PsaWalkNextProcess(IN PSYSTEM_PROCESSES CurrentProcess)
NTSTATUS NTAPI PsaCaptureProcessesAndThreads(OUT PSYSTEM_PROCESSES *ProcessesAndThreads)
PSYSTEM_THREADS FASTCALL PsaWalkFirstThread(IN PSYSTEM_PROCESSES CurrentProcess)
PSYSTEM_PROCESSES FASTCALL PsaWalkFirstProcess(IN PSYSTEM_PROCESSES ProcessesAndThreads)
struct _SYSTEM_PROCESS_INFORMATION * PSYSTEM_PROCESS_INFORMATION
#define NtCurrentProcess()
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSTATUS NTAPI NtFreeVirtualMemory(IN HANDLE ProcessHandle, IN PVOID *UBaseAddress, IN PSIZE_T URegionSize, IN ULONG FreeType)
NTSTATUS NTAPI NtAllocateVirtualMemory(IN HANDLE ProcessHandle, IN OUT PVOID *UBaseAddress, IN ULONG_PTR ZeroBits, IN OUT PSIZE_T URegionSize, IN ULONG AllocationType, IN ULONG Protect)
NTSTATUS NTAPI NtOpenProcess(OUT PHANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN PCLIENT_ID ClientId)
NTSTATUS NTAPI NtQueryInformationThread(IN HANDLE ThreadHandle, IN THREADINFOCLASS ThreadInformationClass, OUT PVOID ThreadInformation, IN ULONG ThreadInformationLength, OUT PULONG ReturnLength OPTIONAL)
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
NTSTATUS NTAPI NtOpenThread(OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN PCLIENT_ID ClientId OPTIONAL)
SIZE_T PeakWorkingSetSize
void * PsaiMalloc(SIZE_T size)
BOOL WINAPI AcquirePrivileges(VOID)
#define ALREADY_PROCESSED
int WINAPI PrintModules(VOID)
int WINAPI PrintProcessInfoDepth(PSYSTEM_PROCESS_INFORMATION pInfo, LONG Depth)
int WINAPI PrintProcess(char *PidStr)
BOOL WINAPI GetProcessInfo(PSYSTEM_PROCESS_INFORMATION pInfo, LPWSTR *Module, LPWSTR *Title)
int WINAPI PrintSynopsys(int nRetVal)
PSYSTEM_PROCESS_INFORMATION WINAPI GetProcessInfoPid(PSYSTEM_PROCESS_INFORMATION pInfoBase, HANDLE Pid)
int WINAPI ProcessHasDescendants(HANDLE Pid, PSYSTEM_PROCESS_INFORMATION pInfo)
int WINAPI PrintThreads(PSYSTEM_PROCESS_INFORMATION pInfo)
int WINAPI PrintProcessAndDescendants(PSYSTEM_PROCESS_INFORMATION pInfo, PSYSTEM_PROCESS_INFORMATION pInfoBase, LONG Depth)
int WINAPI PrintLicense(VOID)
int WINAPI PrintProcessList(BOOL DisplayTree)
*nSize LPSTR _Inout_ LPDWORD nSize
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
_Out_ PCLIENT_ID ClientId