Many a times we need to see whether a particular application is running in the memory. We can get the information of processes running in the memory by using API functions Process32First( ) and Process32Next( )
as shown below.
PROCESSENTRY32 pr ;
HANDLE h = CreateToolhelp32Snapshot ( TH32CS_SNAPPROCESS, 0 ) ;
Process32First ( h, &pr ) ;
do
{
///Write your code///
} while ( Process32Next ( h, &pr ) ) ;