STUCK - NEED HELP

I am double clicking the file from windows explorer(OS is windows XP), and on the subsequent click i am not getting the notification.

But if i am opening the file from command prompt i am getting the notifications properly even on the subsequent open request for the same file.

Viviek

From: Nick Ryan

>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
>Date: Mon, 09 Feb 2004 23:43:26 -0800
>
>Are you just ‘clicking’ on the file or are you actually opening it?
>:) I mean, if you’re opening the file again, another IRP_MJ_CREATE
>is being sent down, period.
>
>cheerful vishwanathan wrote:
>
>>Hi
>>
>>Thanks for your help.
>>
>>Now I am getting FILE_OPEN, but there is an issue.
>>
>>Suppose I have a file a.bmp, on clicking this file i do get the
>>notification. But now if i
>>
>>click the a.bmp again … I do not get the notification. But if
>>after clicking a.bmp, now
>>
>>i click another file suppose c.txt, notification for c.txt will
>>come.
>>
>>The problem is this that if i try to access the same file
>>subsequently i am not getting the notifications.
>>
>>Please help me.
>>
>>Thanks in advance.
>>
>>
>>
>>
>>
>> >From: Nick Ryan
>> >Reply-To: “Windows System Software Devs Interest List”
>> >To: “Windows System Software Devs Interest List”
>> >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
>> >Date: Mon, 09 Feb 2004 20:51:06 -0800
>> >
>> >(For future reference, the correct forum for this question is
>> >ntfsd.)
>> >
>> >Your code is correct, the bug must be somewhere else. You say
>>you
>> >are simply not seeing any creates for which dwOpenOptions is
>> >FILE_OPEN?
>> >
>> >cheerful vishwanathan wrote:
>> >>
>> >>I am developing a filter driver for a NT file system, and want
>>to
>> >>trap FILE OPEN and DIRECTORY OPEN requests.
>> >> At present I am trapping IRP_MJ_CREATE for open request.
>> >>and using the following lines of source
>> >> DWORD dwOpenOptions = ((pParms->Parameters.Create.Options >>
>>24)
>> >>& 0xFF);
>> >>
>> >>DWORD dwUserOptions = (pParms->Parameters.Create.Options &
>> >>FILE_VALID_OPTION_FLAGS);
>> >>
>> >>where dwOpenOptions is the CreateDisposition and should have
>>the
>> >>value FILE_OPEN in case of file open request.
>> >>
>> >>It is working fine in case of create i.e FILE_CREATE.
>> >>
>> >>But i am not getting the appropriate value for
>>CreateDisposition
>> >>(i.e. FILE_OPEN) in case of file open request.
>> >>
>> >>Actually I am having a service running in background that
>> >>continuously polls the filter driver and it gives me the
>> >>notification for file/directory create, but not for
>>file/directory
>> >>open.
>> >>
>> >>Can anyone tell me how to get notifications from driver for
>> >>file/directory open in my service?
>> >>
>> >>Thanks in Advance.
>> >>
>> >>
>>
>> >>------------------------------------------------------------------------
>> >>Contact brides & grooms FREE! Only on www.shaadi.com. Register
>>now!
>> >>
>> >
>> >–
>> >- Nick Ryan
>> >- Microsoft MVP for DDK
>> >
>> >—
>> >Questions? First check the Kernel Driver FAQ at
>> >http://www.osronline.com/article.cfm?id=256
>> >
>> >You are currently subscribed to ntdev as: xxxxx@hotmail.com
>> >To unsubscribe send a blank email to
>> >xxxxx@lists.osr.com
>>
>>------------------------------------------------------------------------
>>Contact brides & grooms FREE! Only on www.shaadi.com. Register now!
>>
>
>–
>- Nick Ryan
>- Microsoft MVP for DDK
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to
>xxxxx@lists.osr.com


Contact brides & grooms FREE! Only on www.shaadi.com. Register now!

That might suggest that someone, somewhere (perhaps the application or
perhaps Windows) is caching a handle to the open file.

Chuck

----- Original Message -----
From: “cheerful vishwanathan”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, February 10, 2004 11:43 PM
Subject: [ntdev] STUCK - NEED HELP

>
>
>
> I am double clicking the file from windows explorer(OS is windows XP),
and on the subsequent click i am not getting the notification.
>
> But if i am opening the file from command prompt i am getting the
notifications properly even on the subsequent open request for the same
file.
>
> Viviek
>
> >From: Nick Ryan
> >Reply-To: “Windows System Software Devs Interest List”
> >To: “Windows System Software Devs Interest List”
> >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> >Date: Mon, 09 Feb 2004 23:43:26 -0800
> >
> >Are you just ‘clicking’ on the file or are you actually opening it?
> >:) I mean, if you’re opening the file again, another IRP_MJ_CREATE
> >is being sent down, period.
> >
> >cheerful vishwanathan wrote:
> >
> >>Hi
> >>
> >>Thanks for your help.
> >>
> >>Now I am getting FILE_OPEN, but there is an issue.
> >>
> >>Suppose I have a file a.bmp, on clicking this file i do get the
> >>notification. But now if i
> >>
> >>click the a.bmp again … I do not get the notification. But if
> >>after clicking a.bmp, now
> >>
> >>i click another file suppose c.txt, notification for c.txt will
> >>come.
> >>
> >>The problem is this that if i try to access the same file
> >>subsequently i am not getting the notifications.
> >>
> >>Please help me.
> >>
> >>Thanks in advance.
> >>
> >>
> >>
> >>
> >>
> >> >From: Nick Ryan
> >> >Reply-To: “Windows System Software Devs Interest List”
> >> >To: “Windows System Software Devs Interest List”
> >> >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> >> >Date: Mon, 09 Feb 2004 20:51:06 -0800
> >> >
> >> >(For future reference, the correct forum for this question is
> >> >ntfsd.)
> >> >
> >> >Your code is correct, the bug must be somewhere else. You say
> >>you
> >> >are simply not seeing any creates for which dwOpenOptions is
> >> >FILE_OPEN?
> >> >
> >> >cheerful vishwanathan wrote:
> >> >>
> >> >>I am developing a filter driver for a NT file system, and want
> >>to
> >> >>trap FILE OPEN and DIRECTORY OPEN requests.
> >> >> At present I am trapping IRP_MJ_CREATE for open request.
> >> >>and using the following lines of source
> >> >> DWORD dwOpenOptions = ((pParms->Parameters.Create.Options >>
> >>24)
> >> >>& 0xFF);
> >> >>
> >> >>DWORD dwUserOptions = (pParms->Parameters.Create.Options &
> >> >>FILE_VALID_OPTION_FLAGS);
> >> >>
> >> >>where dwOpenOptions is the CreateDisposition and should have
> >>the
> >> >>value FILE_OPEN in case of file open request.
> >> >>
> >> >>It is working fine in case of create i.e FILE_CREATE.
> >> >>
> >> >>But i am not getting the appropriate value for
> >>CreateDisposition
> >> >>(i.e. FILE_OPEN) in case of file open request.
> >> >>
> >> >>Actually I am having a service running in background that
> >> >>continuously polls the filter driver and it gives me the
> >> >>notification for file/directory create, but not for
> >>file/directory
> >> >>open.
> >> >>
> >> >>Can anyone tell me how to get notifications from driver for
> >> >>file/directory open in my service?
> >> >>
> >> >>Thanks in Advance.
> >> >>
> >> >>
> >>
> >>
>>----------------------------------------------------------------------

> >> >>Contact brides & grooms FREE! Only on www.shaadi.com. Register
> >>now!
> >> >>
> >> >
> >> >–
> >> >- Nick Ryan
> >> >- Microsoft MVP for DDK
> >> >
> >> >—
> >> >Questions? First check the Kernel Driver FAQ at
> >> >http://www.osronline.com/article.cfm?id=256
> >> >
> >> >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> >> >To unsubscribe send a blank email to
> >> >xxxxx@lists.osr.com
> >>
>
>>----------------------------------------------------------------------

> >>Contact brides & grooms FREE! Only on www.shaadi.com. Register now!
> >>
> >
> >–
> >- Nick Ryan
> >- Microsoft MVP for DDK
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> >To unsubscribe send a blank email to
> >xxxxx@lists.osr.com
>
>
> ----------------------------------------------------------------------
----------
> Contact brides & grooms FREE! Only on www.shaadi.com. Register
now! —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cbatson.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

My application is not holding on to the file handle but the OS seems to be checking the file in “recent files” directory and picking it from there.  At this point i do not know how to handle this.

Vivek

From: “Chuck Batson”

