Click here to Skip to main content
15,921,793 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: createprocess Pin
«_Superman_»8-Mar-09 20:16
professional«_Superman_»8-Mar-09 20:16 
GeneralRe: createprocess Pin
hrishiS8-Mar-09 20:31
hrishiS8-Mar-09 20:31 
GeneralRe: createprocess Pin
«_Superman_»8-Mar-09 20:36
professional«_Superman_»8-Mar-09 20:36 
GeneralRe: createprocess Pin
hrishiS8-Mar-09 20:41
hrishiS8-Mar-09 20:41 
GeneralRe: createprocess Pin
«_Superman_»8-Mar-09 20:42
professional«_Superman_»8-Mar-09 20:42 
GeneralRe: createprocess Pin
hrishiS8-Mar-09 21:03
hrishiS8-Mar-09 21:03 
GeneralRe: createprocess Pin
Eytukan8-Mar-09 21:12
Eytukan8-Mar-09 21:12 
GeneralRe: createprocess Pin
«_Superman_»8-Mar-09 21:28
professional«_Superman_»8-Mar-09 21:28 
This is the actual string that the function needs including double quotes.
"C:\Program Files\Microsoft Office\Office\winword.exe" "D:\docs\main.doc"

So all the special characters here need to be escaped or negated using a back slash.
The special characters in the string are double quotes and back slash.
So the string becomes.
\"C:\\Program Files\\Microsoft Office\\Office\\winword.exe\" \"D:\\docs\\main.doc\"

Now since this is a string we put a final set of double quotes at the ends. So it becomes
"\"C:\\Program Files\\Microsoft Office\\Office\\winword.exe\" \"D:\\docs\\main.doc\""

The path where Notepad.exe resides is in your search path, whereas the path where winword.exe resides is not in your search path. That is the reason why notepad works and not winword.
Check the PATH environment variable by typing path at the command prompt.

«_Superman
I love work. It gives me something to do between weekends.

GeneralRe: createprocess Pin
Nishad S8-Mar-09 20:56
Nishad S8-Mar-09 20:56 
AnswerRe: createprocess Pin
Nishad S8-Mar-09 20:32
Nishad S8-Mar-09 20:32 
GeneralRe: createprocess Pin
hrishiS8-Mar-09 21:06
hrishiS8-Mar-09 21:06 
GeneralRe: createprocess Pin
Nishad S8-Mar-09 21:15
Nishad S8-Mar-09 21:15 
GeneralRe: createprocess Pin
siva4559-Mar-09 0:10
siva4559-Mar-09 0:10 
GeneralRe: createprocess Pin
Nishad S9-Mar-09 0:53
Nishad S9-Mar-09 0:53 
QuestionControl Precision Pin
john56328-Mar-09 19:48
john56328-Mar-09 19:48 
AnswerRe: Control Precision Pin
«_Superman_»8-Mar-09 20:24
professional«_Superman_»8-Mar-09 20:24 
AnswerRe: Control Precision Pin
CPallini8-Mar-09 23:59
mveCPallini8-Mar-09 23:59 
QuestionHow to invoke exe from console application... Pin
siva4558-Mar-09 18:15
siva4558-Mar-09 18:15 
AnswerRe: How to invoke exe from console application... Pin
Joe Woodbury8-Mar-09 18:27
professionalJoe Woodbury8-Mar-09 18:27 
AnswerRe: How to invoke exe from console application... Pin
«_Superman_»8-Mar-09 18:31
professional«_Superman_»8-Mar-09 18:31 
GeneralRe: How to invoke exe from console application... Pin
siva4558-Mar-09 18:39
siva4558-Mar-09 18:39 
GeneralRe: How to invoke exe from console application... Pin
«_Superman_»8-Mar-09 18:43
professional«_Superman_»8-Mar-09 18:43 
GeneralRe: How to invoke exe from console application... Pin
siva4558-Mar-09 18:46
siva4558-Mar-09 18:46 
GeneralRe: How to invoke exe from console application... Pin
hrishiS8-Mar-09 20:09
hrishiS8-Mar-09 20:09 
AnswerRe: How to invoke exe from console application... Pin
Hamid_RT8-Mar-09 19:38
Hamid_RT8-Mar-09 19:38 

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.