c++ - GetFileAttributes inconsistency -- why? -
c++ - GetFileAttributes inconsistency -- why? -
why following:
getfileattributes(l"d:");
return 0x00002010
, next on exact same machine:
getfileattributes(l"\\\\?\\d:");
returns invalid_file_attributes
, error code error_invalid_parameter
?
the 3 examples give in question , comments refer different things.
\\?\d:
refers volume, file attributes not exist. \\?\d:\
root directory of drive have attributes. d:
little harder define. believe scheme uses getfullpathname
, or equivalent, expand path. so, if process current directory on d
, directory used. or, if special per-drive working directory environment variable defined drive, directory used. otherwise d:\
, root directory used. you want using d:\
or \\?\d:\
here.
c++ winapi ntfs
Comments
Post a Comment