Process Monitor Hooks

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi everyone,

I have been reading through articles but yet not there exactly. Here is
what i require

Write a small Process Monitor Application. This application will
receive notification whenever a process is created or destroyed. The
Notification should receive the information about the process as well.
I am developing it in .Net environment using C#. I infact have a list
of processes to monitor[the list can change], when a process out of
that list is terminated, i have to restart it. Two options come to my
mind

1- Write a timer. Whenever a timer is fired - i get list of all the
processes and check if one of mine is not there and try restarting it
2- Somehoe Hook into this process creation/destruction

I think the timer option will be less expensive in the form of
performance burden on the system as the hook will be system-wide and
will be invoked on every API call. Please comment on this as well.

Also Is there a way to do this through hooks at all ?

I will appreciate help on this
Regards
DKhan

.



Relevant Pages

  • Re: Process Monitor Hooks
    ... Use SetWindowsHookEx and set a WH_SHELL (ShellProc) hook. ... Whenever a timer is fired - i get list of all the ... > I think the timer option will be less expensive in the form of ...
    (microsoft.public.win32.programmer.kernel)
  • Re: [PATCH 1/3] mm: tracking shared dirty pages
    ... use the set_page_dirtyhook to get its notification. ... second call is needed later to map it to a new set of blocks on the device.  ... For a log structured filesystem it can makes sense to defer the remapping ...
    (Linux-Kernel)
  • Re: How to Implement an Idle Period Timeout?
    ... > this running on a hidden form. ... That depends on what you are using for a timer. ... There is a ForegroundIdle hook that could make things easier. ... congestion problems. ...
    (microsoft.public.vb.winapi)
  • Re: File system change notifications
    ... notification for the same file) which might appear the same in the ... the notification is just a duplicate of a previous one so I must ... Also note although Brian uses a API based timer with a hidden window, that really does nothing substantial over the VB6 timer component. ...
    (microsoft.public.vb.general.discussion)
  • Re: Thread A notifying Thread B of an Event
    ... this with simple object references. ... class that is running the method on a separate thread. ... what are we supposed to hook? ... But a timer? ...
    (microsoft.public.dotnet.languages.vb)