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

Home NTDEV
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

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/


Getting display event notification in kmdf mode driver

aadit0402aadit0402 Member Posts: 3
I am trying to retrieve the display event notification, for that I am using IoRegisterPlugPlayNotification and I am registering this event GUID_DISPLAY_DEVICE_ARRIVAL. So during the device hardware preparation, I am registering this. And the callback is defined is global scope and during release hardware, I am un-registering this.

Using this approach, I am able to see the display event notification but only during restart that is s0 state. It was expected to notify the display device arrival and removal in hibernate case also.

I did some changes and instead of registering the event in prepare hardware, we did registration in self managed io initialization and unregistered the same in self managed io suspend. After this change, I am able to see the display event notification in hibernate case also, with delay.

I have tried using GUID_CONSOLE_DISPLAY_STATE for monitor off and on status retrieval.

I am still not sure which guid I should use for display event notification. Any leads will be highly appreciated.

Thanks,
Aditya

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,627

    You will, of course, not get any notifications during hibernation, because the power is off. You should get a notification when the machine comes out of hibernation if the state is different than when it went under. If you plug and then unplug, you won't get any notification, because no one was awake to know that.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

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!
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Internals & Software Drivers 25 Jan 2021 LIVE ONLINE
Developing Minifilters 8 March 2021 LIVE ONLINE