I have posted this problem before, but due to being diverted onto other work, the boards will not let me add to the thread, as it is too old.
So here is the problem:
I have an upper filter attached to the video device stack (GUID {4D36E968-E325-11CE-BFC1-08002BE10318}). I want to be able to talk to this filter driver. I therefore call IoRegisterDeviceInterface in my AddDevice routine, giving a unique GUID and then call IoSetDeviceInterfaceState to enable the interface.
However when I try and access the interface from my application it fails. I use the SetupDi routines to enumerate the interfaces and get the elaborate name for the interface. This name contains the device name for the video and the GUID for my interface. When I call CreateFile(Device_Name, FILE_ANY_ACCESS, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL) I get an invalid file handle. GetLastError gives 0x5 (ACCESS DENIED).
From responses to my previous request I sumise that parts of the video stack have been allocated exclusively by the GDI system. I thought that the system would allow access to my private interface though.
So my question is “How can I talk to my filter driver from an application?”. I am relatively new to device driver writing, so it is entirely possible I am making a stupid mistake.
Many thanks in advance.