| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 
 | char * RaffraichirListe()
{
    HANDLE hSnapShot;
    PROCESSENTRY32 uProcess;
 
    bool r;
 
    hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPALL,0);
    uProcess.dwSize = (DWORD) sizeof(PROCESSENTRY32);
 
    r = Process32First(hSnapShot, &uProcess);
    if(r)
    		{		
    			do   // Cette boucle énnumère tout les processus
    			{
    				//on cherche le nom de notre application dans le chemin d'accès de l'éxécutable du processus.
                                strcat(ExeName,"$|");
    				strcat(ExeName,uProcess.szExeFile);
                                strcat(ExeName,"|");
 
    			} while (Process32Next(hSnapShot, &uProcess));
 
    		}	
    			CloseHandle(hSnapShot);
 
 return ExeName ;
 
} | 
Partager