Solved: How to Debug Printer Driver using Visual Studio

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

prashu9

Thread Starter
Joined
May 20, 2008
Messages
21
I am trying to debug printer driver using Visual Studio. Can someone tell me as to how to configure the Visual Studio?

Thanks,
 

prashu9

Thread Starter
Joined
May 20, 2008
Messages
21
Hi,
I found the answer by my self.
Just sharing the same as it can be helpful to others.

Well we can debug the driver plug-in code in visual studio by following the below method.
First we should have WDK installed with the build environments.

1. Add the code in to the visual studio by creating a project.
2. Do not build this code in this visual studio , instead choose any of the build environments provided by the WDK and build it.
3. After building the plug in you will get the corresponding .pdb and .dll in the area where you built( ie in that folder where you stored the plug-in code)
4. copy the .pdb and .DLL of the corresponding plug-in in to system 32->spool->drivers->W32x86\3.
5.Now in the build environment type commands as below
net stop spooler
net start spooler
6. Now put break points in the plug-in code.
7. Open any process like note pad or word pad and use it for printing purpose.
8. Now in visual studio in tools folder or in debug folder take attach process option and attach the notepad you have opened just before.
9. Now try doing operations on that note pad such as giving printing etc then the control stops at your break point.

This way we can debug the code....
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top