Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> pjbbytesdoneget()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PJbBytesDoneGet()
------------------------------------------------------------------------------
 Purpose:
 Get the number of bytes of the job already printed by a printer.

 Syntax:
 dwByteDone = PJbBytesDoneGet( wPtrNum )

 Parameters:
 wPtrNum The printer number.

 Returns:
 A numeric value (unsigned long int).

 The CA-Clipper name for this function is:
 PJbBytDneGet()

 Description:
 PJbBytesDoneGet() returns the number of bytes which have been printed
 of the current copy of the print job being serviced by printer wPtrNum.

 Returns NOVERRLONG if an error occurs.

 Example:
 // To log in to print server PRINTERS and test printer 0 to
 // display the size of the current print job, the number of copies,
 // and how much is left to print:
 if( PSWSLogin ( "PRINTERS" ) > 0 )
    iJobNum     = PJbNumberGet(0)
    iCopies     = PJbCopyToDoGet(0)
    wSize       = PJbSizeGet(0)
    iCopiesDone = PJbCopyDoneGet(0)
    dwBytesDone = PJbBytesDoneGet(0)
    if iJobNum > 0
       ? "Print Job Number ",iJobNum," is being serviced by "
       ?? "print server PRINTERS, printer 0"
       ? "So far ",dwBytesDone," bytes have been printed with "
       ?? wSize-dwBytesDone," left to print of copy number "
       ?? iCopiesDone + 1
       ? "With ",iCopies-iCopiesDone-1," copies left to print"
       ? "Total number of bytes printed so far = "
       ?? ( iCopiesDone * wSize ) + dwBytesDone
       ? "Total number of bytes left to print = "
       ?? (( iCopies - iCopiesDone )* wSize ) - dwBytesDone
    endif
 endif

 Notes:
 It is only possible to be logged in to one print server at a time.

 PJbBytesDoneGet() returns the number of bytes that the print server has
 sent to the printer. This may not accurately reflect the actual number of
 bytes printed by the printer because many printers have large buffers to
 store data before printing it.

See Also: PJbCopyDoneGet() PJbNumberGet() PJbCopyToDoGet() PJbQueueGet() PSWSLogin()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson