[LOCALSPL]
authorColin Finck <colin@reactos.org>
Wed, 22 Jul 2015 12:44:22 +0000 (12:44 +0000)
committerColin Finck <colin@reactos.org>
Wed, 22 Jul 2015 12:44:22 +0000 (12:44 +0000)
commit309215ece6fb159d8d356bbf808c4650cc19c928
treec075d04c5a689a853fc504e9756e70c0ad34a6de
parent03a88ff7157e6211033d0f5ae039298c7c7b18dc
[LOCALSPL]
This is where things get dirty. StartDocPort of the Print Monitor needs the Printer Name and Job ID of the job to print on this port.
But StartDocPort is called by LocalStartDocPrinter, whose parameters are fixed and don't include this information.
Therefore, I have no way to pass these parameters to a port handle directly. Instead, I need to store a pointer to the job in the port structure itself and let the next port handle pick up this information in LocalStartDocPrinter.

Surprisingly, Windows doesn't seem to do any better here. For testing, I stalled execution inside my own Print Processor and called StartDocPrinter from another thread.
It then picked up and "stole" the stored job information. When the Print Processor resumed execution, the job information wasn't present anymore and its StartDocPrinter call crashed. So even Windows definitely stores this information only for a single StartDocPrinter call.

Having solved this, I could finally implement OpenPrinter, StartDocPrinter, ReadPrinter, WritePrinter and ClosePrinter for Port handles as well as OpenPrinter and ClosePrinter for Xcv handles.

svn path=/branches/colins-printing-for-freedom/; revision=68550
reactos/win32ss/printing/providers/localspl/precomp.h
reactos/win32ss/printing/providers/localspl/printers.c
reactos/win32ss/printing/providers/localspl/printingthread.c