Re: Re: NtCreateFile and STATUS_OBJECT_PATH_NOT_FOUND (0x0000003A)
"Myria" <[email protected]>
| Newsgroups | gmane.linux.ports.xbox.devel |
|---|---|
| Message-ID | <042501c477ef$50d964d0$0200a8c0@missy> |
> 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?? That is a Windows NT thing, not Xbox. In Win32, the CreateFile API call does not directly access the root of the NT namespace - kernel32.dll uses ObDosDevices and translates to NtCreateFile. However, there is a "back door" in this mechanism. \\.\ in Win32 means to open any object that is in \?? aka \DosDevices. There are many symbolic links there, like LPT1, so you can open \\.\LPT1 with CreateFile. The notation \\.\ looks like a UNC path with "yourself" as the computer name, but it isn't the same as putting your computer's name there. GLOBALROOT is a symbolic link to \, the root of the NT namespace. In other words, \??\GLOBALROOT is a symlink to \. This allows you to open any file object in the NT namespace using CreateFile, without having to bypass it and directly call NtCreateFile. (This means that GLOBALROOT is rather useless if you are using NtCreateFile. GLOBALROOT does not exist on Xbox.) The following things can be used to open the CD-ROM in regular NT using CreateFile (not NtCreateFile): \\.\D: (open local drive letter D:, which is a symlink to the drive) \\.\CdRom0 (open symlink; there are CdRom0, etc. symlinks inside \??) \\.\GLOBALROOT\Device\CdRom0 (access CD-ROM from its native NT path) > Again, many thanks for the detailed explanations. It makes so much more > sense now... You're welcome =^_^= Melissa ------------------------------------------------------- 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