>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>Subject: Re: [ntdev] STUCK - NEED HELP
>Date: Wed, 11 Feb 2004 02:03:27 +0700
>
>That might suggest that someone, somewhere (perhaps the application or
>perhaps Windows) is caching a handle to the open file.
>
>Chuck
>
>----- Original Message -----
>From: “cheerful vishwanathan”
>To: “Windows System Software Devs Interest List”
>Sent: Tuesday, February 10, 2004 11:43 PM
>Subject: [ntdev] STUCK - NEED HELP
>
>
> >
> >
> >
> > I am double clicking the file from windows explorer(OS is windows XP),
>and on the subsequent click i am not getting the notification.
> >
> > But if i am opening the file from command prompt i am getting the
>notifications properly even on the subsequent open request for the same
>file.
> >
> > Viviek
> >
> > >From: Nick Ryan
> > >Reply-To: “Windows System Software Devs Interest List”
> > >To: “Windows System Software Devs Interest List”
> > >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > >Date: Mon, 09 Feb 2004 23:43:26 -0800
> > >
> > >Are you just ‘clicking’ on the file or are you actually opening it?
> > >:) I mean, if you’re opening the file again, another IRP_MJ_CREATE
> > >is being sent down, period.
> > >
> > >cheerful vishwanathan wrote:
> > >
> > >>Hi
> > >>
> > >>Thanks for your help.
> > >>
> > >>Now I am getting FILE_OPEN, but there is an issue.
> > >>
> > >>Suppose I have a file a.bmp, on clicking this file i do get the
> > >>notification. But now if i
> > >>
> > >>click the a.bmp again … I do not get the notification. But if
> > >>after clicking a.bmp, now
> > >>
> > >>i click another file suppose c.txt, notification for c.txt will
> > >>come.
> > >>
> > >>The problem is this that if i try to access the same file
> > >>subsequently i am not getting the notifications.
> > >>
> > >>Please help me.
> > >>
> > >>Thanks in advance.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> >From: Nick Ryan
> > >> >Reply-To: “Windows System Software Devs Interest List”
> > >> >To: “Windows System Software Devs Interest List”
> > >> >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > >> >Date: Mon, 09 Feb 2004 20:51:06 -0800
> > >> >
> > >> >(For future reference, the correct forum for this question is
> > >> >ntfsd.)
> > >> >
> > >> >Your code is correct, the bug must be somewhere else. You say
> > >>you
> > >> >are simply not seeing any creates for which dwOpenOptions is
> > >> >FILE_OPEN?
> > >> >
> > >> >cheerful vishwanathan wrote:
> > >> >>
> > >> >>I am developing a filter driver for a NT file system, and want
> > >>to
> > >> >>trap FILE OPEN and DIRECTORY OPEN requests.
> > >> >> At present I am trapping IRP_MJ_CREATE for open request.
> > >> >>and using the following lines of source
> > >> >> DWORD dwOpenOptions = ((pParms->Parameters.Create.Options >>
> > >>24)
> > >> >>& 0xFF);
> > >> >>
> > >> >>DWORD dwUserOptions = (pParms->Parameters.Create.Options &
> > >> >>FILE_VALID_OPTION_FLAGS);
> > >> >>
> > >> >>where dwOpenOptions is the CreateDisposition and should have
> > >>the
> > >> >>value FILE_OPEN in case of file open request.
> > >> >>
> > >> >>It is working fine in case of create i.e FILE_CREATE.
> > >> >>
> > >> >>But i am not getting the appropriate value for
> > >>CreateDisposition
> > >> >>(i.e. FILE_OPEN) in case of file open request.
> > >> >>
> > >> >>Actually I am having a service running in background that
> > >> >>continuously polls the filter driver and it gives me the
> > >> >>notification for file/directory create, but not for
> > >>file/directory
> > >> >>open.
> > >> >>
> > >> >>Can anyone tell me how to get notifications from driver for
> > >> >>file/directory open in my service?
> > >> >>
> > >> >>Thanks in Advance.
> > >> >>
> > >> >>
> > >>
> > >>
> >>----------------------------------------------------------------------
>–
> > >> >>Contact brides & grooms FREE! Only on www.shaadi.com. Register
> > >>now!
> > >> >>
> > >> >
> > >> >–
> > >> >- Nick Ryan
> > >> >- Microsoft MVP for DDK
> > >> >
> > >> >—
> > >> >Questions? First check the Kernel Driver FAQ at
> > >> >http://www.osronline.com/article.cfm?id=256
> > >> >
> > >> >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > >> >To unsubscribe send a blank email to
> > >> >xxxxx@lists.osr.com
> > >>
> >
> >>----------------------------------------------------------------------
>–
> > >>Contact brides & grooms FREE! Only on www.shaadi.com. Register now!
> > >>
> > >
> > >–
> > >- Nick Ryan
> > >- Microsoft MVP for DDK
> > >
> > >—
> > >Questions? First check the Kernel Driver FAQ at
> > >http://www.osronline.com/article.cfm?id=256
> > >
> > >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > >To unsubscribe send a blank email to
> > >xxxxx@lists.osr.com
> >
> >
> > ----------------------------------------------------------------------
>----------
> > Contact brides & grooms FREE! Only on www.shaadi.com. Register
>now! —
> > Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@cbatson.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com


Contact brides & grooms FREE! Only on www.shaadi.com. Register now!

Why would that be a problem?

Chuck

----- Original Message -----
From: “cheerful vishwanathan”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, February 11, 2004 10:25 AM
Subject: Re: [ntdev] STUCK - NEED HELP

> My application is not holding on to the file handle but the OS seems
to be checking the file in “recent files” directory and picking it from
there. At this point i do not know how to handle this.
>
> Vivek
>
> >From: “Chuck Batson”
> >Reply-To: “Windows System Software Devs Interest List”
> >To: “Windows System Software Devs Interest List”
> >Subject: Re: [ntdev] STUCK - NEED HELP
> >Date: Wed, 11 Feb 2004 02:03:27 +0700
> >
> >That might suggest that someone, somewhere (perhaps the application
or
> >perhaps Windows) is caching a handle to the open file.
> >
> >Chuck
> >
> >----- Original Message -----
> >From: “cheerful vishwanathan”
> >To: “Windows System Software Devs Interest List”
> >Sent: Tuesday, February 10, 2004 11:43 PM
> >Subject: [ntdev] STUCK - NEED HELP
> >
> >
> > >
> > >
> > >
> > > I am double clicking the file from windows explorer(OS is windows
XP),
> >and on the subsequent click i am not getting the notification.
> > >
> > > But if i am opening the file from command prompt i am getting the
> >notifications properly even on the subsequent open request for the
same
> >file.
> > >
> > > Viviek
> > >
> > > >From: Nick Ryan
> > > >Reply-To: “Windows System Software Devs Interest List”
> > > >To: “Windows System Software Devs Interest List”
> > > >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > > >Date: Mon, 09 Feb 2004 23:43:26 -0800
> > > >
> > > >Are you just ‘clicking’ on the file or are you actually opening
it?
> > > >:) I mean, if you’re opening the file again, another
IRP_MJ_CREATE
> > > >is being sent down, period.
> > > >
> > > >cheerful vishwanathan wrote:
> > > >
> > > >>Hi
> > > >>
> > > >>Thanks for your help.
> > > >>
> > > >>Now I am getting FILE_OPEN, but there is an issue.
> > > >>
> > > >>Suppose I have a file a.bmp, on clicking this file i do get the
> > > >>notification. But now if i
> > > >>
> > > >>click the a.bmp again … I do not get the notification. But if
> > > >>after clicking a.bmp, now
> > > >>
> > > >>i click another file suppose c.txt, notification for c.txt will
> > > >>come.
> > > >>
> > > >>The problem is this that if i try to access the same file
> > > >>subsequently i am not getting the notifications.
> > > >>
> > > >>Please help me.
> > > >>
> > > >>Thanks in advance.
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> >From: Nick Ryan
> > > >> >Reply-To: “Windows System Software Devs Interest List”
> > > >> >To: “Windows System Software Devs Interest List”
> > > >> >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > > >> >Date: Mon, 09 Feb 2004 20:51:06 -0800
> > > >> >
> > > >> >(For future reference, the correct forum for this question is
> > > >> >ntfsd.)
> > > >> >
> > > >> >Your code is correct, the bug must be somewhere else. You say
> > > >>you
> > > >> >are simply not seeing any creates for which dwOpenOptions is
> > > >> >FILE_OPEN?
> > > >> >
> > > >> >cheerful vishwanathan wrote:
> > > >> >>
> > > >> >>I am developing a filter driver for a NT file system, and
want
> > > >>to
> > > >> >>trap FILE OPEN and DIRECTORY OPEN requests.
> > > >> >> At present I am trapping IRP_MJ_CREATE for open request.
> > > >> >>and using the following lines of source
> > > >> >> DWORD dwOpenOptions = ((pParms->Parameters.Create.Options
>>
> > > >>24)
> > > >> >>& 0xFF);
> > > >> >>
> > > >> >>DWORD dwUserOptions = (pParms->Parameters.Create.Options &
> > > >> >>FILE_VALID_OPTION_FLAGS);
> > > >> >>
> > > >> >>where dwOpenOptions is the CreateDisposition and should have
> > > >>the
> > > >> >>value FILE_OPEN in case of file open request.
> > > >> >>
> > > >> >>It is working fine in case of create i.e FILE_CREATE.
> > > >> >>
> > > >> >>But i am not getting the appropriate value for
> > > >>CreateDisposition
> > > >> >>(i.e. FILE_OPEN) in case of file open request.
> > > >> >>
> > > >> >>Actually I am having a service running in background that
> > > >> >>continuously polls the filter driver and it gives me the
> > > >> >>notification for file/directory create, but not for
> > > >>file/directory
> > > >> >>open.
> > > >> >>
> > > >> >>Can anyone tell me how to get notifications from driver for
> > > >> >>file/directory open in my service?
> > > >> >>
> > > >> >>Thanks in Advance.
> > > >> >>
> > > >> >>
> > > >>
> > > >>
> >
>>----------------------------------------------------------------------
> >–
> > > >> >>Contact brides & grooms FREE! Only on www.shaadi.com.
Register
> > > >>now!
> > > >> >>
> > > >> >
> > > >> >–
> > > >> >- Nick Ryan
> > > >> >- Microsoft MVP for DDK
> > > >> >
> > > >> >—
> > > >> >Questions? First check the Kernel Driver FAQ at
> > > >> >http://www.osronline.com/article.cfm?id=256
> > > >> >
> > > >> >You are currently subscribed to ntdev as:
xxxxx@hotmail.com
> > > >> >To unsubscribe send a blank email to
> > > >> >xxxxx@lists.osr.com
> > > >>
> > >
> >
>>----------------------------------------------------------------------
> >–
> > > >>Contact brides & grooms FREE! Only on www.shaadi.com. Register
now!
> > > >>
> > > >
> > > >–
> > > >- Nick Ryan
> > > >- Microsoft MVP for DDK
> > > >
> > > >—
> > > >Questions? First check the Kernel Driver FAQ at
> > > >http://www.osronline.com/article.cfm?id=256
> > > >
> > > >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > > >To unsubscribe send a blank email to
> > > >xxxxx@lists.osr.com
> > >
> > >
> >
> ----------------------------------------------------------------------
> >----------
> > > Contact brides & grooms FREE! Only on www.shaadi.com. Register
> >now! —
> > > Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@cbatson.com
> > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> >
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> ----------------------------------------------------------------------
----------
> Contact brides & grooms FREE! Only on www.shaadi.com. Register
now! —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cbatson.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Actually the problem is that I am not getting consistent notifications when i am accessing the same file subsequently. I am able to get notifications when i open the file from command prompt, but it fails when i open the file from windows explorer.

My requirement is to get the notification when user opens a file or directory on local or from remote system. Can you please give me some idea about that?

Thanks

Vivek

From: “Chuck Batson”

