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


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:

Before Posting...

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

Can an IOCTL be sent to a driver before it finished its DriverEntry?

henrik_meidahenrik_meida Member Posts: 76

Hey everyone,

Lets say i create a device object in my driverEntry and do some other stuff in it in the meantime before returning from DriverEntry.

Can an ICOTL be sent successfully to me and my dispatch function get called before my DriverEntry is returned?


  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 8,663

    Nope. Not until the DO_DEVICE_INITIALIZING bit is cleared in the Device Object flags field.


    Peter Viscarola

  • henrik_meidahenrik_meida Member Posts: 76

    @Peter_Viscarola_(OSR) said:
    Nope. Not until the DO_DEVICE_INITIALIZING bit is cleared in the Device Object flags field.


    So basically if i don't clear the DO_DEVICE_INITIALIZING bit after i created the device object with IoCreateDevice in my DriverEntry, user mode apps cannot open handle to my device object and send IOCTLs until DriverEntry is returned, and only then after the I/O manager clears this bit itself, they can open the handle to the device object, did i get this right?

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,641
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

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!
Internals & Software Drivers 15 November 2021 Live, Online
Writing WDF Drivers TBD Live, Online
Developing Minifilters 7 February 2022 Live, Online
Kernel Debugging 21 March 2022 Live, Online