oddbin
asked on
ShellExecute query
Hi,
I'm looking for code to allow me to execute commands outside from my DLL. Just need to execute scripts and execuatbel etc.
I have been looking at the ShellExecute whcih seems suitable but could someone let me know if this is the best appraoch and if so, can you tell me how I use the GertLastError if it fails so I can print out the details.
Thanks
I'm looking for code to allow me to execute commands outside from my DLL. Just need to execute scripts and execuatbel etc.
I have been looking at the ShellExecute whcih seems suitable but could someone let me know if this is the best appraoch and if so, can you tell me how I use the GertLastError if it fails so I can print out the details.
Thanks
ASKER
I just need to be able to execute a script of executable and pass them parameters.
system is not recommended so i'd prefer not to use it. It would seem the ShellExecute is the way to go, i jst need help coding it.
system is not recommended so i'd prefer not to use it. It would seem the ShellExecute is the way to go, i jst need help coding it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There are several ways to do this.
- If you're looking for a simple way to pause the program and run another, system() is probably the easiest.
- If you want to run another program and read it's output (or send data to it) check out popen().
What are you trying to accomplish?
Kent