Hi,
I wrote this
[
For nJob = 0 To GetPrinterQueue(Printer.DeviceName) - 1
'MsgBox "STATUS = " & JobsDesc(nJob).Status & " pSATUS = " & JobsDesc(nJob).pStatus
If (UCase(Right(JobsDesc(nJob).pMachineName, Len(JobsDesc(nJob).pMachineName) - 2)) = UCase(WskPrint.LocalHostName)) _
And (JobsDesc(nJob).Status <> JOB_CONTROL_PAUSE) Then
PrinterCommand Printer.DeviceName, nJob, PRINTER_CONTROL_PAUSE, JOB_CONTROL_PAUSE
End If
Next
]
But when the Job is Paused, the program always execute the "PrinterCommand" instruction... And I remark that my "JobsDesc(nJob).Status" is "17" ...
In fact, I would like my program to pause only the Jobs which aren't paused...
What's false in the code I've write?
Thanks in advance for ur help.
09-08-2002 at 02:48 PM
|
Merrion Level: VB Guru Registered: 15-04-2002 Posts: 37
Re: I can't get the real State of a job... Why?
JOB_CONTROL_PAUSE is not a status, it is a command that you send to pause the job.
sorry,please,
i'd like to know which APIs you use to control a job on the printer.And also,if it is possible that you gave a sample of code which can allow me to count al the copies sent to the printer.
05-03-2003 at 10:29 PM
|
supera Level: Guest
Re: I can't get the real State of a job... Why?
Mail me at stl0410@yahoo.com and please remember me your question. I'll send you the answer back.
Bye,
Supera.