How to Stop a program running (Kill)

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

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

How to Stop a program running (Kill)

Post by zolysoftsolutions » Wed Oct 15, 2014 9:16 am

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: 2371
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 628 times
Been thanked: 126 times
Contact:

Post by serge_girard » Wed Oct 15, 2014 9:23 am

Zoli,

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

Serge

User avatar
esgici
Posts: 4518
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 391 times
Been thanked: 111 times
Contact:

Post by esgici » Wed Oct 15, 2014 10:05 am

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: 123
Joined: Wed Feb 29, 2012 3:33 am
Location: Gyulakuta, Erdélyország
Has thanked: 1 time
Contact:

Post by zolysoftsolutions » Wed Oct 15, 2014 10:10 am

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: 4518
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 391 times
Been thanked: 111 times
Contact:

Post by esgici » Wed Oct 15, 2014 12:41 pm

zolysoftsolutions wrote: ..how can I find the Id of the process I want to kill.
You need someting like this :
GetProcessID.PNG
Screen shoot of Get Process ID test .prg
GetProcessID.PNG (67.97 KiB) Viewed 2548 times
GetProcessID.zip
Source files ( .hbp & .prg ) for Get Process ID test prg
(1023 Bytes) Downloaded 219 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:

Post by Agil Abdullah » Thu Oct 16, 2014 8:09 am

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: 4518
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 391 times
Been thanked: 111 times
Contact:

Post by esgici » Thu Oct 16, 2014 8:54 am

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: 123
Joined: Wed Feb 29, 2012 3:33 am
Location: Gyulakuta, Erdélyország
Has thanked: 1 time
Contact:

Post by zolysoftsolutions » Thu Oct 16, 2014 6:00 pm

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

Post Reply