From: SMTP%"Scott.Johnson@seagatesoftware.com" 22-SEP-1997 20:32:36.60 To: "'ntfsd@atria.com'" CC: Subj: RE: NTFSD: How can I get a complette path in CREATE ? Return-Path: owner-ntfsd@atria.com Received: by arisia.gce.com (UCX V4.1-12C, OpenVMS V7.1 VAX); Mon, 22 Sep 1997 20:31:03 -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 UAA21251 for ; Mon, 22 Sep 1997 20:03:39 -0400 (EDT) Received: by gw.atria.com id Mon, 22 Sep 1997 16:36:43 -0400 Received: from lmoxch03.smg.seagatesoftware.com by gw.atria.com id Mon, 22 Sep 1997 16:36:41 -0400 Received: by lmoxch03.smg.seagatesoftware.com with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.993.5) id <01BCC775.94AE1930@lmoxch03.smg.seagatesoftware.com>; Mon, 22 Sep 1997 16:35:47 -0400 Message-ID: From: Scott Johnson To: "'ntfsd@atria.com'" Subject: RE: NTFSD: How can I get a complette path in CREATE ? Date: Mon, 22 Sep 1997 16:39:36 -0400 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 Inaki, You can do something like this from your CreateHandler: // // Network drives are NOT associated with a volume parameter block (Vpb), but // device objects representing local drives DO contain a Vpb. // if (irpSp->FileObject->DeviceObject->Vpb != NULL) { pDevObject = irpSp->FileObject->DeviceObject->Vpb->RealDevice; } else { pDevObject = irpSp->FileObject->DeviceObject; } // // Determine the object name of the device to which the file // open is destined. // // Note: The device object pointer was instantiated earlier when a // check was made for a Vpb. // // status = ObQueryNameString( pDevObject, nameInfo, BUFFER_SIZE, &size ); >---------- >From: Inaki Castillo[SMTP:omega24@kender.es] >Sent: Monday, September 22, 1997 11:00 AM >To: 'ntfsd@atria.com' >Subject: NTFSD: How can I get a complette path in CREATE ? > >I'm waiting in the CREATE function to open the filename that comes in >FileObject. To get the complete path sometimes I add the part that comes in >RelatedFileObject. > >With the path compossed this way I have finally a path that looks as follows: > > /WINNT/SYSTEM32/DRIVERS/KERNL32.DLL > >If I pass this path to ZWCreateFile I get the error: > > C000003A: PATH_NOT_FOUND > >I think this happens because no driver information is in the path. > >How can I get the complete path ? >Where can I find the drive related to the path? > > >P.S: > >I've noticed also that if I wait on the Completion Routine, instead of stay >in the CREATE hook, I'm able to call the function ObQueryNameString and get >an absolute path as the following: > > Harddisk1/Partition1/WINNT/SYSTEM32/DRIVERS/KERNL32.DLL > >If I use this path I can open the file using ZWCreateFile without problems. >The function ObQueryNameString doesnt work in the CREATE hook. > > > > > > > > > > >