Link to home
Start Free TrialLog in
Avatar of SBSDUNBLANE
SBSDUNBLANE

asked on

Using CreateProcess instead of WinExec

I have been usng the following code to close outlook using winexec to run the "TASKKILL" process:

WinExec('command.com /c taskkill /F /T /IM OUTLOOK.EXE',sw_Hide);

I have been trying to update my code using CreateProcess with little success.

Any ideas out there?
Avatar of 2266180
2266180
Flag of United States of America image

you will be using something like this:
http://www.scalabium.com/faq/dct0050.htm
WinExecAndWait32('taskkill /F /T /IM OUTLOOK.EXE',sw_hide);
Avatar of SBSDUNBLANE
SBSDUNBLANE

ASKER

what unit does winexecandwait32 live in for a Uses clause?
ASKER CERTIFIED SOLUTION
Avatar of 2266180
2266180
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
Thanks - my stoooopidity, sorted now.
why grade b? what's wrong with my answer?