>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>Subject: Re: [ntdev] STUCK - NEED HELP
>Date: Wed, 11 Feb 2004 12:34:43 +0700
>
>Why would that be a problem?
>
>Chuck
>
>----- Original Message -----
>From: “cheerful vishwanathan”
>To: “Windows System Software Devs Interest List”
>Sent: Wednesday, February 11, 2004 10:25 AM
>Subject: Re: [ntdev] STUCK - NEED HELP
>
>
> > My application is not holding on to the file handle but the OS seems
>to be checking the file in “recent files” directory and picking it from
>there. At this point i do not know how to handle this.
> >
> > Vivek
> >
> > >From: “Chuck Batson”
> > >Reply-To: “Windows System Software Devs Interest List”
> > >To: “Windows System Software Devs Interest List”
> > >Subject: Re: [ntdev] STUCK - NEED HELP
> > >Date: Wed, 11 Feb 2004 02:03:27 +0700
> > >
> > >That might suggest that someone, somewhere (perhaps the application
>or
> > >perhaps Windows) is caching a handle to the open file.
> > >
> > >Chuck
> > >
> > >----- Original Message -----
> > >From: “cheerful vishwanathan”
> > >To: “Windows System Software Devs Interest List”
> > >Sent: Tuesday, February 10, 2004 11:43 PM
> > >Subject: [ntdev] STUCK - NEED HELP
> > >
> > >
> > > >
> > > >
> > > >
> > > > I am double clicking the file from windows explorer(OS is windows
>XP),
> > >and on the subsequent click i am not getting the notification.
> > > >
> > > > But if i am opening the file from command prompt i am getting the
> > >notifications properly even on the subsequent open request for the
>same
> > >file.
> > > >
> > > > Viviek
> > > >
> > > > >From: Nick Ryan
> > > > >Reply-To: “Windows System Software Devs Interest List”
> > > > >To: “Windows System Software Devs Interest List”
> > > > >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > > > >Date: Mon, 09 Feb 2004 23:43:26 -0800
> > > > >
> > > > >Are you just ‘clicking’ on the file or are you actually opening
>it?
> > > > >:) I mean, if you’re opening the file again, another
>IRP_MJ_CREATE
> > > > >is being sent down, period.
> > > > >
> > > > >cheerful vishwanathan wrote:
> > > > >
> > > > >>Hi
> > > > >>
> > > > >>Thanks for your help.
> > > > >>
> > > > >>Now I am getting FILE_OPEN, but there is an issue.
> > > > >>
> > > > >>Suppose I have a file a.bmp, on clicking this file i do get the
> > > > >>notification. But now if i
> > > > >>
> > > > >>click the a.bmp again … I do not get the notification. But if
> > > > >>after clicking a.bmp, now
> > > > >>
> > > > >>i click another file suppose c.txt, notification for c.txt will
> > > > >>come.
> > > > >>
> > > > >>The problem is this that if i try to access the same file
> > > > >>subsequently i am not getting the notifications.
> > > > >>
> > > > >>Please help me.
> > > > >>
> > > > >>Thanks in advance.
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >> >From: Nick Ryan
> > > > >> >Reply-To: “Windows System Software Devs Interest List”
> > > > >> >To: “Windows System Software Devs Interest List”
> > > > >> >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > > > >> >Date: Mon, 09 Feb 2004 20:51:06 -0800
> > > > >> >
> > > > >> >(For future reference, the correct forum for this question is
> > > > >> >ntfsd.)
> > > > >> >
> > > > >> >Your code is correct, the bug must be somewhere else. You say
> > > > >>you
> > > > >> >are simply not seeing any creates for which dwOpenOptions is
> > > > >> >FILE_OPEN?
> > > > >> >
> > > > >> >cheerful vishwanathan wrote:
> > > > >> >>
> > > > >> >>I am developing a filter driver for a NT file system, and
>want
> > > > >>to
> > > > >> >>trap FILE OPEN and DIRECTORY OPEN requests.
> > > > >> >> At present I am trapping IRP_MJ_CREATE for open request.
> > > > >> >>and using the following lines of source
> > > > >> >> DWORD dwOpenOptions = ((pParms->Parameters.Create.Options
> >>
> > > > >>24)
> > > > >> >>& 0xFF);
> > > > >> >>
> > > > >> >>DWORD dwUserOptions = (pParms->Parameters.Create.Options &
> > > > >> >>FILE_VALID_OPTION_FLAGS);
> > > > >> >>
> > > > >> >>where dwOpenOptions is the CreateDisposition and should have
> > > > >>the
> > > > >> >>value FILE_OPEN in case of file open request.
> > > > >> >>
> > > > >> >>It is working fine in case of create i.e FILE_CREATE.
> > > > >> >>
> > > > >> >>But i am not getting the appropriate value for
> > > > >>CreateDisposition
> > > > >> >>(i.e. FILE_OPEN) in case of file open request.
> > > > >> >>
> > > > >> >>Actually I am having a service running in background that
> > > > >> >>continuously polls the filter driver and it gives me the
> > > > >> >>notification for file/directory create, but not for
> > > > >>file/directory
> > > > >> >>open.
> > > > >> >>
> > > > >> >>Can anyone tell me how to get notifications from driver for
> > > > >> >>file/directory open in my service?
> > > > >> >>
> > > > >> >>Thanks in Advance.
> > > > >> >>
> > > > >> >>
> > > > >>
> > > > >>
> > >
> >>----------------------------------------------------------------------
> > >–
> > > > >> >>Contact brides & grooms FREE! Only on www.shaadi.com.
>Register
> > > > >>now!
> > > > >> >>
> > > > >> >
> > > > >> >–
> > > > >> >- Nick Ryan
> > > > >> >- Microsoft MVP for DDK
> > > > >> >
> > > > >> >—
> > > > >> >Questions? First check the Kernel Driver FAQ at
> > > > >> >http://www.osronline.com/article.cfm?id=256
> > > > >> >
> > > > >> >You are currently subscribed to ntdev as:
>xxxxx@hotmail.com
> > > > >> >To unsubscribe send a blank email to
> > > > >> >xxxxx@lists.osr.com
> > > > >>
> > > >
> > >
> >>----------------------------------------------------------------------
> > >–
> > > > >>Contact brides & grooms FREE! Only on www.shaadi.com. Register
>now!
> > > > >>
> > > > >
> > > > >–
> > > > >- Nick Ryan
> > > > >- Microsoft MVP for DDK
> > > > >
> > > > >—
> > > > >Questions? First check the Kernel Driver FAQ at
> > > > >http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > > > >To unsubscribe send a blank email to
> > > > >xxxxx@lists.osr.com
> > > >
> > > >
> > >
> > ----------------------------------------------------------------------
> > >----------
> > > > Contact brides & grooms FREE! Only on www.shaadi.com. Register
> > >now! —
> > > > Questions? First check the Kernel Driver FAQ at
> > >http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: xxxxx@cbatson.com
> > > > To unsubscribe send a blank email to
>xxxxx@lists.osr.com
> > >
> > >
> > >—
> > >Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
> > >
> > >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > >To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> > ----------------------------------------------------------------------
>----------
> > Contact brides & grooms FREE! Only on www.shaadi.com. Register
>now! —
> > Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@cbatson.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com


Easiest Money Transfer to India. Send Money To 6000 Indian Towns. Easiest Way To Send Money Home!

But you ARE getting notification when the file is opened. Just that it
appears the file handle is being kept open and re-used the next time the
file is double clicked. Or am I missing something?

Chuck

----- Original Message -----
From: “cheerful vishwanathan”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, February 11, 2004 2:11 PM
Subject: Re: [ntdev] STUCK - NEED HELP

> Actually the problem is that I am not getting consistent notifications
when i am accessing the same file subsequently. I am able to get
notifications when i open the file from command prompt, but it fails
when i open the file from windows explorer.
>
> My requirement is to get the notification when user opens a file or
directory on local or from remote system. Can you please give me some
idea about that?
>
> Thanks
>
> Vivek
>
>
>
>
>
>
> >From: “Chuck Batson”
> >Reply-To: “Windows System Software Devs Interest List”
> >To: “Windows System Software Devs Interest List”
> >Subject: Re: [ntdev] STUCK - NEED HELP
> >Date: Wed, 11 Feb 2004 12:34:43 +0700
> >
> >Why would that be a problem?
> >
> >Chuck
> >
> >----- Original Message -----
> >From: “cheerful vishwanathan”
> >To: “Windows System Software Devs Interest List”
> >Sent: Wednesday, February 11, 2004 10:25 AM
> >Subject: Re: [ntdev] STUCK - NEED HELP
> >
> >
> > > My application is not holding on to the file handle but the OS
seems
> >to be checking the file in “recent files” directory and picking it
from
> >there. At this point i do not know how to handle this.
> > >
> > > Vivek
> > >
> > > >From: “Chuck Batson”
> > > >Reply-To: “Windows System Software Devs Interest List”
> > > >To: “Windows System Software Devs Interest List”
> > > >Subject: Re: [ntdev] STUCK - NEED HELP
> > > >Date: Wed, 11 Feb 2004 02:03:27 +0700
> > > >
> > > >That might suggest that someone, somewhere (perhaps the
application
> >or
> > > >perhaps Windows) is caching a handle to the open file.
> > > >
> > > >Chuck
> > > >
> > > >----- Original Message -----
> > > >From: “cheerful vishwanathan”
> > > >To: “Windows System Software Devs Interest List”
> > > >Sent: Tuesday, February 10, 2004 11:43 PM
> > > >Subject: [ntdev] STUCK - NEED HELP
> > > >
> > > >
> > > > >
> > > > >
> > > > >
> > > > > I am double clicking the file from windows explorer(OS is
windows
> >XP),
> > > >and on the subsequent click i am not getting the notification.
> > > > >
> > > > > But if i am opening the file from command prompt i am getting
the
> > > >notifications properly even on the subsequent open request for
the
> >same
> > > >file.
> > > > >
> > > > > Viviek
> > > > >
> > > > > >From: Nick Ryan
> > > > > >Reply-To: “Windows System Software Devs Interest List”
> > > > > >To: “Windows System Software Devs Interest List”
> > > > > >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > > > > >Date: Mon, 09 Feb 2004 23:43:26 -0800
> > > > > >
> > > > > >Are you just ‘clicking’ on the file or are you actually
opening
> >it?
> > > > > >:) I mean, if you’re opening the file again, another
> >IRP_MJ_CREATE
> > > > > >is being sent down, period.
> > > > > >
> > > > > >cheerful vishwanathan wrote:
> > > > > >
> > > > > >>Hi
> > > > > >>
> > > > > >>Thanks for your help.
> > > > > >>
> > > > > >>Now I am getting FILE_OPEN, but there is an issue.
> > > > > >>
> > > > > >>Suppose I have a file a.bmp, on clicking this file i do get
the
> > > > > >>notification. But now if i
> > > > > >>
> > > > > >>click the a.bmp again … I do not get the notification. But
if
> > > > > >>after clicking a.bmp, now
> > > > > >>
> > > > > >>i click another file suppose c.txt, notification for c.txt
will
> > > > > >>come.
> > > > > >>
> > > > > >>The problem is this that if i try to access the same file
> > > > > >>subsequently i am not getting the notifications.
> > > > > >>
> > > > > >>Please help me.
> > > > > >>
> > > > > >>Thanks in advance.
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> >From: Nick Ryan
> > > > > >> >Reply-To: “Windows System Software Devs Interest List”
> > > > > >> >To: “Windows System Software Devs Interest List”
> > > > > >> >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > > > > >> >Date: Mon, 09 Feb 2004 20:51:06 -0800
> > > > > >> >
> > > > > >> >(For future reference, the correct forum for this
question is
> > > > > >> >ntfsd.)
> > > > > >> >
> > > > > >> >Your code is correct, the bug must be somewhere else. You
say
> > > > > >>you
> > > > > >> >are simply not seeing any creates for which dwOpenOptions
is
> > > > > >> >FILE_OPEN?
> > > > > >> >
> > > > > >> >cheerful vishwanathan wrote:
> > > > > >> >>
> > > > > >> >>I am developing a filter driver for a NT file system,
and
> >want
> > > > > >>to
> > > > > >> >>trap FILE OPEN and DIRECTORY OPEN requests.
> > > > > >> >> At present I am trapping IRP_MJ_CREATE for open
request.
> > > > > >> >>and using the following lines of source
> > > > > >> >> DWORD dwOpenOptions =
((pParms->Parameters.Create.Options
> > >>
> > > > > >>24)
> > > > > >> >>& 0xFF);
> > > > > >> >>
> > > > > >> >>DWORD dwUserOptions = (pParms->Parameters.Create.Options
&
> > > > > >> >>FILE_VALID_OPTION_FLAGS);
> > > > > >> >>
> > > > > >> >>where dwOpenOptions is the CreateDisposition and should
have
> > > > > >>the
> > > > > >> >>value FILE_OPEN in case of file open request.
> > > > > >> >>
> > > > > >> >>It is working fine in case of create i.e FILE_CREATE.
> > > > > >> >>
> > > > > >> >>But i am not getting the appropriate value for
> > > > > >>CreateDisposition
> > > > > >> >>(i.e. FILE_OPEN) in case of file open request.
> > > > > >> >>
> > > > > >> >>Actually I am having a service running in background
that
> > > > > >> >>continuously polls the filter driver and it gives me the
> > > > > >> >>notification for file/directory create, but not for
> > > > > >>file/directory
> > > > > >> >>open.
> > > > > >> >>
> > > > > >> >>Can anyone tell me how to get notifications from driver
for
> > > > > >> >>file/directory open in my service?
> > > > > >> >>
> > > > > >> >>Thanks in Advance.
> > > > > >> >>
> > > > > >> >>
> > > > > >>
> > > > > >>
> > > >
> >
>>----------------------------------------------------------------------
> > > >–
> > > > > >> >>Contact brides & grooms FREE! Only on www.shaadi.com.
> >Register
> > > > > >>now!
> > > > > >> >>
> > > > > >> >
> > > > > >> >–
> > > > > >> >- Nick Ryan
> > > > > >> >- Microsoft MVP for DDK
> > > > > >> >
> > > > > >> >—
> > > > > >> >Questions? First check the Kernel Driver FAQ at
> > > > > >> >http://www.osronline.com/article.cfm?id=256
> > > > > >> >
> > > > > >> >You are currently subscribed to ntdev as:
> >xxxxx@hotmail.com
> > > > > >> >To unsubscribe send a blank email to
> > > > > >> >xxxxx@lists.osr.com
> > > > > >>
> > > > >
> > > >
> >
>>----------------------------------------------------------------------
> > > >–
> > > > > >>Contact brides & grooms FREE! Only on www.shaadi.com.
Register
> >now!
> > > > > >>
> > > > > >
> > > > > >–
> > > > > >- Nick Ryan
> > > > > >- Microsoft MVP for DDK
> > > > > >
> > > > > >—
> > > > > >Questions? First check the Kernel Driver FAQ at
> > > > > >http://www.osronline.com/article.cfm?id=256
> > > > > >
> > > > > >You are currently subscribed to ntdev as:
xxxxx@hotmail.com
> > > > > >To unsubscribe send a blank email to
> > > > > >xxxxx@lists.osr.com
> > > > >
> > > > >
> > > >
> >
> ----------------------------------------------------------------------
> > > >----------
> > > > > Contact brides & grooms FREE! Only on www.shaadi.com. Register
> > > >now! —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > >http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > You are currently subscribed to ntdev as:
xxxxx@cbatson.com
> > > > > To unsubscribe send a blank email to
> >xxxxx@lists.osr.com
> > > >
> > > >
> > > >—
> > > >Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> > > >
> > > >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > > >To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> > >
> >
> ----------------------------------------------------------------------
> >----------
> > > Contact brides & grooms FREE! Only on www.shaadi.com. Register
> >now! —
> > > Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@cbatson.com
> > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> >
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> ----------------------------------------------------------------------
----------
> Easiest Money Transfer to India. Send Money To 6000 Indian Towns.
Easiest Way To Send Money Home! —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cbatson.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

