Link to home
Start Free TrialLog in
Avatar of oddbin
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

Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Hi oddbin,

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
Avatar of oddbin
oddbin

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.
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial