NWPSJobGetDefault(3nw)
NWPSJobGetDefault --
returns contents of default print job record
Synopsis
#include <nwps_job.h>
or
#include <nwpsrv.h>
NWCCODE NWAPI NWPSJobGetDefault
(WORD connType,
DWORD connID,
WORD searchFlag,
char NWFAR
dbOwner,
char NWFAR
pJobName,
NWPS_Job_Rec NWFAR
pJobRecord);
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 or context identifier.
- searchFlag
-
(IN) Specifies the database to be searched.
- dbOwner
-
(IN/OUT) Points to the username of the owner of the database to search
(optional) upon input. Points to the owner of the database where
pJobName is actually located upon output. Its maximum length
is MAX_DN_BYTES.
- pJobName
-
(OUT) Points to the name of the default print job found. Its maximum
length is NWPS_JOB_NAME_SIZE.
- pJobRecord
-
(OUT) Points to where the content of the default print job record is stored.
Return values
- 0x0000
-
NWPSE_SUCCESSFUL
- 0x7770
-
NWPSE_BAD_VERSION
- 0x7773
-
NWPSE_ERROR_GETTING_DEFAULT
- 0x7774
-
NWPSE_ERROR_OPENING_DB
- 0x7775
-
NWPSE_ERROR_READING_DB
- 0x7776
-
NWPSE_ERROR_READING_RECORD
- 0x7779
-
NWPSE_INTERNAL_ERROR
- 0x777B
-
NWPSE_DEFAULT_SPECIFIED
Notices
searchFlag 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), if all databases starting at the
specified one are to be searched (NWPS_EXTENDED_SEARCH), or i
only the first database found is to be searched (NWPS_LIMITED_SEARCH).
You can set dbOwner to the username of the owner of the database
to be searched, or to NULL if all databases are to be searched starting at
the current user's database. dbOwner returns the actual location
where the default print job was found.
When a default print job is found, its name is returned in
pJobName, and the contents of the print job record are copied
into the buffer pointed to by pJobRecord.
If no default print job is found, NWPSJobGetDefault returns an
empty string in pJobName and a non-zero completion code.
To get the name of the default print job only, without the contents of
the print job record, pass NULL in pJobRecord.
Services
Print Server
References
NWPSJobSetDefault(3nw),
NWPSJobWrite(3nw),
NWPSJobRead(3nw),
NWCCOpenConnByName(3nw),
NWDSCreateContext(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.