From: SMTP%"davidg@balder.com" 16-OCT-1997 21:29:37.30 To: "'Eliyas Yakub'" , "'ahaslam@ihug.co.nz'" , "'NTFSD'" , "'NTDEV'" CC: Subj: RE: Completion routine gets passed NULL device ptr Return-Path: owner-ntfsd@atria.com Received: by arisia.gce.com (UCX V4.1-12C, OpenVMS V7.1 VAX); Thu, 16 Oct 1997 21:28:07 -0400 Received: from gw.atria.com (gw.atria.com [192.88.237.2]) by bort.mv.net (8.8.5/mem-951016) with SMTP id VAA28630 for ; Thu, 16 Oct 1997 21:03:18 -0400 (EDT) Received: by gw.atria.com id Thu, 16 Oct 1997 18:31:58 -0400 Received: from ns.compumedia.com by gw.atria.com id Thu, 16 Oct 1997 18:31:53 -0400 Received: by ns.compumedia.com with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.993.5) id <01BCDA48.0E33AF60@ns.compumedia.com>; Thu, 16 Oct 1997 15:27:47 -0700 Message-ID: From: "David Goebel (Balder Technology Group, Inc.)" To: "'Eliyas Yakub'" , "'ahaslam@ihug.co.nz'" , "'NTFSD'" , "'NTDEV'" Subject: RE: Completion routine gets passed NULL device ptr Date: Thu, 16 Oct 1997 15:27:44 -0700 X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.993.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: owner-ntfsd@atria.com Precedence: bulk I do regrettably stand corrected here, the DeviceObject passed to your completion routine is the next higher location's DeviceObject, not yours, and therefore NULL if you're top level. When I wrote fastfat.sys I had no need for this parameter as all my required context was passed via the context parameter. I do stand by watchpoints as a particularly useful tool though to find somebody who actually does stomp on your memory. David PS: changing ISPs tonight (what timing...), so please try again in a day or so if you have trouble sending email. >-----Original Message----- >From: Eliyas Yakub [SMTP:eliyasy@microsoft.com] >Sent: Thursday, October 16, 1997 10:44 AM >To: David Goebel (Balder Technology Group, Inc.); 'ahaslam@ihug.co.nz'; >'NTFSD'; 'NTDEV' >Subject: RE: Completion routine gets passed NULL device ptr > >Yes it is possible to get a NULL deviceobject pointer in your completion >routine in cases where you allocate an IRP and don't have a stack >location for yourself. Before calling your completion routine IO manager >checks to see if the CurrentStackLoaction is beyond the StackCount and >if that is true it passes a NULL instead of deviceobject. > >Eliyas > >> -----Original Message----- >> From: David Goebel (Balder Technology Group, Inc.) >> [SMTP:davidg@Balder.com] >> Sent: Wednesday, October 15, 1997 5:54 PM >> To: 'ahaslam@ihug.co.nz'; 'NTFSD'; 'NTDEV' >> Subject: RE: Completion routine gets passed NULL device ptr >> >> IoCallDriver() fills this in the stack location from its input >> parameter >> (and it crashes if passed a NULL), which in turn is used as the >> parameter to your completion routine, so it should be in there. >> >> If this is reproducable your solution is trivial, just verify the >> value >> is there when your dispatch routine is invoked, set a write watchpoint >> on the Irp stack location containing the device object, hit go and >> wait >> to catch red handed whoever is zeroing the field (always fun). >> >> David >> >-----Original Message----- >> >From: Drew Haslam [SMTP:ahaslam@ihug.co.nz] >> >Sent: Thursday, October 16, 1997 4:37 AM >> >To: 'NTFSD'; 'NTDEV' >> >Subject: Completion routine gets passed NULL device ptr >> > >> >Any reasons why a Driver Completion routine would get passed a NULL >> device >> >pointer? >> > >> >The context argument looks fine. >> > >> >Drew Haslam >> > >> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> >[ To unsubscribe, send email to ntfsd-request@atria.com with body >> >UNSUBSCRIBE (the subject is ignored). ] >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> [ To unsubscribe, send email to ntdev-request@atria.com with body >> UNSUBSCRIBE (the subject is ignored). ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ To unsubscribe, send email to ntfsd-request@atria.com with body UNSUBSCRIBE (the subject is ignored). ]