none
Compiling a user mode Printer Graphics DLL for XP as a plain vanilla DLL using Visual Studio 10 or older RRS feed

  • Question

  • Hi all,

    I need to write a printer driver that

    1) is user mode

    2) is loaded into the application process rather than the spooler. I ensure this by using the "FILE:" port and print direct to printer.

    3) Works in XP and higher.

    Is there a way to do this with the Visual Studio compiler instead of the one in DDK 7.1? What's special thing does the DDK 7.1 compiler/linker do to the DLL that Visual Studio can't?

    Thanks for any help :)

    Wednesday, April 16, 2014 2:51 PM

Answers

  • The WDK 7.1 compiler is the one that was tested with the OS to ensure they were compatible.  I don't do printer drivers so I can't comment directly on them.  Over the years I have dealt with a number of clients with kernel mode code that decided to use the Visual Studio IDE instead of the supplied compiler.  In all cases they ended up wasting months tracking down obscure bugs that were due to the different compilers, and none of them are using that approach anymore.

    If you want the IDE to make things nice, then consder using DDKBUILD from http://www.hollistech.com/ (look under Resouces).  This will allow you to chose build in the IDE, but it will invoke the underlying BUILD commands in the WDK.   Using anything other than the specified tools in developing system level code is a really bad idea.


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

    Wednesday, April 16, 2014 2:58 PM

All replies

  • The WDK 7.1 compiler is the one that was tested with the OS to ensure they were compatible.  I don't do printer drivers so I can't comment directly on them.  Over the years I have dealt with a number of clients with kernel mode code that decided to use the Visual Studio IDE instead of the supplied compiler.  In all cases they ended up wasting months tracking down obscure bugs that were due to the different compilers, and none of them are using that approach anymore.

    If you want the IDE to make things nice, then consder using DDKBUILD from http://www.hollistech.com/ (look under Resouces).  This will allow you to chose build in the IDE, but it will invoke the underlying BUILD commands in the WDK.   Using anything other than the specified tools in developing system level code is a really bad idea.


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

    Wednesday, April 16, 2014 2:58 PM
  • it is primarily about

    1 the test matrix

    2 CRT support and what imports it takes hard and soft dependencies on

    and not about the compiler itself. Use the kits that support the os target you want, hacking something else is is going yo cause you long term pain


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

    Wednesday, April 16, 2014 4:45 PM