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/


Can't include <d3dkmdt.h> in a UMDF project (but need D3DKMDT_VIDEO_SIGNAL_STANDARD typedef)

scott_smithscott_smith Member Posts: 51
edited January 12 in NTDEV

Microsoft documentation for the D3DKMDT_VIDEO_SIGNAL_STANDARD type refers to d3dkmdt.h, but including that header directly (at least, in a UMDF project) yields a compiler error message:

1>c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\d3dkmdt.h(20): fatal error C1189: #error:  This header should not be included directly!

Anyone know which header file(s) to include in order to get the definition for this type?


Scott Smith
Windows Developer since 1989

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,760

    Go look at the source file. It can't be included directly, but you can see the list of 7 different include files you can use.

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

  • scott_smithscott_smith Member Posts: 51

    I tried that already, unfortunately:

    #include <d3dkmddi.h>
    //#include <d3dkmddi_pext.h>
    //#include <dxgdmm.h>
    //#include <vidpriv.h>
    //#include <dispmprt.h>
    //#include <dmm_diag.h>
    //#include <d3dkmthk.h>
    
    #include <d3dkmdt.h> // D3DKMDT_VIDEO_SIGNAL_STANDARD
    

    d3dkmddi.h is the include path, but including it prior to d3dkmdt.h yields a compiler error (MDL type undefined):

    1>c:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\d3dkmddi.h(3739): error C2143: syntax error: missing ';' before '*'
    1>c:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\d3dkmddi.h(3739): error C2238: unexpected token(s) preceding ';'
         .
         .
         .
    

    dispmprt.h and d3dkmthk.h are located in C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\km\, which isn't in my (UMDF project) include path. I'm assuming it's not a good idea to include kernel-mode-specific headers in a user-mode driver project...

    The other four don't seem to exist.


    Scott Smith
    Windows Developer since 1989

  • scott_smithscott_smith Member Posts: 51

    Follow Up from Microsoft (as an FYI for anyone reading this later):

    You are correct that you cannot include this file in an indirect display project. The Indirect Display Sample simply adds the hard-coded numerical value of 255 (D3DKMDT_VSS_OTHER) for videoStandard. If you don't want to hard-code the value, the dev team suggested that one approach would be to copy the D3DKMDT_VIDEO_SIGNAL_STANDARD definition to your project.


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