Jump to content
Sign in to follow this  
meiya

Kill Windows Service

Recommended Posts

kalu nak kill dari dalam thread, bole guna ---> ExitProcess(0)

kalu nak kill process dari luar..kena tau windows handler...bole guna FindWindow utj dptkan handler tu..

bila da ada handler, bole dptkan thread ID guna: GetWindowThreadProcessId

so , bole tutup process tu dgn WM_CLOSE guna PostThreadMessage

tp, ada tu, PostThreadMessage akan fail kalu belum ada message queue

so, terpaksa guna TerminateProcess (bahya skit sebab child process takkan diterminate dan kalu ada dll, dll yg dipanggil xtau process tu dah diterminate)...

try tengok : http://support.microsoft.com/default.aspx?...US;Q178893&

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...