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

Sept/Oct 2019 Issue of The NT Insider available


Download PDF here: http://insider.osr.com/2019/ntinsider_2019_01.pdf

It’s a particularly BIG issue, too: 40 pages of technical goodness, ranging from WDF to Minifilters. Check it out.
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Writing driver for window 8.1 using vs2017

Johnn_maJohnn_ma Member Posts: 2

Hi,
I am trying to develop software driver that should run on win 8.1 onward. I am using vs2017 wdk 10.
With target version windows10(toolset WindowsKernelModeDriver10), its working alright. I want it to run also on windows 8.1. If I change the target version to windows 8.1 by editing project file, solution is not compiling.
I am new to this area and bit confused here about wdk version requirement. Any guidance would be really helpful.

Thanks,

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,102

    What's not compiling? What errors do you get? I tend to edit the project files by hand, but have you tried changing the setting within the IDE?

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

  • Johnn_maJohnn_ma Member Posts: 2

    I tried to modify project file manually. Windows8.1
    I don't see this can be changed using vs2017 project property.
    On compiling the project, I see
    ------ Rebuild All started: Project: MyDriver1, Configuration: Debug x64 ------
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Redirect.12.props(51,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.cpp.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
    Done building project "MyDriver1.vcxproj" -- FAILED.

    I see same error when I change platform tool set to WindowsKernelModeDriver8.1

    Same project is compiling with target version windows10 and tool set WindowsKernelModeDriver10.0

    Is there a way to target driver to windows 8.1 using vs2017? if not what i need to do make it work on windows 8.1?

    Any guidance would be really helpful.

    thanks,

  • NtDev_GeekNtDev_Geek Member - All Emails Posts: 109

    share or paste your vcxproj file here.

  • Eric_WittmayerEric_Wittmayer Member Posts: 23

    In VS2015, you can change the "Target OS Version" in the Driver Settings section of the config properties.
    For me the "Platform Toolset" in the General section is set to WindowsKernelModeDriver10.0 and my "Target OS Version" is set to Windows 7
    I haven't been "brave" enough to try updating to a newer version of VS for driver building.

  • Martin_DrábMartin_Dráb Member - All Emails Posts: 66

    Hello,

    I haven't been "brave" enough to try updating to a newer version of VS for driver building.

    Regarding these settings, Visual Studio 2017 changes nothing, so you need not to worry. Actually, I am way happier with 2017 than 2015 which, to my experience, was susceptible to various strange problems.

    Martin Dráb

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,443

    VS 2017 is nice and stable, and far better than 2015.

    VS 2019 is, in a word, terrible. And the WDK that goes with it is a mess. Super unstable and inconsistent. Stay away.

    Peter Viscarola
    OSR
    @OSRDrivers

  • Mauro_LeggieriMauro_Leggieri Member Posts: 82
    edited October 15

    As a hack hack, I use EDITBIN.EXE /subsystem:native,5.01 /version:5.1 driver.sys (5.02 and 5.2 for x64) to make the driver compatible with XP+ while compiling with latest WDK10 as a post-build operation.

    At least, for now, if you take care of APIs you use (dynamic loading or correct versioning), there is no incompatibility issues.

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
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE