Create a custom app API/Interface for controlling UMDF (IddCx) driver?

I want to add a fairly straightforward interface/API to my UMDF (IddCx) display driver for use by apps. Something like this…:

int     GetConnectorCount();
bool    IsMonitorConnected(int connectorIndex);
HRESULT ConnectMonitor(int connectorIndex);
HRESULT DisconnectMonitor(int connectorIndex);

No need to read or write a data stream; just a few simple functions to query and manage state.

I’ve been looking for examples of this in the Windows Driver Samples, but all I’ve found are examples where IOCTLs are intercepted.

  • I can’t recall whether there was an issue with intercepting IOCTLs in an IddCx driver
  • I thought I saw something about creating a COM interface at some point, but I can’t find any examples

Can anyone help clarify what my options are, and maybe point to an example or some documentation?

You should not create an externally activatable COM interface in a UMDF driver (v1 or 2). The IddCx sample and docs do not talk about normal IO in an IddCx client driver. It should be a simple experiment in your AddDevice routine:

  1. create a device interface
  2. create a WDFQUEUE to handle IOCTLs

and in your app, enumerate the device interface, open it, and try to send an IOCTL and see if it shows up in your driver.

1 Like

Awesome! Thanks!