but if i am opening the file from command prompt i am getting the notifications properly.

The only thing is when i access the file from windows explorer i am not able to get the notifications subsequently. If there are two files a.bmp and b.bmp, and if double clicks the

a.bmp i get the notification…and now if i again clicks the a.bmp i do  not get any notification.

I have to click b.bmp and then again a.bmp to get the notification.

Please help

Thanks

Vivek 

From: “Chuck Batson”

>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>Subject: Re: [ntdev] STUCK - NEED HELP
>Date: Wed, 11 Feb 2004 15:43:23 +0700
>
>But you ARE getting notification when the file is opened. Just that it
>appears the file handle is being kept open and re-used the next time the
>file is double clicked. Or am I missing something?
>
>Chuck
>
>----- Original Message -----
>From: “cheerful vishwanathan”
>To: “Windows System Software Devs Interest List”
>Sent: Wednesday, February 11, 2004 2:11 PM
>Subject: Re: [ntdev] STUCK - NEED HELP
>
>
> > Actually the problem is that I am not getting consistent notifications
>when i am accessing the same file subsequently. I am able to get
>notifications when i open the file from command prompt, but it fails
>when i open the file from windows explorer.
> >
> > My requirement is to get the notification when user opens a file or
>directory on local or from remote system. Can you please give me some
>idea about that?
> >
> > Thanks
> >
> > Vivek
> >
> >
> >
> >
> >
> >
> > >From: “Chuck Batson”
> > >Reply-To: “Windows System Software Devs Interest List”
> > >To: “Windows System Software Devs Interest List”
> > >Subject: Re: [ntdev] STUCK - NEED HELP
> > >Date: Wed, 11 Feb 2004 12:34:43 +0700
> > >
> > >Why would that be a problem?
> > >
> > >Chuck
> > >
> > >----- Original Message -----
> > >From: “cheerful vishwanathan”
> > >To: “Windows System Software Devs Interest List”
> > >Sent: Wednesday, February 11, 2004 10:25 AM
> > >Subject: Re: [ntdev] STUCK - NEED HELP
> > >
> > >
> > > > My application is not holding on to the file handle but the OS
>seems
> > >to be checking the file in “recent files” directory and picking it
>from
> > >there. At this point i do not know how to handle this.
> > > >
> > > > Vivek
> > > >
> > > > >From: “Chuck Batson”
> > > > >Reply-To: “Windows System Software Devs Interest List”
> > > > >To: “Windows System Software Devs Interest List”
> > > > >Subject: Re: [ntdev] STUCK - NEED HELP
> > > > >Date: Wed, 11 Feb 2004 02:03:27 +0700
> > > > >
> > > > >That might suggest that someone, somewhere (perhaps the
>application
> > >or
> > > > >perhaps Windows) is caching a handle to the open file.
> > > > >
> > > > >Chuck
> > > > >
> > > > >----- Original Message -----
> > > > >From: “cheerful vishwanathan”
> > > > >To: “Windows System Software Devs Interest List”
> > > > >Sent: Tuesday, February 10, 2004 11:43 PM
> > > > >Subject: [ntdev] STUCK - NEED HELP
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > I am double clicking the file from windows explorer(OS is
>windows
> > >XP),
> > > > >and on the subsequent click i am not getting the notification.
> > > > > >
> > > > > > But if i am opening the file from command prompt i am getting
>the
> > > > >notifications properly even on the subsequent open request for
>the
> > >same
> > > > >file.
> > > > > >
> > > > > > Viviek
> > > > > >
> > > > > > >From: Nick Ryan
> > > > > > >Reply-To: “Windows System Software Devs Interest List”
> > > > > > >To: “Windows System Software Devs Interest List”
> > > > > > >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > > > > > >Date: Mon, 09 Feb 2004 23:43:26 -0800
> > > > > > >
> > > > > > >Are you just ‘clicking’ on the file or are you actually
>opening
> > >it?
> > > > > > >:) I mean, if you’re opening the file again, another
> > >IRP_MJ_CREATE
> > > > > > >is being sent down, period.
> > > > > > >
> > > > > > >cheerful vishwanathan wrote:
> > > > > > >
> > > > > > >>Hi
> > > > > > >>
> > > > > > >>Thanks for your help.
> > > > > > >>
> > > > > > >>Now I am getting FILE_OPEN, but there is an issue.
> > > > > > >>
> > > > > > >>Suppose I have a file a.bmp, on clicking this file i do get
>the
> > > > > > >>notification. But now if i
> > > > > > >>
> > > > > > >>click the a.bmp again … I do not get the notification. But
>if
> > > > > > >>after clicking a.bmp, now
> > > > > > >>
> > > > > > >>i click another file suppose c.txt, notification for c.txt
>will
> > > > > > >>come.
> > > > > > >>
> > > > > > >>The problem is this that if i try to access the same file
> > > > > > >>subsequently i am not getting the notifications.
> > > > > > >>
> > > > > > >>Please help me.
> > > > > > >>
> > > > > > >>Thanks in advance.
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >> >From: Nick Ryan
> > > > > > >> >Reply-To: “Windows System Software Devs Interest List”
> > > > > > >> >To: “Windows System Software Devs Interest List”
> > > > > > >> >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > > > > > >> >Date: Mon, 09 Feb 2004 20:51:06 -0800
> > > > > > >> >
> > > > > > >> >(For future reference, the correct forum for this
>question is
> > > > > > >> >ntfsd.)
> > > > > > >> >
> > > > > > >> >Your code is correct, the bug must be somewhere else. You
>say
> > > > > > >>you
> > > > > > >> >are simply not seeing any creates for which dwOpenOptions
>is
> > > > > > >> >FILE_OPEN?
> > > > > > >> >
> > > > > > >> >cheerful vishwanathan wrote:
> > > > > > >> >>
> > > > > > >> >>I am developing a filter driver for a NT file system,
>and
> > >want
> > > > > > >>to
> > > > > > >> >>trap FILE OPEN and DIRECTORY OPEN requests.
> > > > > > >> >> At present I am trapping IRP_MJ_CREATE for open
>request.
> > > > > > >> >>and using the following lines of source
> > > > > > >> >> DWORD dwOpenOptions =
>((pParms->Parameters.Create.Options
> > > >>
> > > > > > >>24)
> > > > > > >> >>& 0xFF);
> > > > > > >> >>
> > > > > > >> >>DWORD dwUserOptions = (pParms->Parameters.Create.Options
>&
> > > > > > >> >>FILE_VALID_OPTION_FLAGS);
> > > > > > >> >>
> > > > > > >> >>where dwOpenOptions is the CreateDisposition and should
>have
> > > > > > >>the
> > > > > > >> >>value FILE_OPEN in case of file open request.
> > > > > > >> >>
> > > > > > >> >>It is working fine in case of create i.e FILE_CREATE.
> > > > > > >> >>
> > > > > > >> >>But i am not getting the appropriate value for
> > > > > > >>CreateDisposition
> > > > > > >> >>(i.e. FILE_OPEN) in case of file open request.
> > > > > > >> >>
> > > > > > >> >>Actually I am having a service running in background
>that
> > > > > > >> >>continuously polls the filter driver and it gives me the
> > > > > > >> >>notification for file/directory create, but not for
> > > > > > >>file/directory
> > > > > > >> >>open.
> > > > > > >> >>
> > > > > > >> >>Can anyone tell me how to get notifications from driver
>for
> > > > > > >> >>file/directory open in my service?
> > > > > > >> >>
> > > > > > >> >>Thanks in Advance.
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >>
> > > > > > >>
> > > > >
> > >
> >>----------------------------------------------------------------------
> > > > >–
> > > > > > >> >>Contact brides & grooms FREE! Only on www.shaadi.com.
> > >Register
> > > > > > >>now!
> > > > > > >> >>
> > > > > > >> >
> > > > > > >> >–
> > > > > > >> >- Nick Ryan
> > > > > > >> >- Microsoft MVP for DDK
> > > > > > >> >
> > > > > > >> >—
> > > > > > >> >Questions? First check the Kernel Driver FAQ at
> > > > > > >> >http://www.osronline.com/article.cfm?id=256
> > > > > > >> >
> > > > > > >> >You are currently subscribed to ntdev as:
> > >xxxxx@hotmail.com
> > > > > > >> >To unsubscribe send a blank email to
> > > > > > >> >xxxxx@lists.osr.com
> > > > > > >>
> > > > > >
> > > > >
> > >
> >>----------------------------------------------------------------------
> > > > >–
> > > > > > >>Contact brides & grooms FREE! Only on www.shaadi.com.
>Register
> > >now!
> > > > > > >>
> > > > > > >
> > > > > > >–
> > > > > > >- Nick Ryan
> > > > > > >- Microsoft MVP for DDK
> > > > > > >
> > > > > > >—
> > > > > > >Questions? First check the Kernel Driver FAQ at
> > > > > > >http://www.osronline.com/article.cfm?id=256
> > > > > > >
> > > > > > >You are currently subscribed to ntdev as:
>xxxxx@hotmail.com
> > > > > > >To unsubscribe send a blank email to
> > > > > > >xxxxx@lists.osr.com
> > > > > >
> > > > > >
> > > > >
> > >
> > ----------------------------------------------------------------------
> > > > >----------
> > > > > > Contact brides & grooms FREE! Only on www.shaadi.com. Register
> > > > >now! —
> > > > > > Questions? First check the Kernel Driver FAQ at
> > > > >http://www.osronline.com/article.cfm?id=256
> > > > > >
> > > > > > You are currently subscribed to ntdev as:
>xxxxx@cbatson.com
> > > > > > To unsubscribe send a blank email to
> > >xxxxx@lists.osr.com
> > > > >
> > > > >
> > > > >—
> > > > >Questions? First check the Kernel Driver FAQ at
> > >http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > > > >To unsubscribe send a blank email to
>xxxxx@lists.osr.com
> > > >
> > > >
> > >
> > ----------------------------------------------------------------------
> > >----------
> > > > Contact brides & grooms FREE! Only on www.shaadi.com. Register
> > >now! —
> > > > Questions? First check the Kernel Driver FAQ at
> > >http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: xxxxx@cbatson.com
> > > > To unsubscribe send a blank email to
>xxxxx@lists.osr.com
> > >
> > >
> > >—
> > >Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
> > >
> > >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > >To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> > ----------------------------------------------------------------------
>----------
> > Easiest Money Transfer to India. Send Money To 6000 Indian Towns.
>Easiest Way To Send Money Home! —
> > Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@cbatson.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com


