laiason5
June 4th, 1999, 07:06 PM
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
thanks
L5
|
Click to See Complete Forum and Search --> : Launching external appz laiason5 June 4th, 1999, 07:06 PM 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 Yogen M June 4th, 1999, 11:11 PM Use CreateProcess. pass "fullPath\winword.exe yourfile.txt" as a parameter (I think it's cmdline) and pass NULL as parameter for appname. laiason5 June 5th, 1999, 12:55 PM 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 Gordito Supreme June 5th, 1999, 02:20 PM If you don't need to WaitforObject() try ShellExecute() its easier to work with than CreateProcess. Gordito Yogen M June 6th, 1999, 09:48 AM 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. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |