help on FSContext, - explorer hanged

Hello,

I’m writing a filter, and using the FileObject’s FScontext to save my context block,

Before call lower driver, just put the original FScontext back to the FileObject ,

pContext = FileObject->FSContext;
FileObject->FSContext = pContext->SaveFSContext;
IoCallDriver

and after return from the lower driver, insert my own context block back ,
pContext->SaveFsContext = FileObject->FsContext ;
FileObject->FsContext = pContext;

this way seems fine for some test routines using Win32 apis, but if using the explore
to move the focus on the encrypted file, the explorer will hang.

Does anyone know what’s wrong in my filter?

Thanks in advanced.

  • sxw

You can’t do that. The FileObject is SHARED and used by other kernel
components. Instead use a lookaside table that use the FScontext as a key to
find your private context.

-----Original Message-----
From: Xinwei Sun [mailto:xxxxx@yahoo.com]
Sent: Thursday, May 22, 2003 10:31 AM
To: NT Developers Interest List
Subject: [ntdev] help on FSContext, - explorer hanged

Hello,

I’m writing a filter, and using the FileObject’s FScontext to save my
context block,

Before call lower driver, just put the original FScontext back to the
FileObject ,

pContext = FileObject->FSContext;
FileObject->FSContext = pContext->SaveFSContext;
IoCallDriver

and after return from the lower driver, insert my own context block back ,
pContext->SaveFsContext = FileObject->FsContext ;
FileObject->FsContext = pContext;

this way seems fine for some test routines using Win32 apis, but if using
the explore
to move the focus on the encrypted file, the explorer will hang.

Does anyone know what’s wrong in my filter?

Thanks in advanced.

  • sxw

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