Process kill event

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gil sh via .NET 247

    #1

    Process kill event

    Hi,
    I am looking for an event thet raises when the proccess is killed (for ex: Shotdown from the TaskManeger)

    I have allready tried:
    Form.Close
    Form.Dispose
    Application.Exi t
    Process.Exited
    Finalize

    I wrote a little program to chack it, Please add the event to the program of explane how to do it
    RAR: http://uploaded.fresh.co.il/2004/08/09/960473.rar
    ZIP: http://uploaded.fresh.co.il/2004/08/09/155273.zip

    10x a lot, Gil
    --------------------------------
    From: gil sh

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>Wf8yqTR7Kk+ ApddOymol9A==</Id>
  • Michael Ames

    #2
    RE: Process kill event

    Gil,

    To my knowledge, there is no such event. The primary thread on which the
    process is running is terminated by the operating system -- therefore, there
    is no process left for any of the events you listed to fire on.

    Now, the "End Process" button on the task manager is different from the "End
    Task" button or what happens when you click "Shut Down". End Task and Shut
    Down send a more friendly shut down message to the application, and you will
    find that the standard events work just fine.

    What is your purpose in interrupting the process kill? Depending on the
    environment, you may be able to detect when the process has been terminated
    by watching it with another process.

    -Michael



    "gil sh via .NET 247" wrote:
    [color=blue]
    > Hi,
    > I am looking for an event thet raises when the proccess is killed (for ex: Shotdown from the TaskManeger)
    >
    > I have allready tried:
    > Form.Close
    > Form.Dispose
    > Application.Exi t
    > Process.Exited
    > Finalize
    >
    > I wrote a little program to chack it, Please add the event to the program of explane how to do it
    > RAR: http://uploaded.fresh.co.il/2004/08/09/960473.rar
    > ZIP: http://uploaded.fresh.co.il/2004/08/09/155273.zip
    >
    > 10x a lot, Gil
    > --------------------------------
    > From: gil sh
    >
    > -----------------------
    > Posted by a user from .NET 247 (http://www.dotnet247.com/)
    >
    > <Id>Wf8yqTR7Kk+ ApddOymol9A==</Id>
    >[/color]

    Comment

    • Simon

      #3
      Re: Process kill event

      > I am looking for an event thet raises when the proccess is killed (for ex: Shotdown from the TaskManeger)

      A windows application is terminated by receiving any of the WM_CLOSE,
      WM_DESTROY or WM_QUIT messages from the operating system. If none of
      these messages are received then your application has nothing to trap
      and know that it gets killed. If think TaskManager simply uses
      TerminateProces s without any other messages, meaning that you cannot
      trap this event.

      Are you needing an application that is always alive? Maybe something
      along the lines of a system service is more what you need??

      Simon Hayden
      开云手机在线入口官网_开云(中国)【请牢记发财域名:939919.com 】发展自1993年05月,开云手机在线入口官网_开云(中国)以建筑材料与绿色节能工程为核心业务,(股票代码:002864)。开云手机在线入口官网_开云(中国)以“客户满意”为经营理念,理解并执行甲方管理制度,致力于以“幸福顾客、成就员工”的企业使命,以“安全、营养、健康、美味”的企业服务宗旨,在“发展、创新、务实、守信”四大核心理念的指引下,努力满足广大用餐者及客户对高品质、美好餐饮服务需求。

      Get software updates to your clients the Quick and Easy way!
      Latest Version ==========>>> Client Computer

      Comment

      Working...