User Tools

Site Tools


listing_20processes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

listing_20processes [2018/03/31 13:19]
127.0.0.1 external edit
listing_20processes [2018/04/15 10:48] (current)
richardrussell Added syntax highlighting
Line 1: Line 1:
 =====Listing processes===== =====Listing processes=====
  
-//by Michael Hicks, June 2007//\\ \\  The Microsoft Windows API call "​CreateToolhelp32Snapshot"​ takes, as its name suggests, a "​snapshot"​ of the processes (programs) running. Each process may spawn multiple "​threads"​. This code lists the running processes and provides various other details of the process such as the "​process ID", the number of threads and the other "​modules"​ (dynamic link libraries) used by the process. To keep the code short, there is no error handling. For more details about "​CreateToolhelp32Snapshot"​ see the [[http://​msdn2.microsoft.com/​en-us/​library/​ms682489.aspx|MSDN documentation]].\\ \\ +//by Michael Hicks, June 2007//\\ \\  The Microsoft Windows API call "​CreateToolhelp32Snapshot"​ takes, as its name suggests, a "​snapshot"​ of the processes (programs) running. Each process may spawn multiple "​threads"​. This code lists the running processes and provides various other details of the process such as the "​process ID", the number of threads and the other "​modules"​ (dynamic link libraries) used by the process. To keep the code short, there is no error handling. For more details about "​CreateToolhelp32Snapshot"​ see the [[http://​msdn2.microsoft.com/​en-us/​library/​ms682489.aspx|MSDN documentation]]. 
 + 
 +<code bb4w>
         _PROCESS_ALL_ACCESS = &1F0FFF         _PROCESS_ALL_ACCESS = &1F0FFF
         _MAX_PATH = 512         _MAX_PATH = 512
Line 65: Line 67:
         SYS "​CloseHandle",​ hModuleSnap%         SYS "​CloseHandle",​ hModuleSnap%
         ENDPROC         ENDPROC
 +</​code>​
listing_20processes.txt · Last modified: 2018/04/15 10:48 by richardrussell