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

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

Cannot properly include wdm header files, etc. using a KMDF driver toaster template

greengreen Member Posts: 1

Hello,

When I have used the KMDF toaster sample bus driver along with the co-installer project, including wdm.h in the driver source code causes such identifiers as DRIVER_ADD_DEVICE and DRIVER_STARTIO to be undefined, along with many other identifiers. The same code compiled successfully on VS 2015 on a separate computer prior to installing VS 2017 Professional on a new Windows 10 system. I have checked and it appears wdm.h is included in the system directory under the Visual Studio installation includes directory, however the directory relevant to WDM does not seem to be included in the VS (global or item) macro path variables with the VS installation. Additionally, this code uses the stdarg.h and stdio.h headers. I would need to be able to develop the kernel driver code under WDM using a KMDF sample. Once the project is loaded with VS 2017, the external dependencies directory contents include header files that are only relevant to wdf.

Regards,
Earl

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 12,715
    via Email
    green wrote:
    > When I have used the KMDF toaster sample bus driver along with the co-installer project, including wdm.h in the driver source code causes such identifiers as DRIVER_ADD_DEVICE and DRIVER_STARTIO to be undefined, along with many other identifiers.

    That doesn't make sense.  DRIVER_ADD_DEVICE is in wdm.h.


    > I have checked and it appears wdm.h is included in the system directory under the Visual Studio installation includes directory,

    Which directory, exactly?  Between VS and the SDK and the WDK, there are
    many, many directories involved.


    > however the directory relevant to WDM does not seem to be included in the VS (global or item) macro path variables with the VS installation.

    Right.  The WDK is not included with Visual Studio.  It is a separate
    installation.  Further, you have to fetch a version that matches your VS
    version, and install it after VS so that the include paths can be
    updated.  VS 2017 requires WDK 1809.  Did you install the 1809 WDK after
    VS2017?


    > Additionally, this code uses the stdarg.h and stdio.h headers. I would need to be able to develop the kernel driver code under WDM using a KMDF sample. Once the project is loaded with VS 2017, the external dependencies directory contents include header files that are only relevant to wdf.

    There are kernel-appropriate versions of and in the
    WDK.

    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!