#include <nwqms.h> or #include <nwcalls.h>NWCCODE N_API NWCreateQueueFile2 (NWCONN_HANDLE conn, nuint32 queueID, NWQueueJobStruct N_FAR
job, NWFILE_HANDLE N_FAR
fileHandle);
After creating a job file, NWCreateQueueFile2 attaches it to a special file opened at the workstation. The special file handle is returned in fileHandle.
The requesting workstation provides the Bindery ID of the queue the job should be appended to, as well as the address of the entire 256-byte job record (NWQueueJobStruct).
NWCreateQueueFile2 fills in the job record and returns the record (minus jobDescription
and clientRecordArea
) to the requesting workstation. After
NWCreateQueueFile2 is called, all fields are initialized.
NWCreateQueueFile2 can be used in conjunction with NWReadQueueJobEntry2 to change a portion of the job's entry record. However, if the target entry is already being serviced, NWChangeQueueJobEntry2 returns Q_SERVICING and makes no changes to the job's entry record.
The file handle returned is appropriate for the platform the API is written for. This file handle may be used for access to the attribute value through standard file I/O with the handle. This includes closing the file as well as reading and writing to the file.
For Windows, call _lread, _lwrite, _lclose, and _lseek rather than calling the standard file I/O functions. Calling standard file I/O functions in Windows returns unexpected results.
Queue Management