Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How detect if handle returned by PsGetCurrentProcessID is valid ? existing always process ?

66 views
Skip to first unread message

Mathieu

unread,
Nov 23, 2009, 3:21:14 PM11/23/09
to
Hello,

I need to intercept an event of signal exit of a Windows process since
handle processid,
or whether the process is still active according to the variable handle
returned by the PsGetCurrentProcessID.

Why:
I developed a driver disk mapping on a user-mode process and when I left
the process in task manager (mstask.exe), my driver detects if the
process is still existing, if not the case, it must set the flag on my
logical drive mapped to it is inaccessible and it does not expect the
data sent by my process managing the logical drive.

In function KeWaitForSingleObject can i pass a HANDLE returned by
PsGetCurrentProcessId?

Otherwise how to detect if the handle process is always exists returned
by previously existing PsGetCurrentProcessID?

Thank you

Doron Holan [MSFT]

unread,
Nov 23, 2009, 6:57:03 PM11/23/09
to
how about detecting that the process exists when you receive a
IRP_MJ_CLEANUP on the file handle it opened against your driver? this way
you do not have to wait on anything

d

--

This posting is provided "AS IS" with no warranties, and confers no rights.


"Mathieu" <mat....@wanadoo.fr> wrote in message
news:4b0aeec0$0$907$ba4a...@news.orange.fr...

Maxim S. Shatskih

unread,
Nov 25, 2009, 2:36:02 PM11/25/09
to
You can register for Ps's process termination callback.

--
Maxim S. Shatskih
Windows DDK MVP
ma...@storagecraft.com
http://www.storagecraft.com

"Mathieu" <mat....@wanadoo.fr> wrote in message news:4b0aeec0$0$907$ba4a...@news.orange.fr...

0 new messages