windows - When to use \\.\c: and when to use c:? -
if symbolic link created device1 \\??\device
(kernel),when accessing it,should \\.\device
(user space),why?
the symbolic c:
should \\.\c:
,why \\.
can omitted?
windows supports 2 forms of file names. there files names follow windows naming convention (:\) , don't (\device\harddisk0\partition5...). "\\.\" prefix applied files don't fit within windows naming convention.
internally windows supports object namespace names originate @ same root object. win32 api convert between windows naming convention , internal naming convention when can.
however if need access file name not meet internal naming convention, can use "\\.\" prefix bypass name conversion logic.
note drive letters not match windows naming convention (they don't have \ after drive letter) need use \\.\ form open drive.
there's bunch of scaffolding make work, can see of winobj tool. in particular notice global??\ namespace - note global??\c: symbolic link maps c drive.
Comments
Post a Comment