From: Jamey Kirby [jkirby@storagecraft.com] Sent: Wednesday, August 04, 1999 12:22 PM To: Chris Cant; ntdev@atria.com Subject: RE: [ntdev] Writing Windows WDM Device Drivers You are correct in your "better safe than sorry" attitude, but I have found it very important to know the difference. For example, if you use kernel worker threads (work queue items), yuo can assume that your file handle is valid no matter what worker thread happens to be processing the request (because they are all in the system process). It is also possible to create system threads in a process context other than the system process. This is useful if youhave a driver that needs to access network resources (i.e. a file). My creating the system thread in the context of a process that has the appropriate access rights, the thread will be able to access the resources. Jamey Kirby StoragteCraft -----Original Message----- From: Chris Cant [mailto:chris@phdcc.com] Sent: Wednesday, August 04, 1999 4:34 AM To: jkirby@storagecraft.com; ntdev@atria.com Subject: RE: [ntdev] Writing Windows WDM Device Drivers James Kirby Thanks for pointing out this potentially important error. File and object handles are process specific. In a brief search through the latest W2000 DDK I only found one specific reference to this, in ZwClose. However "Inside Windows NT, SE" makes it very clear that object handles are process specific, so I should have got it right. I suppose that assuming that such handles are thread specific is safer than process specific. I have updated my book's errata page with this information. Chris Cant >What did distrub me was your discussion on system threads. Every one who >discusses system threads makes the same asssertion (incorrectly). >file/object handles are NOT thread context dependent, they are process >context dependent. I have read this on this group, in Dekker's book and now >in your book and you all get it wrong. Why? > >If I create 2 system threads, I can access a handle across those threads as >long as they are in the same process context (system process or whatever). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ To unsubscribe, send email to ntdev-request@atria.com with body UNSUBSCRIBE (the subject is ignored). ]