Easiest Money Transfer to India. Send Money To 6000 Indian Towns. Easiest Way To Send Money Home!

I don’t see the problem with that. Is your requirement to know when a
file is opened or when a file is double-clicked?

Chuck

----- Original Message -----
From: “cheerful vishwanathan”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, February 11, 2004 4:13 PM
Subject: Re: [ntdev] STUCK - NEED HELP

> but if i am opening the file from command prompt i am getting the
notifications properly.
>
> The only thing is when i access the file from windows explorer i am
not able to get the notifications subsequently. If there are two files
a.bmp and b.bmp, and if double clicks the
>
> a.bmp i get the notification…and now if i again clicks the a.bmp i do
not get any notification.
>
> I have to click b.bmp and then again a.bmp to get the notification.
>
> Please help
>
> Thanks
>
> Vivek
>
>
>
>
>
>
> >From: “Chuck Batson”
> >Reply-To: “Windows System Software Devs Interest List”
> >To: “Windows System Software Devs Interest List”
> >Subject: Re: [ntdev] STUCK - NEED HELP
> >Date: Wed, 11 Feb 2004 15:43:23 +0700
> >
> >But you ARE getting notification when the file is opened. Just that
it
> >appears the file handle is being kept open and re-used the next time
the
> >file is double clicked. Or am I missing something?
> >
> >Chuck
> >
> >----- Original Message -----
> >From: “cheerful vishwanathan”
> >To: “Windows System Software Devs Interest List”
> >Sent: Wednesday, February 11, 2004 2:11 PM
> >Subject: Re: [ntdev] STUCK - NEED HELP
> >
> >
> > > Actually the problem is that I am not getting consistent
notifications
> >when i am accessing the same file subsequently. I am able to get
> >notifications when i open the file from command prompt, but it fails
> >when i open the file from windows explorer.
> > >
> > > My requirement is to get the notification when user opens a file
or
> >directory on local or from remote system. Can you please give me some
> >idea about that?
> > >
> > > Thanks
> > >
> > > Vivek
> > >
> > >
> > >
> > >
> > >
> > >
> > > >From: “Chuck Batson”
> > > >Reply-To: “Windows System Software Devs Interest List”
> > > >To: “Windows System Software Devs Interest List”
> > > >Subject: Re: [ntdev] STUCK - NEED HELP
> > > >Date: Wed, 11 Feb 2004 12:34:43 +0700
> > > >
> > > >Why would that be a problem?
> > > >
> > > >Chuck
> > > >
> > > >----- Original Message -----
> > > >From: “cheerful vishwanathan”
> > > >To: “Windows System Software Devs Interest List”
> > > >Sent: Wednesday, February 11, 2004 10:25 AM
> > > >Subject: Re: [ntdev] STUCK - NEED HELP
> > > >
> > > >
> > > > > My application is not holding on to the file handle but the OS
> >seems
> > > >to be checking the file in “recent files” directory and picking
it
> >from
> > > >there. At this point i do not know how to handle this.
> > > > >
> > > > > Vivek
> > > > >
> > > > > >From: “Chuck Batson”
> > > > > >Reply-To: “Windows System Software Devs Interest List”
> > > > > >To: “Windows System Software Devs Interest List”
> > > > > >Subject: Re: [ntdev] STUCK - NEED HELP
> > > > > >Date: Wed, 11 Feb 2004 02:03:27 +0700
> > > > > >
> > > > > >That might suggest that someone, somewhere (perhaps the
> >application
> > > >or
> > > > > >perhaps Windows) is caching a handle to the open file.
> > > > > >
> > > > > >Chuck
> > > > > >
> > > > > >----- Original Message -----
> > > > > >From: “cheerful vishwanathan”
> > > > > >To: “Windows System Software Devs Interest List”
> > > > > >Sent: Tuesday, February 10, 2004 11:43 PM
> > > > > >Subject: [ntdev] STUCK - NEED HELP
> > > > > >
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > I am double clicking the file from windows explorer(OS is
> >windows
> > > >XP),
> > > > > >and on the subsequent click i am not getting the
notification.
> > > > > > >
> > > > > > > But if i am opening the file from command prompt i am
getting
> >the
> > > > > >notifications properly even on the subsequent open request
for
> >the
> > > >same
> > > > > >file.
> > > > > > >
> > > > > > > Viviek
> > > > > > >
> > > > > > > >From: Nick Ryan
> > > > > > > >Reply-To: “Windows System Software Devs Interest List”
> > > > > > > >To: “Windows System Software Devs Interest List”
> > > > > > > >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > > > > > > >Date: Mon, 09 Feb 2004 23:43:26 -0800
> > > > > > > >
> > > > > > > >Are you just ‘clicking’ on the file or are you actually
> >opening
> > > >it?
> > > > > > > >:) I mean, if you’re opening the file again, another
> > > >IRP_MJ_CREATE
> > > > > > > >is being sent down, period.
> > > > > > > >
> > > > > > > >cheerful vishwanathan wrote:
> > > > > > > >
> > > > > > > >>Hi
> > > > > > > >>
> > > > > > > >>Thanks for your help.
> > > > > > > >>
> > > > > > > >>Now I am getting FILE_OPEN, but there is an issue.
> > > > > > > >>
> > > > > > > >>Suppose I have a file a.bmp, on clicking this file i do
get
> >the
> > > > > > > >>notification. But now if i
> > > > > > > >>
> > > > > > > >>click the a.bmp again … I do not get the notification.
But
> >if
> > > > > > > >>after clicking a.bmp, now
> > > > > > > >>
> > > > > > > >>i click another file suppose c.txt, notification for
c.txt
> >will
> > > > > > > >>come.
> > > > > > > >>
> > > > > > > >>The problem is this that if i try to access the same
file
> > > > > > > >>subsequently i am not getting the notifications.
> > > > > > > >>
> > > > > > > >>Please help me.
> > > > > > > >>
> > > > > > > >>Thanks in advance.
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> >From: Nick Ryan
> > > > > > > >> >Reply-To: “Windows System Software Devs Interest
List”
> > > > > > > >> >To: “Windows System Software Devs Interest List”
> > > > > > > >> >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN

