

Retrieves a handle to the specified printer, print server, or other types of handles in the print subsystem, while setting some of the printer options. The OpenPrinter function retrieves a handle to the specified printer or print server or other types of handles in the print subsystem. The GetJob function retrieves information about a specified print job. The EnumJobs function retrieves information about a specified set of print jobs for a specified printer. The EndPagePrinter function notifies the print spooler that the application is at the end of a page in a print job. The EndDocPrinter function ends a print job for the specified printer. The DocumentProperties function retrieves or modifies printer initialization information or displays a printer-configuration property sheet for the specified printer. The DocumentEvent function is an event handler for events associated with printing a document. The ClosePrinter function closes the specified printer object. The function retrieves the name of the file you can use to store the job. The AddJob function adds a print job to the list of print jobs that can be scheduled by the print spooler.

These functions send print jobs to a printer and track and control the print jobs in the print spooler. The functions of the Print Spooler API are divided into the following groups: Surmounting MS Visual FoxPro 8.The Print Spooler API contains the functions and data structures that applications use to manage the Windows print spooler and the printers and print jobs that it controls.Pressing and releasing keys by software.Result:=GetContexts(8,PChar(lsAuxNome.Strings)) LsAuxNome := GetContexts(16,PChar(psName)) Inc(lpPrinterInfo, sizeof(TPrinterInfo1)) ĮnumPrinters(PRINTER_ENUM_REMOTE,nil,1,nil,0,lcCount,lcNumCount) LsNome := copy(pName,liAux,Length(pName)) LsNome := copy(pDescription,liAux+1,Length(pDescription)) You can use this in a combo or a listbox.įunction TForm1.GetPrintServers(psName: string): TStrings įunction GetContexts ( pctipo : cardinal ppName : PChar ):TStringlist ĮnumPrinters(pctipo,ppName,1,PByte(lpBuffer),lcCount,lcCount,ĮnumPrinters(pctipo,nil,1,PByte(lpBuffer),lcCount,lcCount, After this you can write this code using the windows API EnumPrinters: The parameter psName is the server in the network and the result is TStrings. Question: Find the printers for a server specific on the networkįirst: insert on uses the unit name "winspool" and "printers".
