More confusion in debugging printer driver :(

I am debugging the MSPLOT sample driver by placing OutputDebugString on the
main exported functions to see which of these are being called, on adding the
driver by the add printer wizard.

Using WinDbg I am receving some output from DllMain and DrvQueryDriver but
after that all output stop (not because these are the only functions called,
it has to build the propertysheets so wheres the output from those
functions), even if I output to a trace file. Whats strange is that I am
recieving some error msgs from DrvDeviceCapabilities but without recieving
the debug str that i wrote to inform me that it entered the function.

I think it could be because
1. The driver fell to Kernel Mode at somepoint
2. The driver created some other process outside the spooler and all msgs
are falling
3. The spooler process doesn´t give me the rights to see the messages or
doesn´t allow the driver to send messages or write to files!

What do you people think?

Re: More Printer driver debugging by GraphicsHighway

GraphicsHighway
Wed Nov 23 12:33:08 CST 2005

msplot is a usermode driver. There are no issues like what you have
mentioned. If there is a
OutputDebugString(...) anywhere, it should appear. Use dbgview from
sysinternals.com
to view them

--
Vipin Aravind
MVP [Windows - Printing/Imaging]
http://vipinaravind.blogspot.com

"neoadam" <neoadam2000@yahoo.com> wrote in message
news:46EB3F70-E4E3-42FE-9BCC-12BEAFBF612D@microsoft.com...
> More confusion in debugging printer driver :(
>
> I am debugging the MSPLOT sample driver by placing OutputDebugString on
> the
> main exported functions to see which of these are being called, on adding
> the
> driver by the add printer wizard.
>
> Using WinDbg I am receving some output from DllMain and DrvQueryDriver but
> after that all output stop (not because these are the only functions
> called,
> it has to build the propertysheets so wheres the output from those
> functions), even if I output to a trace file. Whats strange is that I am
> recieving some error msgs from DrvDeviceCapabilities but without recieving
> the debug str that i wrote to inform me that it entered the function.
>
> I think it could be because
> 1. The driver fell to Kernel Mode at somepoint
> 2. The driver created some other process outside the spooler and all msgs
> are falling
> 3. The spooler process doesn´t give me the rights to see the messages or
> doesn´t allow the driver to send messages or write to files!
>
> What do you people think?



Re: More Printer driver debugging by Christoph

Christoph
Thu Nov 24 06:00:52 CST 2005

You probably dont see the debug output because capture the output from one
process (spoolss), but the propety sheet functions are called in the context
of the printing application (word, notepad...)
From sysinternals.com you can download a program (debugview) that can
capture debugouput from all processes also kernel.

/christoph
http://undocprint.printassociates.com/

"neoadam" <neoadam2000@yahoo.com> wrote in message
news:46EB3F70-E4E3-42FE-9BCC-12BEAFBF612D@microsoft.com...
> More confusion in debugging printer driver :(
>
> I am debugging the MSPLOT sample driver by placing OutputDebugString on
> the
> main exported functions to see which of these are being called, on adding
> the
> driver by the add printer wizard.
>
> Using WinDbg I am receving some output from DllMain and DrvQueryDriver but
> after that all output stop (not because these are the only functions
> called,
> it has to build the propertysheets so wheres the output from those
> functions), even if I output to a trace file. Whats strange is that I am
> recieving some error msgs from DrvDeviceCapabilities but without recieving
> the debug str that i wrote to inform me that it entered the function.
>
> I think it could be because
> 1. The driver fell to Kernel Mode at somepoint
> 2. The driver created some other process outside the spooler and all msgs
> are falling
> 3. The spooler process doesn´t give me the rights to see the messages or
> doesn´t allow the driver to send messages or write to files!
>
> What do you people think?