views:

73

answers:

2

Hello,

Is there a simple way to tell if a given path lives on a mapped network drive? Or to tell if a given drive is a mapped network drive?

I hoped they would have a reparse point attribute but GetFileAttributes() returns nothing but a directory flag.

A: 

Did you try GetFileAttributesEx() with GetFileExMaxInfoLevel ?

kriss
MSDN still only documents `GetFileExInfoStandard` for `WIN32_FILE_ATTRIBUTE_DATA`. `GetFileExMaxInfoLevel` is just an artificial value, all valid values being smaller than that.
peterchen
+3  A: 

GetDriveType is one option.

Luke
Good, I missed this function. Suprisingly, it works with any kind of path and not only with the mount point root directory. Thanks!
pmezard