none
How to use templates KMDF RRS feed

  • Question

  • Hello!

    I need a template KMDF for run in kernel mode, debuggin Windows, What I can do? I don't have this option when i create a new proyect type Visual C++ on Visual Studio 2012.

    Thanks for your help!

    Wednesday, September 26, 2012 8:47 PM

All replies

  • Have you installed the Win8 WDK?  It should give you the template.  But also before you use a template, have you considered what it is you are really doing?  Until the Win8 WDK our templates were the sample drivers Microsoft provided, where people ripped out the uneeded code.   Think about checking the samples for a driver that does something similar to what you want.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Wednesday, September 26, 2012 9:12 PM
  • if you installed the wdk before installing VS2012, you need to go to add/remove programs, select the win8 wdk and run arepair so that the VS components can be registered

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, September 26, 2012 10:54 PM
  • Ok Ok...

    One question Doro and Donald... its possible to debug source code on VS2010, to the menu "Driver" with WDK 7.0?? it's possible??

    Thanks!

    Wednesday, October 3, 2012 3:56 PM
  • With Windows 7 WDK and VS2010, you have a different environment.  FIrst if you want to build a driver you need to have a SOURCES and run the build command.  Note: there is a script DDKBUILD (see http://www.hollistech.com/ under Resources) that will allow you to work in VS.  For debugging you will be using WinDBG which is included in the WDK. 

    What you can't do is build drivers or debug drivers directly with the VS2010 environment.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Wednesday, October 3, 2012 4:04 PM
  • I wan't to debug source code of a driver (work in Kernel-Mode) with two computers, host and target computer, but I'm not sure if i can make on VS2010, because on VS2012 yes i can. Certainly I want know if i can debug like WinDBG in VS2010 :)

    Wednesday, October 3, 2012 6:20 PM
  • Yes WinDBG uses two computers, you need a serial or 1394 link between the two of them to debug with (or a virtual serial with a hypervisor).  The Windbg documentation is pretty good, start there.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Wednesday, October 3, 2012 6:24 PM
  • Ok Pavel, I have symbols of Windows, symbols of my driver and source code of a graphic driver (i don't write this code, its a proyect on Visual Studio with C++), so... In WinDBN I load symbols and source code and ready! Start Kernel-Mode Debug. I have understand that I should load symbols of windows and driver, but previowsly open de proyect or solution in VS and then to init debug? Sorry, im new in this things.

    Wednesday, October 3, 2012 9:15 PM
  • how about you get things going in windbg. establish the kernel debugger session, make sure your symbols load, etc and then you can jump to use VS2012 once those variables are taken care of.  the kernel debugger feature in VS2012 is meant to work with build and deploy within the VS2012 build system via the wdk. since you are not using the build part, you are trying to start at step 4, not step 1.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, October 4, 2012 2:00 AM