Click here to Skip to main content
15,920,217 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionGetting hold of certain event entries Pin
Programm3r11-Sep-07 19:46
Programm3r11-Sep-07 19:46 
AnswerRe: Getting hold of certain event entries Pin
carrivick12-Sep-07 8:50
carrivick12-Sep-07 8:50 
QuestionProblems about how to explore a program's action? Pin
kcynic11-Sep-07 19:34
kcynic11-Sep-07 19:34 
AnswerRe: Problems about how to explore a program's action? Pin
Cedric Moonen11-Sep-07 20:31
Cedric Moonen11-Sep-07 20:31 
GeneralRe: Problems about how to explore a program's action? Pin
kcynic11-Sep-07 21:33
kcynic11-Sep-07 21:33 
AnswerRe: Problems about how to explore a program's action? Pin
Hamid_RT11-Sep-07 20:48
Hamid_RT11-Sep-07 20:48 
GeneralRe: Problems about how to explore a program's action? Pin
kcynic11-Sep-07 21:33
kcynic11-Sep-07 21:33 
AnswerRe: Problems about how to explore a program's action? Pin
carrivick12-Sep-07 8:52
carrivick12-Sep-07 8:52 
Questionhow to upload a file on a server at a perticular location? Pin
AnayKulkarni11-Sep-07 19:14
AnayKulkarni11-Sep-07 19:14 
AnswerRe: how to upload a file on a server at a perticular location? Pin
Jason Teagle11-Sep-07 22:16
Jason Teagle11-Sep-07 22:16 
GeneralRe: how to upload a file on a server at a perticular location? Pin
AnayKulkarni12-Sep-07 0:14
AnayKulkarni12-Sep-07 0:14 
QuestionRe: how to upload a file on a server at a perticular location? Pin
David Crow12-Sep-07 3:40
David Crow12-Sep-07 3:40 
QuestionHow to fixed such error?C2220 Pin
kcynic11-Sep-07 17:38
kcynic11-Sep-07 17:38 
AnswerRe: How to fixed such error?C2220 Pin
Stephen Hewitt11-Sep-07 17:46
Stephen Hewitt11-Sep-07 17:46 
AnswerRe: How to fixed such error?C2220 Pin
David Crow12-Sep-07 3:42
David Crow12-Sep-07 3:42 
QuestionGet and Set methods Pin
User 58385211-Sep-07 16:16
User 58385211-Sep-07 16:16 
AnswerRe: Get and Set methods Pin
George L. Jackson11-Sep-07 18:19
George L. Jackson11-Sep-07 18:19 
AnswerRe: Get and Set methods Pin
Nelek11-Sep-07 22:55
protectorNelek11-Sep-07 22:55 
AnswerRe: Get and Set methods Pin
Mark Salsbery12-Sep-07 8:30
Mark Salsbery12-Sep-07 8:30 
QuestionEnumProcesses Pin
dellthinker11-Sep-07 15:54
dellthinker11-Sep-07 15:54 
AnswerRe: EnumProcesses Pin
Hamid_RT11-Sep-07 19:39
Hamid_RT11-Sep-07 19:39 
AnswerRe: EnumProcesses Pin
Randor 11-Sep-07 20:39
professional Randor 11-Sep-07 20:39 
AnswerRe: EnumProcesses Pin
Randor 11-Sep-07 20:53
professional Randor 11-Sep-07 20:53 
This function can check if a process is running by checking the executable name. You may want to add additional checking such as window class enumeration or enumeration of known loaded modules.

BOOL IsExecutableRunning(TCHAR *lpszExe)
{
	HANDLE hSnapShot=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
	PROCESSENTRY32 processInfo;
	processInfo.dwSize=sizeof(PROCESSENTRY32);
	
	while(Process32Next(hSnapShot,&processInfo)!=FALSE)
	{
		if(processInfo.th32ProcessID > 12 && _tclen(processInfo.szExeFile) > 0)
		{
			if(_tcscmp(processInfo.szExeFile,lpszExe) == 0)
			{
				CloseHandle(hSnapShot);
				return TRUE;
			}
		}
	}
	CloseHandle(hSnapShot);
	return FALSE;
}


Best Wishes,
-Randor (David Delaune)
QuestionMS OFFICE File Open Save Dialog Hooking Pin
JuggernautMsn11-Sep-07 14:00
JuggernautMsn11-Sep-07 14:00 
AnswerRe: MS OFFICE File Open Save Dialog Hooking Pin
Mark Salsbery11-Sep-07 15:14
Mark Salsbery11-Sep-07 15:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.