Device interface existence is the correct way to detect the second device is present. Can the secondary driver be updated to expose a device interface? If not, does the second driver support opening file handles and expose a fixed ("legacy") symbolic link name? If yes, you can try to open the fixed name during initialization and if that fails, maybe poll for it later.
How to check a device existence in Kernel driver?
I am writing a kernel driver. In the driver, I want to check if another device exists. I know its Hardware ID and Instance ID. But that device (driver) does not register a device interface class. So I cannot use IoGetDeviceInterfaces to get a list of enabled device interface instances, because that device does not have interface class GUID.
Is there any other way to check the presence of the device?
Thanks.
2 answers
Sort by: Most helpful
-
-
guliteb 41 Reputation points
2022-06-09T00:14:23.237+00:00 Hi Doron,
Thanks for your comments. Actually I have no ownership on the other device driver. It is inbox wmiacpi driver on which I don't find device interface. BIOS exposes various device under Pnp0c14, I want to check the existence of one device among them. I want to do the check in my driver. Any comments?Thanks.