ShellExecute and execl woes
-
Im writing a front end for a console prog in VCPP and am having a hell of a time trying to pass params. For some reason whenever i use ShellExecute to pass params the programm receiving them interperates all params as a single param and fails (according to its log). If i use _execl it works perfectly only my app terminates for some odd reason. Im a fairly experienced programmer and have just started out w/ windows programming. This is also my first windows app thatll serve a purposed btw :) Heres the ShellExecute code that doesnt not pass the params correctly: ShellExecute(NULL, "Open", "C:\\Program Files\\UT2004\\System\\ucc.exe", "compress AS-Convoy.ut2", NULL, SW_SHOWNORMAL); And heres the _execl that works but kills my app: execl("C:\\Program Files\\UT2004\\System\\ucc.exe", " compress", "AS-Convoy.ut2", NULL); * note the space before " compress" if i leave out this space the called prog fails. ive tried the same thing w/ ShellExecute but it still fails. If anyone has an idea about how i should go about getting ShellExecute to pass the params different or how i can stop _execl from killing my app id be very greatful. Oi! Oi! Oi!
-
Im writing a front end for a console prog in VCPP and am having a hell of a time trying to pass params. For some reason whenever i use ShellExecute to pass params the programm receiving them interperates all params as a single param and fails (according to its log). If i use _execl it works perfectly only my app terminates for some odd reason. Im a fairly experienced programmer and have just started out w/ windows programming. This is also my first windows app thatll serve a purposed btw :) Heres the ShellExecute code that doesnt not pass the params correctly: ShellExecute(NULL, "Open", "C:\\Program Files\\UT2004\\System\\ucc.exe", "compress AS-Convoy.ut2", NULL, SW_SHOWNORMAL); And heres the _execl that works but kills my app: execl("C:\\Program Files\\UT2004\\System\\ucc.exe", " compress", "AS-Convoy.ut2", NULL); * note the space before " compress" if i leave out this space the called prog fails. ive tried the same thing w/ ShellExecute but it still fails. If anyone has an idea about how i should go about getting ShellExecute to pass the params different or how i can stop _execl from killing my app id be very greatful. Oi! Oi! Oi!
What results do you get with
CreateProcess()
?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen