I am working on a simple device driver I want to comunicate with the driver from user-mode using IRP.
I am having trouble opening the device driver. Using DeviceTree I am able to see the device name eg \Device\MyDevice.
But when I try to open it like this :
hand := CreateFile('\Device\MyDevice', GENERIC_WRITE, 0, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
I always get INVALID_HANDLE_VALUE
and GetLastError is (The System cannot find the path specified)
What I am doing wrong ? I know the driver works because I can see it running and printing stuff in DebugView. So any tips ?