How to use CreateProcess to write on new console output VC++

C, C++, Visual C++, C++.Net Topics
Post Reply
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 828
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

How to use CreateProcess to write on new console output VC++

Post by Saman » Fri Dec 02, 2011 1:13 am

Code: Select all

BOOL CreateProcess(
	LPCTSTR lpApplicationName,				// pointer to name of executable module
	LPTSTR lpCommandLine,					// pointer to command line string
	LPSECURITY_ATTRIBUTES lpProcessAttributes, 	// process security attributes
	LPSECURITY_ATTRIBUTES lpThreadAttributes, 	// thread security attributes
	BOOL bInheritHandles,					// handle inheritance flag
	DWORD dwCreationFlags,					// creation flags
	LPVOID lpEnvironment,					// pointer to new environment block
	LPCTSTR lpCurrentDirectory,				// pointer to current directory name
	LPSTARTUPINFO lpStartupInfo,				// pointer to STARTUPINFO
	LPPROCESS_INFORMATION lpProcessInformation	// pointer to PROCESS_INFORMATION
);
For dwCreationFlags, use CREATE_NEW_CONSOLE flag. That's it!
Post Reply

Return to “C/C++ Programming”