NWPSJobGetFirstJob(3nw)
NWPSJobGetFirstJob --
retrieves first job name and owner for print job configuration
Synopsis
#include <nwps_job.h>
or
#include <nwpsrv.h>
NWCCODE NWAPI NWPSJobGetFirstJob
(WORD connType,
DWORD connID,
WORD searchFlag,
NWPSListHandle NWFAR
handle,
char NWFAR
dbOwner,
char NWFAR
pJobName,
WORD NWFAR
defaultPJ);
Description
The parameters are as follows:
- connType
-
(IN) Specifies either NWPS_BINDERY_SERVICE,
NWPS_BINDERY_SERVICE_PRE_40, or NWPS_DIRECTORY_SERVICE.
- connID
-
(IN) Specifies the connection identifier.
- searchFlag
-
(IN) Specifies the search flag.
- handle
-
(OUT) Points to the value to be passed to NWPSJobGetNextJob
and NWPSJobEndNextJob.
- dbOwner
-
(IN/OUT) Points to the start point of the search for a print job (optional)
upon input. Points to the actual location where the print job was found
upon output. Its maximum length is MAX_DN_BYTES.
- pJobName
-
(OUT) Points to the name of the first print job record found. Its maximum
length is NWPS_JOB_NAME_SIZE.
- defaultPJ
-
(OUT) Points to the single_byte default print job flag defined as follows:
NWPS_DOMINANT_DEFAULT_JOB 1
NWPS_CURRENT_DB_DEFAULT_JOB 2
0
Any combination may be returned.
Return values
- 0x0000
-
Successful
- 0x7771
-
End of Job Names
- -1
-
General Error
- other
-
Bindery or Directory Services Errors
Notices
NWPSJobGetFirstJob allocates memory and opens files that must
be respectively deallocated and closed by calling NWPSJobEndNextJob.
If the completion code is non-zero, the value returned for the handle is
zero. In this case, calling NWPSJobEndNextJob is not required.
jobSearch is defined as follows:
- 0
-
NWPS_EXTENDED_SEARCH
- 1
-
NWPS_SINGLE_SEARCH
- 2
-
NWPS_LIMITED_SEARCH
searchFlag indicates if only the specified database is to be
searched (NWPS_SINGLE_SEARCH), or if all relative databases
starting at the specified one are to be searched
(NWPS_EXTENDED_SEARCH). When NWPS_LIMITED_SEARCH is
specified, NWPSJobGetFirstJob looks only at the first location,
plus an optional second level if the first
level is not an Organization or Organizational Unit.
dbOwner returns the directory object name or bindery user name
of the owner of the database to be searched. You can set it to NULL
if all relative databases are to be searched starting at the current
user's database.
Each function returns the name of the next print job record found and
places it in pJobName.
Services
Print Server
References
NWPSJobEndNextJob(3nw),
NWPSJobGetNextJob(3nw),
NWPSJobRead(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.