HANDLE SpoolFile(lpszPrinter, lpszPort, lpszJob, lpszFile) | |||||
LPSTR lpszPrinter; | /* printer name, */ | ||||
LPSTR lpszPort; | /* port name, */ | ||||
LPSTR lpszJob; | /* job name | */ | |||
LPSTR lpszFile; | /* file name, */ |
The SpoolFile function puts a file into the spooler queue. This function is typically used by device drivers.
lpszPrinter
Points to a null-terminated string specifying the printer name—for example, “HP LasterJet IIP”.
lpszPort
Points to a null-terminated string specifying the local name—for example, “LPT1:”. This must be a local port.
lpszJob
Points to a null-terminated string specifying the name of the print job for the spooler. This string cannot be longer than 32 characters, including the null-terminating character.
lpszFile
Points to a null-terminated string specifying the path and filename of the file to put in the spooler queue. This file contains raw printer data.
The return value is the global handle that is passed to the spooler, if the function is successful. Otherwise, it is an error value, which can be one of the following:
SP_APPABORT
SP_ERROR
SP_NOTREPORTED
SP_OUTOFDISK
SP_OUTOFMEMORY
SP_USERABORT
Applications should ensure that the spooler is enabled before calling the SpoolFile function.