Open device name using CreateFile Open device name using CreateFile windows windows

Open device name using CreateFile


Here is a good explanation by Tim Robinson, MVP (Windows SDK):

Names of the form \Device\xxx are internal NT object manager names which are inaccessible to Win32. You will only be able to access your device if it creates a symbolic link to \Device\MyDevice from the \??\ directory. Objects in the \??\ kernel directory show up through \\.\ in Win32. Use Winobj in the DDK (or download it from www.sysinternals.com) to check.

NOTE: Nowadays NT namespace root is exposed via GLOBALROOT symbolic link, so any NT path is accessible to Win32 including \Device\xxx: use \\.\GLOBALROOT\Device\xxx. A device symlink is not required in such case.