new question on file inclusion

[b][red]This message was edited by moraalg at 2003-1-1 17:37:37[/red][/b][hr]
if i want to execute or close an EXE file when i type it do i do this
createprocess(c:file.exe) and exitprocess(c:file.exe) or do i have to include the file before opening it? please give me code if you could but if you can't advise will be fine!


Comments


  • : if i want to execute or close an EXE file when i type it do i do this
    : createprocess(c:file.exe) and exitprocess(c:file.exe) or do i have to include the file before opening it? please give me code if you could but if you can't advise will be fine!
    :
    :
    :

    See the responses to your other thread. Are you writing for Windows, unix or something else? it makes a difference.

    CreateProcess() will create the process. Killing that process is more difficult -- the safest way to kill it is to call PostThreadMessage() to send it a WM_QUIT message. The worst way is to call TerminateProcess() -- it will caluse problems with any dlls that the terminated process may have used.

    You can read all about these functions and how to use them on www.msdn.microsoft.com.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion