Microsoft KB Archive/141712

= Microsoft Knowledge Base =

INF: Trace Option in LPR Print Monitor
Last reviewed: March 26, 1997

Article ID: Q141712

The information in this article applies to:


 * Microsoft Windows NT Server, versions 3.51 and 4.0

SUMMARY
When you have problems printing to a printer controlled by LPRMON, a trace can be useful. Lprmon.dll has a trace function built in to the checked version. When you replace Lprmon.dll in the System32 directory with the checked version and restart the spooler service, an Lprerr.log file is generated.

MORE INFORMATION
Sample Output:

LPR (100): EnumPorts( (null), 1, 0x00000000, 0, 0x00F9ED68, 0x00F9ED60 ) LPR (100): ERROR: EnumPorts: Buffer too small. LPR (100): EnumPorts( (null), 1, 0x00B93448, 30, 0x00F9ED68, 0x00F9ED60 ) LPR (100): <--- EnumPorts: Returning TRUE. LPR (100): OpenPorts( 191.60.0.50:, 0x00B934B8 ) LPR (94): ---> StartDocPort( hPort = '191.60.0.50:', pPrinterName = 'HP4Si in LanLab', JobId = 1, Level = 1, pDocInfo = 0x01CAFF70 )

LPR (94):    InitiateConnection succeeded in StartDocPort LPR (94): Name of spool file: D:\WINNT40\System32\spool\PRINTERS\Lpr6.tmp LPR (94): UpdateJobStatus( "191.60.0.50:", "Spooling") changing from "Starting". LPR (94): <--- UpdateJobStatus, returning 1 LPR (94): <--- StartDocPort returning TRUE LPR (94): ---> EndDocPort( hPort = '191.60.0.50:' )

LPR (94):    User RobertVi, JobId 0, Size 4777  (LprSpooling) LPR (94): <--- NegotiateLpd, returning 0. LPR (94): EndDocPort: NegotiateLpd returns 0. LPR (94): UpdateJobStatus( "191.60.0.50:", "Printing") changing from "Spooling". LPR (94): <--- UpdateJobStatus, returning 1 LPR (94): ---> DeSpoolJob( pPort = 0x00147BE0 ) LPR (94): ---> DeSpoolJob hSpoolFile == 0x0000018C LPR (94): ---> DeSpoolJob GetFileSize returned = 4777 LPR (94): DeSpoolJob init-> cbBytesToDeSpool == 4777 cbBytesRemaining == 4777

LPR (94):               -> pPort->hSpoolFile == 0x0000018C ) LPR (94): DeSpoolJob loop-> cbBytesDeSpooled == 4777

LPR (94):               -> cbBytesToDeSpool == 0 cbBytesRemaining == 0 LPR (94):               -> cbDataLen == 4777 LPR (94):    DeSpoolJob completed successfully LPR (94): <--- DeSpoolJob, returning 0. LPR (94): EndDocPort: DeSpoolJob returns 0.

LPR (94):    CleanupSpoolFile completed successfully LPR (94):    Leaving EndDocPort normally LPR (94): <--- EndDocPort returning True LPR (74): EnumPorts( (null), 1, 0x00000000, 0, 0x00F9ED68, 0x00F9ED60 ) LPR (74): ERROR: EnumPorts: Buffer too small. LPR (74): EnumPorts( (null), 1, 0x00B91EA0, 30, 0x00F9ED68, 0x00F9ED60 ) LPR (74): <--- EnumPorts: Returning TRUE. LPR (74): OpenPorts( 191.60.0.50:, 0x00B91F10 )