Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

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

scott_smithscott_smith Member Posts: 75

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?


Scott Smith
Windows Developer since 1989

Comments

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,584

    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.

    d
  • scott_smithscott_smith Member Posts: 75

    Awesome! Thanks!


    Scott Smith
    Windows Developer since 1989

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Developing Minifilters 24 May 2021 Live, Online
Writing WDF Drivers 14 June 2021 Live, Online
Internals & Software Drivers 2 August 2021 Live, Online
Kernel Debugging 27 Sept 2021 Live, Online