> > > > > > > >> >Date: Mon, 09 Feb 2004 20:51:06 -0800
> > > > > > > >> >
> > > > > > > >> >(For future reference, the correct forum for this
> >question is
> > > > > > > >> >ntfsd.)
> > > > > > > >> >
> > > > > > > >> >Your code is correct, the bug must be somewhere else.
You
> >say
> > > > > > > >>you
> > > > > > > >> >are simply not seeing any creates for which
dwOpenOptions
> >is
> > > > > > > >> >FILE_OPEN?
> > > > > > > >> >
> > > > > > > >> >cheerful vishwanathan wrote:
> > > > > > > >> >>
> > > > > > > >> >>I am developing a filter driver for a NT file
system,
> >and
> > > >want
> > > > > > > >>to
> > > > > > > >> >>trap FILE OPEN and DIRECTORY OPEN requests.
> > > > > > > >> >> At present I am trapping IRP_MJ_CREATE for open
> >request.
> > > > > > > >> >>and using the following lines of source
> > > > > > > >> >> DWORD dwOpenOptions =
> >((pParms->Parameters.Create.Options
> > > > >>
> > > > > > > >>24)
> > > > > > > >> >>& 0xFF);
> > > > > > > >> >>
> > > > > > > >> >>DWORD dwUserOptions =
(pParms->Parameters.Create.Options
> >&
> > > > > > > >> >>FILE_VALID_OPTION_FLAGS);
> > > > > > > >> >>
> > > > > > > >> >>where dwOpenOptions is the CreateDisposition and
should
> >have
> > > > > > > >>the
> > > > > > > >> >>value FILE_OPEN in case of file open request.
> > > > > > > >> >>
> > > > > > > >> >>It is working fine in case of create i.e
FILE_CREATE.
> > > > > > > >> >>
> > > > > > > >> >>But i am not getting the appropriate value for
> > > > > > > >>CreateDisposition
> > > > > > > >> >>(i.e. FILE_OPEN) in case of file open request.
> > > > > > > >> >>
> > > > > > > >> >>Actually I am having a service running in background
> >that
> > > > > > > >> >>continuously polls the filter driver and it gives me
the
> > > > > > > >> >>notification for file/directory create, but not for
> > > > > > > >>file/directory
> > > > > > > >> >>open.
> > > > > > > >> >>
> > > > > > > >> >>Can anyone tell me how to get notifications from
driver
> >for
> > > > > > > >> >>file/directory open in my service?
> > > > > > > >> >>
> > > > > > > >> >>Thanks in Advance.
> > > > > > > >> >>
> > > > > > > >> >>
> > > > > > > >>
> > > > > > > >>
> > > > > >
> > > >
> >
>>----------------------------------------------------------------------
> > > > > >–
> > > > > > > >> >>Contact brides & grooms FREE! Only on
www.shaadi.com.
> > > >Register
> > > > > > > >>now!
> > > > > > > >> >>
> > > > > > > >> >
> > > > > > > >> >–
> > > > > > > >> >- Nick Ryan
> > > > > > > >> >- Microsoft MVP for DDK
> > > > > > > >> >
> > > > > > > >> >—
> > > > > > > >> >Questions? First check the Kernel Driver FAQ at
> > > > > > > >> >http://www.osronline.com/article.cfm?id=256
> > > > > > > >> >
> > > > > > > >> >You are currently subscribed to ntdev as:
> > > >xxxxx@hotmail.com
> > > > > > > >> >To unsubscribe send a blank email to
> > > > > > > >> >xxxxx@lists.osr.com
> > > > > > > >>
> > > > > > >
> > > > > >
> > > >
> >
>>----------------------------------------------------------------------
> > > > > >–
> > > > > > > >>Contact brides & grooms FREE! Only on www.shaadi.com.
> >Register
> > > >now!
> > > > > > > >>
> > > > > > > >
> > > > > > > >–
> > > > > > > >- Nick Ryan
> > > > > > > >- Microsoft MVP for DDK
> > > > > > > >
> > > > > > > >—
> > > > > > > >Questions? First check the Kernel Driver FAQ at
> > > > > > > >http://www.osronline.com/article.cfm?id=256
> > > > > > > >
> > > > > > > >You are currently subscribed to ntdev as:
> >xxxxx@hotmail.com
> > > > > > > >To unsubscribe send a blank email to
> > > > > > > >xxxxx@lists.osr.com
> > > > > > >
> > > > > > >
> > > > > >
> > > >
> >
> ----------------------------------------------------------------------
> > > > > >----------
> > > > > > > Contact brides & grooms FREE! Only on www.shaadi.com.
Register
> > > > > >now! —
> > > > > > > Questions? First check the Kernel Driver FAQ at
> > > > > >http://www.osronline.com/article.cfm?id=256
> > > > > > >
> > > > > > > You are currently subscribed to ntdev as:
> >xxxxx@cbatson.com
> > > > > > > To unsubscribe send a blank email to
> > > >xxxxx@lists.osr.com
> > > > > >
> > > > > >
> > > > > >—
> > > > > >Questions? First check the Kernel Driver FAQ at
> > > >http://www.osronline.com/article.cfm?id=256
> > > > > >
> > > > > >You are currently subscribed to ntdev as:
xxxxx@hotmail.com
> > > > > >To unsubscribe send a blank email to
> >xxxxx@lists.osr.com
> > > > >
> > > > >
> > > >
> >
> ----------------------------------------------------------------------
> > > >----------
> > > > > Contact brides & grooms FREE! Only on www.shaadi.com. Register
> > > >now! —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > >http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > You are currently subscribed to ntdev as:
xxxxx@cbatson.com
> > > > > To unsubscribe send a blank email to
> >xxxxx@lists.osr.com
> > > >
> > > >
> > > >—
> > > >Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> > > >
> > > >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > > >To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> > >
> >
> ----------------------------------------------------------------------
> >----------
> > > Easiest Money Transfer to India. Send Money To 6000 Indian Towns.
> >Easiest Way To Send Money Home! —
> > > Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@cbatson.com
> > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> >
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> ----------------------------------------------------------------------
----------
> Easiest Money Transfer to India. Send Money To 6000 Indian Towns.
Easiest Way To Send Money Home! —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cbatson.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

my requirement is to get the notification when the file or directory is opened whether it is by double clicking from the windows explorer, or by opening it from command prompt , or from a program , or from any other source.

thankx

vivek

From: “Chuck Batson”

