Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
WNetOpenJob
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
WORD WNetOpenJob(szQueue, szJobTitle, nCopies, pfh)
LPSTR szQueue;
LPSTR szJobTitle;
WORD nCopies;
WORD FAR * pfh;
 
The WNetOpenJob function initializes a print job for transmission across the
net. It copies a file handle to the buffer indicated by the pfh parameter,
which Print Manager can use to write to the spool file.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
 
szQueue     Points to a null-terminated string specifying either a
            redirected local device or a fully qualified network name of a
            print queue.
 
szJobTitle  Points to a null-terminated string specifying the job title. If
            the szJobTitle parameter is NULL, the driver may use any
            appropriate default.
 
nCopies     Specifies the number of copies to print.
 
pfh         Points to a variable that receives the file handle for the job.
 
Return Value
 
The return value is one of the following values.
 
Value               Meaning
────────────────────────────────────────────────────────────────────────────
WN_BAD_POINTER      Invalid pointer.
 
WN_BAD_QUEUE        The szQueue parameter is not a valid net queue or
                    redirected device.
 
WN_CANT_SET_COPIES  Warning, printing one copy.
 
WN_NET_ERROR        Network error.
 
WN_NOT_SUPPORTED    Function not supported.
 
WN_OUT_OF_MEMORY    Out of memory.
 
WN_SUCCESS          Success.
 
Comments
 
The export ordinal for this function is 1.
 
On some networks, open print jobs will automatically be closed and printed
after some time-out period. It is the responsibility of the driver to make
sure that the network does not pause on open print jobs, even if the
application is inactive for long periods of time.
 
See Also
 
WNetCloseJob