Click here to Skip to main content
15,885,278 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: VARIANT to CString Pin
Code-o-mat4-Oct-09 20:37
Code-o-mat4-Oct-09 20:37 
GeneralRe: VARIANT to CString Pin
Davitor4-Oct-09 20:41
Davitor4-Oct-09 20:41 
GeneralRe: VARIANT to CString Pin
Code-o-mat4-Oct-09 21:00
Code-o-mat4-Oct-09 21:00 
GeneralRe: VARIANT to CString Pin
Stuart Dootson4-Oct-09 22:13
professionalStuart Dootson4-Oct-09 22:13 
QuestionHow to pass the command to createprocess() Pin
WindowsVsLinux4-Oct-09 20:16
WindowsVsLinux4-Oct-09 20:16 
AnswerRe: How to pass the command to createprocess() Pin
Madhu Nair4-Oct-09 20:56
Madhu Nair4-Oct-09 20:56 
GeneralRe: How to pass the command to createprocess() Pin
WindowsVsLinux4-Oct-09 22:16
WindowsVsLinux4-Oct-09 22:16 
AnswerRe: How to pass the command to createprocess() Pin
Michael Schubert4-Oct-09 21:10
Michael Schubert4-Oct-09 21:10 
I don't really understand what you're trying to do, especially this is confusing:
ravi 12 wrote:
i want to give command to createprocess() only when program is written not after execution of program.


Anyway, it seems that you want to start a new command shell and pass a parameter. In order to do that you would need this:
cmd /C dir

To do that with CreateProcess() I suggest the following code:

STARTUPINFO si;
PROCESS_INFORMATION pi;
::ZeroMemory(&si, sizeof(STARTUPINFO));
::ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
si.cb = sizeof(STARTUPINFO);

if (::CreateProcess(NULL, "cmd.exe /C dir", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi) == 0)
 return FALSE;

GeneralRe: How to pass the command to createprocess() Pin
WindowsVsLinux4-Oct-09 22:20
WindowsVsLinux4-Oct-09 22:20 
AnswerRe: How to pass the command to createprocess() Pin
Richard MacCutchan4-Oct-09 23:03
mveRichard MacCutchan4-Oct-09 23:03 
QuestionRe: How to pass the command to createprocess() Pin
David Crow5-Oct-09 4:17
David Crow5-Oct-09 4:17 
QuestionMicrosoft Visual C++ Crashing Pin
RS.Ratheesh4-Oct-09 20:09
RS.Ratheesh4-Oct-09 20:09 
AnswerRe: Microsoft Visual C++ Crashing Pin
vipin_nvk4-Oct-09 23:16
vipin_nvk4-Oct-09 23:16 
GeneralRe: Microsoft Visual C++ Crashing Pin
RS.Ratheesh5-Oct-09 18:43
RS.Ratheesh5-Oct-09 18:43 
QuestionOn Windows Programming, I'm a rookie,how can i get the name and information of the process ? Pin
milestanley4-Oct-09 19:52
milestanley4-Oct-09 19:52 
AnswerRe: On Windows Programming, I'm a rookie,how can i get the name and information of the process ? Pin
DeepakMega4-Oct-09 20:14
DeepakMega4-Oct-09 20:14 
QuestionRe: On Windows Programming, I'm a rookie,how can i get the name and information of the process ? Pin
David Crow5-Oct-09 4:24
David Crow5-Oct-09 4:24 
QuestionHow to create a program for querying active directory using visual C++ Pin
raja 44-Oct-09 19:28
raja 44-Oct-09 19:28 
QuestionList control column width Pin
Tran Vu Quan4-Oct-09 15:54
Tran Vu Quan4-Oct-09 15:54 
AnswerRe: List control column width Pin
DeepakMega4-Oct-09 20:28
DeepakMega4-Oct-09 20:28 
GeneralRe: List control column width Pin
Tran Vu Quan4-Oct-09 20:48
Tran Vu Quan4-Oct-09 20:48 
AnswerRe: List control column width Pin
David Crow5-Oct-09 4:28
David Crow5-Oct-09 4:28 
AnswerRe: List control column width Pin
Rolf Kristensen5-Oct-09 9:35
Rolf Kristensen5-Oct-09 9:35 
QuestionCScrollView crash when start in MAXIMIZE Pin
fitatc4-Oct-09 14:41
fitatc4-Oct-09 14:41 
AnswerRe: CScrollView crash when start in MAXIMIZE Pin
DeepakMega4-Oct-09 20:33
DeepakMega4-Oct-09 20:33 

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.