Current Students zy Books 21 Variables int 22 24 Arth expres
Current Students zy Books 2.1 Variables (int) 2.2 24 Arth, expressions ont) Floating point (double) 2.6 Constant variables 2.8 Math functions 2.9 Type conversions 2.11 String basics 2.12 Integer overfow 213 Numenc data types Unsigned 2.15 Random numbers 2.17 Style guidelines 2.18 2.19 c example: Salary 220 C++ example: Manried E 221 Lab 1 ry Universey of Nanth Carolin. of minutes terms of Hours and minutes Forexample rheuserinputs go output otrour code must be 1 hour and 30 minutes Ruse he operalar Part Two Wrte a program hattains inthe user\'s age in years asinput Calculate the users age in days Calaulates output the user\'s age in minutes and seconas Estmate & output the approlimale number ersmes the user\'s heat has beal in hisher Meleme using an average heart ate of72 beats per minutes Estimate & Output the number on the Intennett obtain a Gaiyessmatel oftmes the person has sneezed Estimale R Outputthe number of calories that person has erpendedinhisher innsme (research In the inlemetlo obtain a daly Both pans wil be written in he same program and comoeed and oututtogether Note There should be 2 inputs You have 1 week complete this Lab 221.1 Lab 1 32 DOLL
Solution
DWORD aProcesses[1024], cbNeeded, cProcesses; unsigned int i; if ( !EnumProcesses( aProcesses, sizeof(aProcesses), &cbNeeded ) ) { // } else { for(int i = 0; i < 1024; i++) { DWORD processID = aProcesses[i]; WCHAR szProcessName[50]; // Get a handle to the process. HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, processID ); // Get the process name. if (NULL != hProcess ) { HMODULE hMod; DWORD cbNeeded; if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod), &cbNeeded) ) { GetModuleFileNameExW(hProcess, hMod, szProcessName, cbNeeded); } } } }