Re: NtCreateFile and STATUS_OBJECT_PATH_NOT_FOUND (0x0000003A)

"Craig Edwards" <[email protected]>
Newsgroups gmane.linux.ports.xbox.devel
Organization H.A. Enterprises Pty Ltd
Message-ID <[email protected]>
On Sun, 1 Aug 2004 00:33:17 -0700, Myria <[email protected]>  
wrote:
> The constant is known by M$ as ObDosDevices (from NT DDK stuff), but 
> since you probably don't have that definition, use#define ObDosDevices  
> ((HANDLE) 0xFFFFFFFD).

Ahhh, the penny drops!  I saw this when I was reading through the xbeboot  
headers, but googling didn't give me any more info about what it meant -  
thanks for the explanation.

> The RootDirectory member of the OBJECT_ATTRIBUTES structure given to
> NtCreateFile is the handle to the directory inside which you want to  
> open a file.  Normally you use NULL for this parameter - NULL meansstart  
> at the root.  However, if you use ObDosDevices for this parameter 
> instead, you will already be inside \??, so you could pass C:\BLAH.TXT 
> directly as the filename, which might motivate you to create symbolic 
> links for this purpose.

Neato.  That should cover the fully qualified DOS-style paths.  I just  
need to make sure I handle filenames without the qualifying drive letter  
and those that depend on the notion of current partition/directory (eg.  
"\xxx\blah.txt" and "blah.txt").  I might see if I can determine which  
partition/directory my XBE was launched from, and then set the current  
partition/directory based on that.  Otherwise, I will just default it to  
C:\ or D:\ (or something).

If I can impose further with one more question - I have noticed that, in  
addition to "\Device\CdRom0", the cdrom can be referenced as  
"\\.\GLOBALROOT\Device\CdRom0".  I am a bit confused as to the nature of  
GLOBALROOT.  Is there any significance to the GLOBALROOT identifier, and  
are there any other devices that hang off it that I need to worry about??

Again, many thanks for the detailed explanations.  It makes so much more  
sense now...

--
Craig Edwards


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.