Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
 Building “old” Windows drivers (XP, Vista, 2003
and 2008) with Visual Studio 2013
Dmitry Fleytman, dmitry@daynix.com
Yan ...
Daynix Computing LTD
Agenda
Motivation
XPVistaServer 2003Server 2008 WDM driver step by
step configuration
And don’t forget...
Daynix Computing LTD
Motivation
Maintain single code base for variety of Windows OSes
Build XP and Vista drivers with Visu...
Daynix Computing LTD
What are the basic steps?
Use VS2013 compiler
Compile XP and Vista drivers using legacy DDK for
inclu...
Daynix Computing LTD
Create configuration
Create
configuration for
desired OS and
platform by
copying existing
configuration ...
Daynix Computing LTD
Adjust includes and libraries paths
Include directories (when using Win7 DDK):
C:WinDDK7600.16385.1in...
Daynix Computing LTD
Adjust libraries path
7
XP 32bit C:WinDDK7600.16385.1libwxpi386
Windows Server
32 bit
C:WinDDK7600.16...
Daynix Computing LTD
Adjust preprocessor
definitions
Use the following link to set correct versions according to the
target...
Daynix Computing LTD
Adjust linker settings (1)
Adjust “Additional
Library Directories” to
point to legacy DDK
directory a...
Daynix Computing LTD
Adjust linker settings (2)
Change “Additional
dependencies” to
reflect needed libraries
The screenshot...
Daynix Computing LTD
Adjust linker settings (3)
Change “version” and
“subsystem”
parameter to reflect
correct Windows
versi...
Daynix Computing LTD
Package project
Adjust OS list for
Inf2Cat
Possible options:
XP_X86, Server2003_X86,
XP_X64, Server20...
Daynix Computing LTD
Check command lines of
compiler and linker
Check compiler (CC++) and linker command line for
referenc...
BUILD THE DRIVER
14
Daynix Computing LTD
KMDF driver configuration (1)
Add paths to
KMDF libraries
and include
directories as
well
15
Daynix Computing LTD
KMDF driver configuration (2)
Change driver
model setting
to “WDM”
This will allow
to copy
correct
ver...
Daynix Computing LTD
KMDF driver configuration (3)
Change driver
entry point
17
Daynix Computing LTD
KMDF driver configuration (4)
In package project add a correct version of the WDF
coinstaller from old...
BUILD THE DRIVER
19
Daynix Computing LTD
Links
Download Windows 7 DDK - http://
www.microsoft.com/en-us/download/details.aspx?
id=11800
Values...
Upcoming SlideShare
Loading in …5
×

Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio 2013

4,997 views

Published on

Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio 2013

Published in: Software, Technology
  • Dear sir, I have Dell OptiPlex 5040 core i5 system which is 6 generation. I have installed window xp in them after doing some complex settings. Now the problem is i could not find driver of window XP compatible with six generation PC. Can i build graphics drivers as you have told in this slide? I have never ever build a driver before so i am new in this thing. Kindly, I need your assistance. I shall be thankful to you.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio 2013

  1. 1.  Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio 2013 Dmitry Fleytman, dmitry@daynix.com Yan Vugenfirer, yan@daynix.com Daynix Computing LTD
  2. 2. Daynix Computing LTD Agenda Motivation XPVistaServer 2003Server 2008 WDM driver step by step configuration And don’t forget KMDF 2
  3. 3. Daynix Computing LTD Motivation Maintain single code base for variety of Windows OSes Build XP and Vista drivers with Visual Studio 2013 Use C++11 features of Visual Studio 2013 compiler for the development of kernel drivers 3
  4. 4. Daynix Computing LTD What are the basic steps? Use VS2013 compiler Compile XP and Vista drivers using legacy DDK for include files and libraries Change appropriate preprocessor definitions Adjust linker options Adjust packaging for KMDF 4
  5. 5. Daynix Computing LTD Create configuration Create configuration for desired OS and platform by copying existing configuration (for example Windows 7) 5
  6. 6. Daynix Computing LTD Adjust includes and libraries paths Include directories (when using Win7 DDK): C:WinDDK7600.16385.1incddk;C:WinDDK 7600.16385.1inccrt;C:WinDDK7600.16385.1incapi 6
  7. 7. Daynix Computing LTD Adjust libraries path 7 XP 32bit C:WinDDK7600.16385.1libwxpi386 Windows Server 32 bit C:WinDDK7600.16385.1libwneti386 Windows Server 64 bit C:WinDDK7600.16385.1libwnet amd64 Vista 32bit C:WinDDK7600.16385.1libwlhi386 Vista 64bit C:WinDDK7600.16385.1libwlhamd64 Change your libraries path according to the following table:
  8. 8. Daynix Computing LTD Adjust preprocessor definitions Use the following link to set correct versions according to the target OS for: WINVER NTDDI_VERSION _WIN32_WINNT Example for Windows Vista: _WIN32_WINNT=0x0600;WINVER=0x0600;NTDDI_VERSIO N=0x06000000 8
  9. 9. Daynix Computing LTD Adjust linker settings (1) Adjust “Additional Library Directories” to point to legacy DDK directory according to your platform (see also “Adjust libraries path” slide) 9
  10. 10. Daynix Computing LTD Adjust linker settings (2) Change “Additional dependencies” to reflect needed libraries The screenshot is an example of NDIS miniport driver For WDM driver remove ndis.lib and add wdm.lib 10
  11. 11. Daynix Computing LTD Adjust linker settings (3) Change “version” and “subsystem” parameter to reflect correct Windows version. For the versions numbers check http:// msdn.microsoft.com/ en-us/library/ windows/desktop/ aa383745(v=vs. 11
  12. 12. Daynix Computing LTD Package project Adjust OS list for Inf2Cat Possible options: XP_X86, Server2003_X86, XP_X64, Server2003_X64, Server2003_IA64, Vista_X86, Server2008_X86, Vista_X64, Server2008_X64, Server2008_IA64 12
  13. 13. Daynix Computing LTD Check command lines of compiler and linker Check compiler (CC++) and linker command line for references to new WDK (Windows Kits8.1 or Windows Kits8.0) Check that all the version numbers reflect correct Windows version Fix if needed according to previous slides 13
  14. 14. BUILD THE DRIVER 14
  15. 15. Daynix Computing LTD KMDF driver configuration (1) Add paths to KMDF libraries and include directories as well 15
  16. 16. Daynix Computing LTD KMDF driver configuration (2) Change driver model setting to “WDM” This will allow to copy correct version of the WDF coinstaller from old DDK 16
  17. 17. Daynix Computing LTD KMDF driver configuration (3) Change driver entry point 17
  18. 18. Daynix Computing LTD KMDF driver configuration (4) In package project add a correct version of the WDF coinstaller from old DDK (can be a post build step or add it as a file that is part of the package). 18
  19. 19. BUILD THE DRIVER 19
  20. 20. Daynix Computing LTD Links Download Windows 7 DDK - http:// www.microsoft.com/en-us/download/details.aspx? id=11800 Values for versions definitions - http:// msdn.microsoft.com/en-us/library/windows/desktop/ aa383745(v=vs.85).aspx 20

×