Skip to main content

 none
is there an easy way to migrate from WDK7 to WDK10 ? (In order to use NonPagedPoolNx type to pass WHQL test ) RRS feed

  • Question

  • Hi all,

    I have a PCIe driver which was developed under WDK 7.1.0.7600 and Visual Studio 2008.
    The driver works perfectly on Windows 7, and I would like to use this driver under Windows 10.

    However, in Windows 10, a hardware driver without WHQL qualification test is not allowed to be executed, and in order to pass the WHQL test, NonPagedPool pool type memory declaration is mandatory to be replaced by NonPagedPoolNx (https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/nx-and-execute-pool-types), while NonPagedPoolNx is only supported in newer version of WDK, so it seems upgrade WDK version from 7 to 10 is the only choice for me(?).

    I have already opened/converted the VS2008 project to VS2017, compiled and executed the driver without any problem.
    Though in VS2017 the build environment is the same as in VS2008, ie, still use NMAKE/ddkbuild and links to WDK 7, below is the property setting for reference

    I had tried to add the include path for WDK 10(C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\km) under "VC++ directories" and "NMAKE", but these setting takes no effect due to the project is build under ddkbuild and those path setting resides in ddkbuild.cmd file(I am not familiar with ddkbuild so not pretty sure about this).

    So, in this case, is there any simple way to migrate WDK 7 to WDK 10 ? The only purpose is to use NonPagedPoolNx pool type memory to pass the WHQL test, any suggestion would be very appreciated, thanks in advance.

    Saturday, September 28, 2019 2:00 PM

All replies

  • There are a couple of ways to do this.

    https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/nx-pool-compatibility-issues


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Sunday, September 29, 2019 2:00 AM
  • Hi Tim,

    I had read this article already, if you are referring to this :

    "If your driver is not intended to run on a version of Windows earlier than Windows 8, replace most or all instances of NonPagedPool with NonPagedPoolNx. Only rarely should the developer replace an instance of NonPagedPool with NonPagedPoolExecute."

    To replace NonPagedPool with NonPagedPoolNx, I have to upgrade WDK version from 7 to 10(to be more specific, NonPagedPoolNx is not supported in the wdm.h of WDK 7), this is why I am asking if there is an easy way to upgrade WDK version, thanks.


    • Edited by Nate.Wang Sunday, September 29, 2019 1:38 PM
    Sunday, September 29, 2019 1:36 PM
  • What if you just borrow the definition of NonPagedPoolNx from WDK 10 and keep building with WDK 7600? Is this simple enough?

    -- pa

    Sunday, September 29, 2019 9:26 PM
  • Hi Pavel,

    Do you mean I can directly replace the "wdm.h" of WDK7600 by the "wdm.h" of WDK 10? Thanks.

    Monday, September 30, 2019 1:03 AM
  • Locate the software/R.click/properties/compatability tab,run in older OS settings...Or with devices,open Device mgr,locate the device/update driver,use the Let Me Locate/search for it in computer,windows will run it.

    Page Pool is simply Virtual Memory/Page File

    https://community.osr.com/search?Search=Page+Pool+NX&=Search

    Also,for Windows OS drivers help  OSR is about as good as it gets,they only develop Windows drivers,Microsoft/WHQL/MSDN works with them,alot

    Monday, September 30, 2019 3:51 AM
  • No, you didn't read the section about the opt-in options.  There's a way to do it.

    https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/single-binary-opt-in-pool-nx-optin


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Monday, September 30, 2019 5:03 AM
  • No, you didn't read the section about the opt-in options.  There's a way to do it.

    https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/single-binary-opt-in-pool-nx-optin


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Hi Tim,

    In WDK 7600, ExInitializeDriverRuntime() does not exist, to enable the opt-in option I have to upgrade WDK to a higher version. I had installed WDK 10 already, but I do not know how to modify the original build environment (from NMAKE/ddkbuild, see my 1st post) to accommodate with WDK 10, hope I am clear enough on describing the problem this time, thanks for your help !

    Monday, September 30, 2019 12:26 PM
  • In WDK 7600, ExInitializeDriverRuntime() does not exist

    Yes but this is an inline function. You can copy the definition. Or, instead of that trickery,  revise the code (unless you have static libraries without source) and manually replace all "NonPagedPool" with a variable, exactly as described in the link in Mr. Roberts' reply. Detect the Windows version in runtime using IoIsWdmVersionAvailable.

    If all this looks too complex, maybe find a contractor to help.

    -- pa


    • Edited by Pavel A Tuesday, October 1, 2019 5:38 PM
    Tuesday, October 1, 2019 5:36 PM
  • The Windows 10 WDK can build drivers down to Windows 7, is there a problem with loading your project from WDK 7 in the Windows 10 WDK and building it? If you didn't want to install Windows 10 WDK you could try the EWDK:

    https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk#enterprise-wdk-for-windows-10-version-1903-ewdk

    Tuesday, October 1, 2019 9:13 PM
    Moderator
  • In WDK 7600, ExInitializeDriverRuntime() does not exist

    Yes but this is an inline function. You can copy the definition. Or, instead of that trickery,  revise the code (unless you have static libraries without source) and manually replace all "NonPagedPool" with a variable, exactly as described in the link in Mr. Roberts' reply. Detect the Windows version in runtime using IoIsWdmVersionAvailable.

    If all this looks too complex, maybe find a contractor to help.

    -- pa


    Hi Pavel,

    I tried to copy the definition of ExInitializeDriverRuntime() but it turns out that I have to replace the wdm.h of WDK7600 to WDK10(?), then I have to include new header files in WDK10 such as winapifamily.h and winpackagefamily.h, then I still got thousands of compile errors after doing this, yes and sorry this is too complex for me.

    The Windows 10 WDK can build drivers down to Windows 7, is there a problem with loading your project from WDK 7 in the Windows 10 WDK and building it?


    Hi Cymon,

    See my original post, I had loaded my project in VS2017 with WDK10 installed, but since the original project is build by the "old way" (ie.ddkbuild.cmd), the build in VS2017 still links to WDK7 not 10. So my question for this post is how to migrate from WDK7 to WDK10 ...

    It seems like there is no simple way(at least to me) to migrate from WDK7 to WDK10, so I decided to create a new project in VS2017+WDK10, then move all my source codes to the new environment, after a few modifications on build environment setting I encountered on a link error, just create a new post at : https://social.msdn.microsoft.com/Forums/ie/en-US/c6f6af6f-8ade-4e75-91ed-f2ccb93bdfab/unresolved-external-symbol-lookuptables-in-ntstrsafelib?forum=wdk

    I would appreciate your kindly help again, thanks.


    <audio id="haloword-audio"></audio>

    • Edited by Nate.Wang Thursday, October 3, 2019 3:02 AM
    Thursday, October 3, 2019 3:01 AM