>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>Subject: Re: [ntdev] STUCK - NEED HELP
>Date: Wed, 11 Feb 2004 16:28:00 +0700
>
>I don’t see the problem with that. Is your requirement to know when a
>file is opened or when a file is double-clicked?
>
>Chuck
>
>----- Original Message -----
>From: “cheerful vishwanathan”
>To: “Windows System Software Devs Interest List”
>Sent: Wednesday, February 11, 2004 4:13 PM
>Subject: Re: [ntdev] STUCK - NEED HELP
>
>
> > but if i am opening the file from command prompt i am getting the
>notifications properly.
> >
> > The only thing is when i access the file from windows explorer i am
>not able to get the notifications subsequently. If there are two files
>a.bmp and b.bmp, and if double clicks the
> >
> > a.bmp i get the notification…and now if i again clicks the a.bmp i do
>not get any notification.
> >
> > I have to click b.bmp and then again a.bmp to get the notification.
> >
> > Please help
> >
> > Thanks
> >
> > Vivek
> >
> >
> >
> >
> >
> >
> > >From: “Chuck Batson”
> > >Reply-To: “Windows System Software Devs Interest List”
> > >To: “Windows System Software Devs Interest List”
> > >Subject: Re: [ntdev] STUCK - NEED HELP
> > >Date: Wed, 11 Feb 2004 15:43:23 +0700
> > >
> > >But you ARE getting notification when the file is opened. Just that
>it
> > >appears the file handle is being kept open and re-used the next time
>the
> > >file is double clicked. Or am I missing something?
> > >
> > >Chuck
> > >
> > >----- Original Message -----
> > >From: “cheerful vishwanathan”
> > >To: “Windows System Software Devs Interest List”
> > >Sent: Wednesday, February 11, 2004 2:11 PM
> > >Subject: Re: [ntdev] STUCK - NEED HELP
> > >
> > >
> > > > Actually the problem is that I am not getting consistent
>notifications
> > >when i am accessing the same file subsequently. I am able to get
> > >notifications when i open the file from command prompt, but it fails
> > >when i open the file from windows explorer.
> > > >
> > > > My requirement is to get the notification when user opens a file
>or
> > >directory on local or from remote system. Can you please give me some
> > >idea about that?
> > > >
> > > > Thanks
> > > >
> > > > Vivek
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > >From: “Chuck Batson”
> > > > >Reply-To: “Windows System Software Devs Interest List”
> > > > >To: “Windows System Software Devs Interest List”
> > > > >Subject: Re: [ntdev] STUCK - NEED HELP
> > > > >Date: Wed, 11 Feb 2004 12:34:43 +0700
> > > > >
> > > > >Why would that be a problem?
> > > > >
> > > > >Chuck
> > > > >
> > > > >----- Original Message -----
> > > > >From: “cheerful vishwanathan”
> > > > >To: “Windows System Software Devs Interest List”
> > > > >Sent: Wednesday, February 11, 2004 10:25 AM
> > > > >Subject: Re: [ntdev] STUCK - NEED HELP
> > > > >
> > > > >
> > > > > > My application is not holding on to the file handle but the OS
> > >seems
> > > > >to be checking the file in “recent files” directory and picking
>it
> > >from
> > > > >there. At this point i do not know how to handle this.
> > > > > >
> > > > > > Vivek
> > > > > >
> > > > > > >From: “Chuck Batson”
> > > > > > >Reply-To: “Windows System Software Devs Interest List”
> > > > > > >To: “Windows System Software Devs Interest List”
> > > > > > >Subject: Re: [ntdev] STUCK - NEED HELP
> > > > > > >Date: Wed, 11 Feb 2004 02:03:27 +0700
> > > > > > >
> > > > > > >That might suggest that someone, somewhere (perhaps the
> > >application
> > > > >or
> > > > > > >perhaps Windows) is caching a handle to the open file.
> > > > > > >
> > > > > > >Chuck
> > > > > > >
> > > > > > >----- Original Message -----
> > > > > > >From: “cheerful vishwanathan”
> > > > > > >To: “Windows System Software Devs Interest List”
> > > > > > >Sent: Tuesday, February 10, 2004 11:43 PM
> > > > > > >Subject: [ntdev] STUCK - NEED HELP
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > I am double clicking the file from windows explorer(OS is
> > >windows
> > > > >XP),
> > > > > > >and on the subsequent click i am not getting the
>notification.
> > > > > > > >
> > > > > > > > But if i am opening the file from command prompt i am
>getting
> > >the
> > > > > > >notifications properly even on the subsequent open request
>for
> > >the
> > > > >same
> > > > > > >file.
> > > > > > > >
> > > > > > > > Viviek
> > > > > > > >
> > > > > > > > >From: Nick Ryan
> > > > > > > > >Reply-To: “Windows System Software Devs Interest List”
> > > > > > > > >To: “Windows System Software Devs Interest List”
> > > > > > > > >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > > > > > > > >Date: Mon, 09 Feb 2004 23:43:26 -0800
> > > > > > > > >
> > > > > > > > >Are you just ‘clicking’ on the file or are you actually
> > >opening
> > > > >it?
> > > > > > > > >:) I mean, if you’re opening the file again, another
> > > > >IRP_MJ_CREATE
> > > > > > > > >is being sent down, period.
> > > > > > > > >
> > > > > > > > >cheerful vishwanathan wrote:
> > > > > > > > >
> > > > > > > > >>Hi
> > > > > > > > >>
> > > > > > > > >>Thanks for your help.
> > > > > > > > >>
> > > > > > > > >>Now I am getting FILE_OPEN, but there is an issue.
> > > > > > > > >>
> > > > > > > > >>Suppose I have a file a.bmp, on clicking this file i do
>get
> > >the
> > > > > > > > >>notification. But now if i
> > > > > > > > >>
> > > > > > > > >>click the a.bmp again … I do not get the notification.
>But
> > >if
> > > > > > > > >>after clicking a.bmp, now
> > > > > > > > >>
> > > > > > > > >>i click another file suppose c.txt, notification for
>c.txt
> > >will
> > > > > > > > >>come.
> > > > > > > > >>
> > > > > > > > >>The problem is this that if i try to access the same
>file
> > > > > > > > >>subsequently i am not getting the notifications.
> > > > > > > > >>
> > > > > > > > >>Please help me.
> > > > > > > > >>
> > > > > > > > >>Thanks in advance.
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >> >From: Nick Ryan
> > > > > > > > >> >Reply-To: “Windows System Software Devs Interest
>List”
> > > > > > > > >> >To: “Windows System Software Devs Interest List”
> > > > > > > > >> >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
>
> > > > > > > > >> >Date: Mon, 09 Feb 2004 20:51:06 -0800
> > > > > > > > >> >
> > > > > > > > >> >(For future reference, the correct forum for this
> > >question is
> > > > > > > > >> >ntfsd.)
> > > > > > > > >> >
> > > > > > > > >> >Your code is correct, the bug must be somewhere else.
>You
> > >say
> > > > > > > > >>you
> > > > > > > > >> >are simply not seeing any creates for which
>dwOpenOptions
> > >is
> > > > > > > > >> >FILE_OPEN?
> > > > > > > > >> >
> > > > > > > > >> >cheerful vishwanathan wrote:
> > > > > > > > >> >>
> > > > > > > > >> >>I am developing a filter driver for a NT file
>system,
> > >and
> > > > >want
> > > > > > > > >>to
> > > > > > > > >> >>trap FILE OPEN and DIRECTORY OPEN requests.
> > > > > > > > >> >> At present I am trapping IRP_MJ_CREATE for open
> > >request.
> > > > > > > > >> >>and using the following lines of source
> > > > > > > > >> >> DWORD dwOpenOptions =
> > >((pParms->Parameters.Create.Options
> > > > > >>
> > > > > > > > >>24)
> > > > > > > > >> >>& 0xFF);
> > > > > > > > >> >>
> > > > > > > > >> >>DWORD dwUserOptions =
>(pParms->Parameters.Create.Options
> > >&
> > > > > > > > >> >>FILE_VALID_OPTION_FLAGS);
> > > > > > > > >> >>
> > > > > > > > >> >>where dwOpenOptions is the CreateDisposition and
>should
> > >have
> > > > > > > > >>the
> > > > > > > > >> >>value FILE_OPEN in case of file open request.
> > > > > > > > >> >>
> > > > > > > > >> >>It is working fine in case of create i.e
>FILE_CREATE.
> > > > > > > > >> >>
> > > > > > > > >> >>But i am not getting the appropriate value for
> > > > > > > > >>CreateDisposition
> > > > > > > > >> >>(i.e. FILE_OPEN) in case of file open request.
> > > > > > > > >> >>
> > > > > > > > >> >>Actually I am having a service running in background
> > >that
> > > > > > > > >> >>continuously polls the filter driver and it gives me
>the
> > > > > > > > >> >>notification for file/directory create, but not for
> > > > > > > > >>file/directory
> > > > > > > > >> >>open.
> > > > > > > > >> >>
> > > > > > > > >> >>Can anyone tell me how to get notifications from
>driver
> > >for
> > > > > > > > >> >>file/directory open in my service?
> > > > > > > > >> >>
> > > > > > > > >> >>Thanks in Advance.
> > > > > > > > >> >>
> > > > > > > > >> >>
> > > > > > > > >>
> > > > > > > > >>
> > > > > > >
> > > > >
> > >
> >>----------------------------------------------------------------------
> > > > > > >–
> > > > > > > > >> >>Contact brides & grooms FREE! Only on
>www.shaadi.com.
> > > > >Register
> > > > > > > > >>now!
> > > > > > > > >> >>
> > > > > > > > >> >
> > > > > > > > >> >–
> > > > > > > > >> >- Nick Ryan
> > > > > > > > >> >- Microsoft MVP for DDK
> > > > > > > > >> >
> > > > > > > > >> >—
> > > > > > > > >> >Questions? First check the Kernel Driver FAQ at
> > > > > > > > >> >http://www.osronline.com/article.cfm?id=256
> > > > > > > > >> >
> > > > > > > > >> >You are currently subscribed to ntdev as:
> > > > >xxxxx@hotmail.com
> > > > > > > > >> >To unsubscribe send a blank email to
> > > > > > > > >> >xxxxx@lists.osr.com
> > > > > > > > >>
> > > > > > > >
> > > > > > >
> > > > >
> > >
> >>----------------------------------------------------------------------
> > > > > > >–
> > > > > > > > >>Contact brides & grooms FREE! Only on www.shaadi.com.
> > >Register
> > > > >now!
> > > > > > > > >>
> > > > > > > > >
> > > > > > > > >–
> > > > > > > > >- Nick Ryan
> > > > > > > > >- Microsoft MVP for DDK
> > > > > > > > >
> > > > > > > > >—
> > > > > > > > >Questions? First check the Kernel Driver FAQ at
> > > > > > > > >http://www.osronline.com/article.cfm?id=256
> > > > > > > > >
> > > > > > > > >You are currently subscribed to ntdev as:
> > >xxxxx@hotmail.com
> > > > > > > > >To unsubscribe send a blank email to
> > > > > > > > >xxxxx@lists.osr.com
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > >
> > ----------------------------------------------------------------------
> > > > > > >----------
> > > > > > > > Contact brides & grooms FREE! Only on www.shaadi.com.
>Register
> > > > > > >now! —
> > > > > > > > Questions? First check the Kernel Driver FAQ at
> > > > > > >http://www.osronline.com/article.cfm?id=256
> > > > > > > >
> > > > > > > > You are currently subscribed to ntdev as:
> > >xxxxx@cbatson.com
> > > > > > > > To unsubscribe send a blank email to
> > > > >xxxxx@lists.osr.com
> > > > > > >
> > > > > > >
> > > > > > >—
> > > > > > >Questions? First check the Kernel Driver FAQ at
> > > > >http://www.osronline.com/article.cfm?id=256
> > > > > > >
> > > > > > >You are currently subscribed to ntdev as:
>xxxxx@hotmail.com
> > > > > > >To unsubscribe send a blank email to
> > >xxxxx@lists.osr.com
> > > > > >
> > > > > >
> > > > >
> > >
> > ----------------------------------------------------------------------
> > > > >----------
> > > > > > Contact brides & grooms FREE! Only on www.shaadi.com. Register
> > > > >now! —
> > > > > > Questions? First check the Kernel Driver FAQ at
> > > > >http://www.osronline.com/article.cfm?id=256
> > > > > >
> > > > > > You are currently subscribed to ntdev as:
>xxxxx@cbatson.com
> > > > > > To unsubscribe send a blank email to
> > >xxxxx@lists.osr.com
> > > > >
> > > > >
> > > > >—
> > > > >Questions? First check the Kernel Driver FAQ at
> > >http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > > > >To unsubscribe send a blank email to
>xxxxx@lists.osr.com
> > > >
> > > >
> > >
> > ----------------------------------------------------------------------
> > >----------
> > > > Easiest Money Transfer to India. Send Money To 6000 Indian Towns.
> > >Easiest Way To Send Money Home! —
> > > > Questions? First check the Kernel Driver FAQ at
> > >http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: xxxxx@cbatson.com
> > > > To unsubscribe send a blank email to
>xxxxx@lists.osr.com
> > >
> > >
> > >—
> > >Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
> > >
> > >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > >To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> > ----------------------------------------------------------------------
>----------
> > Easiest Money Transfer to India. Send Money To 6000 Indian Towns.
>Easiest Way To Send Money Home! —
> > Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@cbatson.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com


Easiest Money Transfer to India. Send Money To 6000 Indian Towns. Easiest Way To Send Money Home!

it’s entirely possible that explorer is keeping its handle to a.bmp open
until you select a different icon or keeping it open while the window
showing the icon is open so that it doesn’t have to take the cost of
opening the file every time you switch focus to it.

you’re confusing OPEN requests with things you click in the UI. There
is not necessarily a one-to-one correlation. The app will close the
file when it wants to (or it could leak the handle, but we hope it
doesn’t do that).

You do know that explorer hasn’t closed the file - if it had you would
have gotten a CLEANUP and then a second CREATE IRP. That’s about all
you can know as a driver.

-p


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of cheerful
vishwanathan
Sent: Wednesday, February 11, 2004 1:40 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] STUCK - NEED HELP

my requirement is to get the notification when the file or directory is
opened whether it is by double clicking from the windows explorer, or by
opening it from command prompt , or from a program , or from any other
source.

thankx

vivek

From: “Chuck Batson”
Reply-To: “Windows System Software Devs Interest List”
To: “Windows System Software Devs Interest List”
Subject: Re: [ntdev] STUCK - NEED HELP
Date: Wed, 11 Feb 2004 16:28:00 +0700

I don’t see the problem with that. Is your requirement to know when a
file is opened or when a file is double-clicked?

Chuck

----- Original Message -----
From: “cheerful vishwanathan”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, February 11, 2004 4:13 PM
Subject: Re: [ntdev] STUCK - NEED HELP

> but if i am opening the file from command prompt i am getting the
notifications properly.
>
> The only thing is when i access the file from windows explorer i am
not able to get the notifications subsequently. If there are two files
a.bmp and b.bmp, and if double clicks the
>
> a.bmp i get the notification…and now if i again clicks the a.bmp i
do
not get any notification.
>
> I have to click b.bmp and then again a.bmp to get the notification.
>
> Please help
>
> Thanks
>
> Vivek
>
>
>
>
>
>
> >From: “Chuck Batson”
> >Reply-To: “Windows System Software Devs Interest List”
> >To: “Windows System Software Devs Interest List”
> >Subject: Re: [ntdev] STUCK - NEED HELP
> >Date: Wed, 11 Feb 2004 15:43:23 +0700
> >
> >But you ARE getting notification when the file is opened. Just
that
it
> >appears the file handle is being kept open and re-used the next
time
the
> >file is double clicked. Or am I missing something?
> >
> >Chuck
> >
> >----- Original Message -----
> >From: “cheerful vishwanathan”
> >To: “Windows System Software Devs Interest List”
> >Sent: Wednesday, February 11, 2004 2:11 PM
> >Subject: Re: [ntdev] STUCK - NEED HELP
> >
> >
> > > Actually the problem is that I am not getting consistent
notifications
> >when i am accessing the same file subsequently. I am able to get
> >notifications when i open the file from command prompt, but it
fails
> >when i open the file from windows explorer.
> > >
> > > My requirement is to get the notification when user opens a file

