Boost logo

Boost Users :

Subject: Re: [Boost-users] list all drives
From: John Dlugosz (JDlugosz_at_[hidden])
Date: 2010-07-12 15:31:40

> Windows (AFAIK) does not - all the devices/drives are separate.
> -- Marshall

Since you mentioned "AFAIK", I thought I'd fill in some more details.

The Win32 API has separate roots, using letters and @.
The underlying "native" OS uses a common root for named OS objects that includes files and many other things. The Win32 function you call takes care of qualifying names that are relative to a current directory and/or drive, and also takes care of drive letters, turning it into a full Native name. The drive letters are named symbolic links in a known place which seems to vary with Windows versions. In XP-64-bit, I see "\GLOBAL??" containing "A:" as a link to "\Device\Floppy0", etc. The "\Device" stuff is not accessible to Win32, but to drivers. It is like the Unix device directory, except it doesn't make it look like files in a file system. It's a tree of heterogeneous objects.

Now, you can bypass the parsing done by Win32 and use a file name like "\\?\D:\foo\bar.txt". In other words, you _can_ start directly at the place where devices are specified. This same syntax is used for UNC names in the form "\\Server\share\...", so you can treat everything as a single root in windows where that root is "\\" and the local machine is "?\". This lets you specify devices with GUIDs as well as their assigned drive letters.


TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at