how would i launch an external app(in my case Microsoft Word or Corel WordPerfect) from within my application? how could i set it up to load a text file upon startup?
thanks
L5
Printable View
how would i launch an external app(in my case Microsoft Word or Corel WordPerfect) from within my application? how could i set it up to load a text file upon startup?
thanks
L5
Use CreateProcess.
pass "fullPath\winword.exe yourfile.txt" as a parameter (I think it's cmdline)
and pass NULL as parameter for appname.
thanks for the post, but one question...
in VC++ 6 i call teh global create Process like this:
::CreateProcess(...);
now, when i do that, it wants about 20 different things in the parenthesis. what do i put for them?
thanks,
L5
If you don't need to WaitforObject() try ShellExecute() its easier to work with than CreateProcess.
Gordito
Look for online help.
The only important ones are appname and cmdline. You can pass null to appname.
in cmd line "fullpath\app.exe param1 param2".
2 more parameters are si and pi, declare the structures as shown in help and init them as:
memset(&si, 0, sizeof(si));
si.cbSize = sizeof(si);
memset(&pi, 0, sizeof(pi));
pi.cbSize = sizeof(pi);
All other params are null.