How to include <windows.h> when doing Windows Driver Development? RRS feed

  • Question

  • I need to use some PE structure when doing Windows Driver Development with VS2019 SDK 10.0.183662.0.  

    The strange thing is that <ntifs.h>has  declaration of a type called "PIMAGE_NT_HEADERS", while the definition of the type is in other header (winnt.h?).

    Now I try to include winnt.h or windows.h, but it can't find it.

    So how to include <windows.h> when doing Windows Driver Development?

    Also, do I have to  include <windows.h> when  doing Windows Driver Development?

    Thursday, August 8, 2019 1:04 AM


  • You cannot include Windows.h in kernel-mode code (i.e. drivers). ntimage.h contains the definitions you're looking for, and may be used in your driver


    Azius Developer Training Windows device driver, internals, security, & forensics training and consulting. Blog at

    Thursday, August 8, 2019 1:23 AM