Originally posted by: Dan Reynolds
1) I have adapted your code somewhat and everything works just fine until I try to tell the spooler that the job is ended. The print job is accurately written to My spool file in My spool directy. I send JOB_CONTROL_SENT_TO_PRINTER via SetJob but the job is never deleted. The status remains "Printed". The SetJob is returning an error "Invalid Parameter". As far as I can tell the parameters are all correct. pPort->sCurrentPrt in OpenPrinter is the string Name of the printer. The OpenPrinter call does not error so I assume the hPrinter is okay. The pPort->dwJobID is from the paramerter to the StartDocPort call, in my test cases this is always 0, I assume because it's the only print job (or does this value increment)
if (OpenPrinter (pPort->sCurrentPrt, &hPrinter, NULL)) {
Any ideas???
I have encountered a problem when running under Windows 2000 Professional.
rc = SetJob (hPrinter, pPort->dwJobID,
0, NULL, JOB_CONTROL_SENT_TO_PRINTER);
if (rc == 0) {
GetLastError (returns INVAID_PARAMERTER)
}
}
Originally posted by: Paras Kumar
Hi All,
I have got my own port monitor but I am facing 2 major problems right now. Please give me some inputs if you have got some.
Problem one :- I have installed my network port monitor on my Windows NT4.0 machine and created a port for a network printer. Now the thing is when I add a printer using this port , everything seems to work fine but internally it think it as a network printer and doesn't accept it as a local printer while that port is local to my machine. I get to know this behavior from the registry where at many places it doesn't show the real port name and instead shows port as NExx which is a symbol of network printer.
Problem two:- I have installed a printer using a local port and I have made it shared also. Now the problem with my port monitor is that whenever a job is fired from local machine, it writes some desired data into the registry but if job is from another machine, it doesn't write to registry. I really can't figure out why this thing is happening to my port monitor. I try to write some data into registry in startDoc function.
Originally posted by: Greg
Hey, nice work, I was wondering if there is an easy way to simply tell how many pages got printed out, just let everything go the way its supposed to and count pages. Currently I use GetPrintJob(...) and such Win32 functions, but they are way too inaccurate ...
Got any ideas ?
Originally posted by: S. Horn
I tested the dll under WindowsXP. I always get "Spooler SubSystem App - Error":
szAppName=spoolsv.exe
szModName= ntdll.dll
what is the diffrence to win2000 ?
any ideas ? - please mail me
thank you
Reply
Originally posted by: Jean Pierre
I have to print thousand documents to a remote printer within an MS Access Application.
If I use the command DoCmd.OpenReport "MyReport" then automatically It will send the document directly to the spooler and immediately print it out.
Actually I would like to captureand put each report into an unique spool and when I reach 20 documents then I will perform the print job process .
How can I do it with the dirport.dll?
JPM
Hello,
Originally posted by: wang
Hi:
I have a question that whether I can control the print process. If there are 50 pages for printing, can I only print 10 pages by moritoring the port? If it can, How to implement it?
Thanks
WangQiang
Originally posted by: Dan Reynolds
I appreciate someone who can take a complex concept and reduce it to simplicity, it's an art.
Originally posted by: STee
Something I observed...
When printing on Windows 2000, with default settings, the document name given to the StartDocPort of the port monitor by the spooler happens to be the Friendlyname of the printer!!
If I go to the Advanced tab in the print properties and change the checkbox Enable Advanced printing features to off then the StartDocPort gives the correct document name in the DOC_INFO_x structure.
Do you have any explanation for this strange behavior of the spopoler?
Thanks,
-Stee
Originally posted by: John
The idea is to capture the printer object that was sent by the user from a component that later selectes as to which printer it's going to send the print out depending on the logic that I inlude..!! I need to automate the printer slecting process so that the user would not select the printer and the software component would do that for the user..!!
Thanks..!!
John
Reply
Originally posted by: Edward Tsai
I was wondering on how to integrate this in a solution where I can create custom ports which function like the "FILE:"; port except that it goes a step further... the output (perhaps to a temporary file) then is opened by a .exe file that I can specify (such as notepad.exe).
Should I look into VB or just C++?
Thanks
-Edward
Hi,