I have the following code to get the handle for the printer but i just the error \"paramaters are incorrect\". Any ideas as to what paramater in incorrect and why? Var names : TStrings; Name : string; Printerhandle : Cardinal; Number : cardinal; errormsg : array[0..30] of char; begin Names := Printer.Printers; Name := Names[Printer.PrinterIndex]; //showmessage(Name); opened := openprinter(pchar(name), Printerhandle, nil); IF not opened then begin number := getlastError; formatmessage(FORMAT_MESSAGE_FROM_SYSTEM,nil,number,0,errormsg,30,nil); showmessage(errormsg); end; James Quoting Patrick Dunford <[EMAIL PROTECTED]>: > You might find what you are looking for in the > FindFirstPrinterChangeNotification and related functions. They can tell you > when a job is added or deleted and there is a field for the number of pages > printed. > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > > Behalf Of [EMAIL PROTECTED] > > Sent: Tuesday, 1 June 1999 18:06 > > To: Multiple recipients of list delphi > > Subject: [DUG]: Counting pages printed > > > > > > Hi all, > > > > My network is having problems with people printing rubish on the network > > printer and i was wanting to make an app that counted the number > > of pages each > > computer printed. > snip > > --------------------------------------------------------------------------- > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > ----------------------------------------------------- This mail sent through IMP: http://web.horde.org/imp/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz