From - Wed Oct 01 10:41:48 1997 Path: news.mitre.org!blanket.mitre.org!agate!newsfeed.kornet.nm.kr!xfer.kren.nm.kr!su-news-hub1.bbnplanet.com!news.bbnplanet.com!news1.digital.com!pa.dec.com!nntpd2.cxo.dec.com!wasser From: wasser@jamin.enet.dec.com (John Wasser) Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Subject: Re: ZwCreateFile problem Date: Wed, 01 Oct 1997 09:27:31 -0400 Organization: Digital Equipment Corporation Lines: 31 Message-ID: References: <343183e8.63879473@news.connectnet.com> NNTP-Posting-Host: blank.lkg.dec.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Yet Another NewsWatcher 2.4.0 vasquezj@getntds.com wrote: > I followed the sample program Zwcreate.c in the DDK and was able to > open a file located in "\\SystemRoot\\System32\\Drivers\\" > However, if a copy the file into the root dir or any other directory, > I get an error form Zwcreate (STATUS_OBJECT_NOT_FOUND). ZwCreateFile() uses file paths in the kernel name space (like \Device\Drive1\Partition1\) and not in the Win32 name space. I guess that the root of the kernel name space has an alias names SystemRoot that points to the WinNT directory. You can get to Win32 named drives with: "\??\D:\directory\file.ext" The "\??\" has replaced "\DosDevices\" as the prefix before a drive letter because if allows the Win32 subsystem to easily translate from "\\?\" (meaning "current machine") to the kernel alias "\??\" which points to the \DosDevices directory. I learned about NT Kernel stuff by taking a class from Open Systems Research (OSR). ----------------------------------------------------------------- John A. Wasser, PATHWORKS Engineering, Digital Equipment Corp. Mailstop LKG2-1/T01, 550 King Street, Littleton MA, USA 01460 Email: (Work) wasser@jamin.enet.dec.com (Other) wasser@tiac.net Home Page: http://www.tiac.net/users/wasser/index.html "I work on IBM-PC clones but I use Macintoshes."