Click here to Skip to main content
15,905,071 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to do the MFC to get the return of another console program? Pin
adalcol10-Aug-11 4:55
adalcol10-Aug-11 4:55 
QuestionRe: How to do the MFC to get the return of another console program? Pin
David Crow10-Aug-11 5:26
David Crow10-Aug-11 5:26 
AnswerRe: How to do the MFC to get the return of another console program? Pin
adalcol10-Aug-11 6:34
adalcol10-Aug-11 6:34 
GeneralRe: How to do the MFC to get the return of another console program? Pin
David Crow10-Aug-11 8:00
David Crow10-Aug-11 8:00 
GeneralRe: How to do the MFC to get the return of another console program? Pin
adalcol10-Aug-11 8:25
adalcol10-Aug-11 8:25 
GeneralRe: How to do the MFC to get the return of another console program? Pin
David Crow10-Aug-11 8:29
David Crow10-Aug-11 8:29 
GeneralRe: How to do the MFC to get the return of another console program? Pin
adalcol10-Aug-11 8:44
adalcol10-Aug-11 8:44 
AnswerRe: How to do the MFC to get the return of another console program? Pin
Chuck O'Toole10-Aug-11 7:06
Chuck O'Toole10-Aug-11 7:06 
int SynchronizedThread::RunCommand(CString Command, bool WaitForIt)
{
	PROCESS_INFORMATION ProcInfo;
	STARTUPINFO StartInfo;
	DWORD exit_status;
	
	memset(&StartInfo, 0, sizeof(StartInfo));
	StartInfo.cb = sizeof(StartInfo);
	if (CreateProcess(NULL, (LPSTR)(LPCTSTR)Command, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &StartInfo,  &ProcInfo))
	{
		if (WaitForIt)
		{
			WaitForSingleObject(ProcInfo.hProcess, INFINITE);	// wait for the command to finish
			GetExitCodeProcess(ProcInfo.hProcess, &exit_status);
			CloseHandle(ProcInfo.hProcess);
			CloseHandle(ProcInfo.hThread);
		}
		else
			exit_status = EXIT_SUCCESS;
		return exit_status;
	}
	return EXIT_FAILURE;
}

GeneralRe: How to do the MFC to get the return of another console program? Pin
adalcol10-Aug-11 8:30
adalcol10-Aug-11 8:30 
GeneralRe: How to do the MFC to get the return of another console program? Pin
Chuck O'Toole10-Aug-11 8:36
Chuck O'Toole10-Aug-11 8:36 
GeneralRe: How to do the MFC to get the return of another console program? Pin
adalcol10-Aug-11 8:50
adalcol10-Aug-11 8:50 
QuestionChanging the parameters passed to an applicaiton in a Mini filter? Pin
Erudite_Eric10-Aug-11 2:31
Erudite_Eric10-Aug-11 2:31 
QuestionIs there any function that can convert text representation"ABCDEF" back to int ? Pin
Cold_Fearing_Bird9-Aug-11 22:23
Cold_Fearing_Bird9-Aug-11 22:23 
AnswerRe: Is there any function that can convert text representation"ABCDEF" back to int ? PinPopular
Richard MacCutchan9-Aug-11 23:19
mveRichard MacCutchan9-Aug-11 23:19 
AnswerRe: Is there any function that can convert text representation"ABCDEF" back to int ? Pin
JohnNawrocki23-Aug-11 7:04
JohnNawrocki23-Aug-11 7:04 
QuestionDebug Assertion Error help, here is the exact error [solved] Pin
AndrewG12319-Aug-11 9:52
AndrewG12319-Aug-11 9:52 
AnswerRe: Debug Assertion Error help, here is the exact error Pin
David Crow9-Aug-11 10:23
David Crow9-Aug-11 10:23 
AnswerRe: Debug Assertion Error help, here is the exact error Pin
Richard Andrew x649-Aug-11 13:14
professionalRichard Andrew x649-Aug-11 13:14 
GeneralRe: Debug Assertion Error help, here is the exact error Pin
AndrewG12319-Aug-11 13:24
AndrewG12319-Aug-11 13:24 
GeneralRe: Debug Assertion Error help, here is the exact error Pin
Code-o-mat10-Aug-11 0:23
Code-o-mat10-Aug-11 0:23 
AnswerRe: Debug Assertion Error help, here is the exact error Pin
Chuck O'Toole9-Aug-11 14:23
Chuck O'Toole9-Aug-11 14:23 
GeneralRe: Debug Assertion Error help, here is the exact error Pin
AndrewG12319-Aug-11 16:38
AndrewG12319-Aug-11 16:38 
GeneralRe: Debug Assertion Error help, here is the exact error Pin
Chuck O'Toole9-Aug-11 16:46
Chuck O'Toole9-Aug-11 16:46 
GeneralRe: Debug Assertion Error help, here is the exact error Pin
AndrewG123110-Aug-11 9:39
AndrewG123110-Aug-11 9:39 
QuestionFrame transparent color in animated gif file Pin
includeh109-Aug-11 6:31
includeh109-Aug-11 6:31 

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.