or
> >directory on local or from remote system. Can you please give me
some
> >idea about that?
> > >
> > > Thanks
> > >
> > > Vivek
> > >
> > >
> > >
> > >
> > >
> > >
> > > >From: “Chuck Batson”
> > > >Reply-To: “Windows System Software Devs Interest List”
> > > >To: “Windows System Software Devs Interest List”
> > > >Subject: Re: [ntdev] STUCK - NEED HELP
> > > >Date: Wed, 11 Feb 2004 12:34:43 +0700
> > > >
> > > >Why would that be a problem?
> > > >
> > > >Chuck
> > > >
> > > >----- Original Message -----
> > > >From: “cheerful vishwanathan”
> > > >To: “Windows System Software Devs Interest List”
> > > >Sent: Wednesday, February 11, 2004 10:25 AM
> > > >Subject: Re: [ntdev] STUCK - NEED HELP
> > > >
> > > >
> > > > > My application is not holding on to the file handle but the
OS
> >seems
> > > >to be checking the file in “recent files” directory and picking

it
> >from
> > > >there. At this point i do not know how to handle this.
> > > > >
> > > > > Vivek
> > > > >
> > > > > >From: “Chuck Batson”
> > > > > >Reply-To: “Windows System Software Devs Interest List”
> > > > > >To: “Windows System Software Devs Interest List”
> > > > > >Subject: Re: [ntdev] STUCK - NEED HELP
> > > > > >Date: Wed, 11 Feb 2004 02:03:27 +0700
> > > > > >
> > > > > >That might suggest that someone, somewhere (perhaps the
> >application
> > > >or
> > > > > >perhaps Windows) is caching a handle to the open file.
> > > > > >
> > > > > >Chuck
> > > > > >
> > > > > >----- Original Message -----
> > > > > >From: “cheerful vishwanathan”
> > > > > >To: “Windows System Software Devs Interest List”
> > > > > >Sent: Tuesday, February 10, 2004 11:43 PM
> > > > > >Subject: [ntdev] STUCK - NEED HELP
> > > > > >
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > I am double clicking the file from windows explorer(OS
is
> >windows
> > > >XP),
> > > > > >and on the subsequent click i am not getting the
notification.
> > > > > > >
> > > > > > > But if i am opening the file from command prompt i am
getting
> >the
> > > > > >notifications properly even on the subsequent open request
for
> >the
> > > >same
> > > > > >file.
> > > > > > >
> > > > > > > Viviek
> > > > > > >
> > > > > > > >From: Nick Ryan
> > > > > > > >Reply-To: “Windows System Software Devs Interest List”
> > > > > > > >To: “Windows System Software Devs Interest List”
> > > > > > > >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN
> > > > > > > >Date: Mon, 09 Feb 2004 23:43:26 -0800
> > > > > > > >
> > > > > > > >Are you just ‘clicking’ on the file or are you actually

> >opening
> > > >it?
> > > > > > > >:) I mean, if you’re opening the file again, another
> > > >IRP_MJ_CREATE
> > > > > > > >is being sent down, period.
> > > > > > > >
> > > > > > > >cheerful vishwanathan wrote:
> > > > > > > >
> > > > > > > >>Hi
> > > > > > > >>
> > > > > > > >>Thanks for your help.
> > > > > > > >>
> > > > > > > >>Now I am getting FILE_OPEN, but there is an issue.
> > > > > > > >>
> > > > > > > >>Suppose I have a file a.bmp, on clicking this file i
do
get
> >the
> > > > > > > >>notification. But now if i
> > > > > > > >>
> > > > > > > >>click the a.bmp again … I do not get the
notification.
But
> >if
> > > > > > > >>after clicking a.bmp, now
> > > > > > > >>
> > > > > > > >>i click another file suppose c.txt, notification for
c.txt
> >will
> > > > > > > >>come.
> > > > > > > >>
> > > > > > > >>The problem is this that if i try to access the same
file
> > > > > > > >>subsequently i am not getting the notifications.
> > > > > > > >>
> > > > > > > >>Please help me.
> > > > > > > >>
> > > > > > > >>Thanks in advance.
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> >From: Nick Ryan
> > > > > > > >> >Reply-To: “Windows System Software Devs Interest
List”
> > > > > > > >> >To: “Windows System Software Devs Interest List”
> > > > > > > >> >Subject: Re:[ntdev] HELP - Unable to trap FILE_OPEN

> > > > > > > >> >Date: Mon, 09 Feb 2004 20:51:06 -0800
> > > > > > > >> >
> > > > > > > >> >(For future reference, the correct forum for this
> >question is
> > > > > > > >> >ntfsd.)
> > > > > > > >> >
> > > > > > > >> >Your code is correct, the bug must be somewhere
else.
You
> >say
> > > > > > > >>you
> > > > > > > >> >are simply not seeing any creates for which
dwOpenOptions
> >is
> > > > > > > >> >FILE_OPEN?
> > > > > > > >> >
> > > > > > > >> >cheerful vishwanathan wrote:
> > > > > > > >> >>
> > > > > > > >> >>I am developing a filter driver for a NT file
system,
> >and
> > > >want
> > > > > > > >>to
> > > > > > > >> >>trap FILE OPEN and DIRECTORY OPEN requests.
> > > > > > > >> >> At present I am trapping IRP_MJ_CREATE for open
> >request.
> > > > > > > >> >>and using the following lines of source
> > > > > > > >> >> DWORD dwOpenOptions =
> >((pParms->Parameters.Create.Options
> > > > >>
> > > > > > > >>24)
> > > > > > > >> >>& 0xFF);
> > > > > > > >> >>
> > > > > > > >> >>DWORD dwUserOptions =
(pParms->Parameters.Create.Options
> >&
> > > > > > > >> >>FILE_VALID_OPTION_FLAGS);
> > > > > > > >> >>
> > > > > > > >> >>where dwOpenOptions is the CreateDisposition and
should
> >have
> > > > > > > >>the
> > > > > > > >> >>value FILE_OPEN in case of file open request.
> > > > > > > >> >>
> > > > > > > >> >>It is working fine in case of create i.e
FILE_CREATE.
> > > > > > > >> >>
> > > > > > > >> >>But i am not getting the appropriate value for
> > > > > > > >>CreateDisposition
> > > > > > > >> >>(i.e. FILE_OPEN) in case of file open request.
> > > > > > > >> >>
> > > > > > > >> >>Actually I am having a service running in
background
> >that
> > > > > > > >> >>continuously polls the filter driver and it gives
me
the
> > > > > > > >> >>notification for file/directory create, but not
for
> > > > > > > >>file/directory
> > > > > > > >> >>open.
> > > > > > > >> >>
> > > > > > > >> >>Can anyone tell me how to get notifications from
driver
> >for
> > > > > > > >> >>file/directory open in my service?
> > > > > > > >> >>
> > > > > > > >> >>Thanks in Advance.
> > > > > > > >> >>
> > > > > > > >> >>
> > > > > > > >>
> > > > > > > >>
> > > > > >
> > > >
> >

>----------------------------------------------------------------------

> > > > > >–
> > > > > > > >> >>Contact brides & grooms FREE! Only on
www.shaadi.com.
> > > >Register
> > > > > > > >>now!
> > > > > > > >> >>
> > > > > > > >> >
> > > > > > > >> >–
> > > > > > > >> >- Nick Ryan
> > > > > > > >> >- Microsoft MVP for DDK
> > > > > > > >> >
> > > > > > > >> >—
> > > > > > > >> >Questions? First check the Kernel Driver FAQ at
> > > > > > > >> >http://www.osronline.com/article.cfm?id=256
> > > > > > > >> >
> > > > > > > >> >You are currently subscribed to ntdev as:
> > > >xxxxx@hotmail.com
> > > > > > > >> >To unsubscribe send a blank email to
> > > > > > > >> >xxxxx@lists.osr.com
> > > > > > > >>
> > > > > > >
> > > > > >
> > > >
> >

>----------------------------------------------------------------------

> > > > > >–
> > > > > > > >>Contact brides & grooms FREE! Only on www.shaadi.com.
> >Register
> > > >now!
> > > > > > > >>
> > > > > > > >
> > > > > > > >–
> > > > > > > >- Nick Ryan
> > > > > > > >- Microsoft MVP for DDK
> > > > > > > >
> > > > > > > >—
> > > > > > > >Questions? First check the Kernel Driver FAQ at
> > > > > > > >http://www.osronline.com/article.cfm?id=256
> > > > > > > >
> > > > > > > >You are currently subscribed to ntdev as:
> >xxxxx@hotmail.com
> > > > > > > >To unsubscribe send a blank email to
> > > > > > > >xxxxx@lists.osr.com
> > > > > > >
> > > > > > >
> > > > > >
> > > >
> >
>


> > > > > >----------
> > > > > > > Contact brides & grooms FREE! Only on www.shaadi.com.
Register
> > > > > >now! —
> > > > > > > Questions? First check the Kernel Driver FAQ at
> > > > > >http://www.osronline.com/article.cfm?id=256
> > > > > > >
> > > > > > > You are currently subscribed to ntdev as:
> >xxxxx@cbatson.com
> > > > > > > To unsubscribe send a blank email to
> > > >xxxxx@lists.osr.com
> > > > > >
> > > > > >
> > > > > >—
> > > > > >Questions? First check the Kernel Driver FAQ at
> > > >http://www.osronline.com/article.cfm?id=256
> > > > > >
> > > > > >You are currently subscribed to ntdev as:
xxxxx@hotmail.com
> > > > > >To unsubscribe send a blank email to
> >xxxxx@lists.osr.com
> > > > >
> > > > >
> > > >
> >
>


> > > >----------
> > > > > Contact brides & grooms FREE! Only on www.shaadi.com.
Register
> > > >now! —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > >http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > You are currently subscribed to ntdev as:
xxxxx@cbatson.com
> > > > > To unsubscribe send a blank email to
> >xxxxx@lists.osr.com
> > > >
> > > >
> > > >—
> > > >Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> > > >
> > > >You are currently subscribed to ntdev as:
xxxxx@hotmail.com
> > > >To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> > >
> >
>


> >----------
> > > Easiest Money Transfer to India. Send Money To 6000 Indian
Towns.
> >Easiest Way To Send Money Home! —
> > > Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@cbatson.com

> > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> >
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> >To unsubscribe send a blank email to
xxxxx@lists.osr.com
>
>
>



> Easiest Money Transfer to India. Send Money To 6000 Indian Towns.
Easiest Way To Send Money Home! —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cbatson.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@hotmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Easiest Money Transfer to India. Send Money To 6000 Indian Towns.
Easiest Way To Send Money Home! http:

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com</http:>