Problem in "Openning Driver File"
-
Hi all, I have created a device independent driver. For which i want a application launcher. My drivers name is "TestIOCTL" and its symbollic link is "\Device\TestIOCTL ". I now want to open this driver file for which i have used the following code segment. hDevice = CreateFile ("\\DosDevices\\TestIOCTL", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); The hDevice returns 3 thro GetError() Method meaning File not found. Can anyone tell me how to open this driver file. Thanks In advance. Regards Kenny.
-
Hi all, I have created a device independent driver. For which i want a application launcher. My drivers name is "TestIOCTL" and its symbollic link is "\Device\TestIOCTL ". I now want to open this driver file for which i have used the following code segment. hDevice = CreateFile ("\\DosDevices\\TestIOCTL", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); The hDevice returns 3 thro GetError() Method meaning File not found. Can anyone tell me how to open this driver file. Thanks In advance. Regards Kenny.
-
Hi all, I have created a device independent driver. For which i want a application launcher. My drivers name is "TestIOCTL" and its symbollic link is "\Device\TestIOCTL ". I now want to open this driver file for which i have used the following code segment. hDevice = CreateFile ("\\DosDevices\\TestIOCTL", 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); The hDevice returns 3 thro GetError() Method meaning File not found. Can anyone tell me how to open this driver file. Thanks In advance. Regards Kenny.
DosDevices
was the name of the user-mode-accessible namespace in NT4. In later versions of the OS this changed. From user-mode, replace\DosDevices
with\\.
. In C or C++ you will have to escape the backslashes, so use"\\\\.\\TestIOCTL"
. Source[^].Stability. What an interesting concept. -- Chris Maunder