How to Stop a program running (Kill)

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
zolysoftsolutions
Posts: 139
Joined: Wed Feb 29, 2012 3:33 am
Location: Gyulakuta, Erdélyország
Contact:

How to Stop a program running (Kill)

Post by zolysoftsolutions »

Hi everybody,

How can I stop an aplication running? By example if I want to stop the running "sssf.exe" witch function I have to use?
Thank you very much.

Best regards,
Zoli B.
_______________________________
Open eyes for you!
User avatar
serge_girard
Posts: 3158
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: How to Stop a program running (Kill)

Post by serge_girard »

Zoli,

Use TSKILL <prg> or TASKKILL in DOS to stop. See your Windows version for exact command.

Serge
There's nothing you can do that can't be done...
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: How to Stop a program running (Kill)

Post by esgici »

zolysoftsolutions wrote: How can I stop an aplication running?
-HMG 3.3.1 (Stable) 2014/07/15 wrote:
  • ...
    - New Functions:
    ...
    - TerminateProcess ( [ nProcessID ] , [ nExitCode ] )
    ...
Viva INTERNATIONAL HMG :D
User avatar
zolysoftsolutions
Posts: 139
Joined: Wed Feb 29, 2012 3:33 am
Location: Gyulakuta, Erdélyország
Contact:

Re: How to Stop a program running (Kill)

Post by zolysoftsolutions »

Thank you Serge and Esgici! :)

Esgici..how can I find the Id of the process I want to kill.
By example I know the name of running program: BonPrinter.exe ..but for the function you mentioned I need the Id of the process.
..or where I can find a description of these new functions?
Best regards,
Zoli B.
_______________________________
Open eyes for you!
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: How to Stop a program running (Kill)

Post by esgici »

zolysoftsolutions wrote: ..how can I find the Id of the process I want to kill.
You need someting like this :
Screen shoot of Get Process ID test .prg
Screen shoot of Get Process ID test .prg
GetProcessID.PNG (67.97 KiB) Viewed 4713 times
GetProcessID.zip
Source files ( .hbp & .prg ) for Get Process ID test prg
(1023 Bytes) Downloaded 354 times
Happy HMG'ing :)
Viva INTERNATIONAL HMG :D
User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Re: How to Stop a program running (Kill)

Post by Agil Abdullah »

Hi Esgici,

I'll try to implement your codes... And to make me anthusiastic, Let me name it like this:

Function LicenseToKill()

....
....
....

Return



Thanks for sharing.
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: How to Stop a program running (Kill)

Post by esgici »

Agil Abdullah wrote: I'll try to implement your codes... And to make me anthusiastic, Let me name it like this:

Function LicenseToKill()
....
:lol:

In fact that code don't provide any licence,
simply a way ( ID / address ) to access.

Kill or love, this is your opportunity ;)

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
zolysoftsolutions
Posts: 139
Joined: Wed Feb 29, 2012 3:33 am
Location: Gyulakuta, Erdélyország
Contact:

Re: How to Stop a program running (Kill)

Post by zolysoftsolutions »

:) THANK YOU very much Esgici.
Is working.
Viva HMG!
_______________________________
Open eyes for you!
Post Reply