Why NT crashes out of my module?

Hi All

I am writing sort of a redirector. So far I implemented a few IRP major functions like create, query file info, query volume info, cleanup & close.

However I encountered a lot of crashes of NT out of the code I wrote in other NT modules. I know the problems were ultimately caused by my driver. The question is how could NT crashes long after any of my dispatch functions were called. To simplyfy my life for now, I totally disable caching in the driver. And I don’t want any virtual memory support at all.

I assume I can safely delete the FCB field for a file object after IRP_MJ_CLOSE is called. Am I right?

For a network redirector, in addition to IO Manager, Cache Manager and Virtual Memory Manager, what other NT components could also reference the redirector? Are there other HIDDEN interfaces must be implemented besides the IRP_MJ_* distpatch functions?

Any suggesions will be appreciated very much.

Lijun


Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

> The

question is how could NT crashes long after any of
my dispatch functions were called.

Your code corrupted some piece of memory that caused
some other piece of code in another driver to attempt
an illegal operation. Maybe you overwrote a data
structure or screwed up a reference count.

Be sure you’re using the Driver Verifier, it will help
catch these sorts of bugs sooner. In the worst case,
you can also use the old tried-and-true mechanism of
successively commenting out or disabling portions of
your code till the problem goes away. When it does,
then you know the last piece of code you disabled
contained the bug. :slight_smile:

=====

  • Nicholas Ryan

Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com