NWPSCfgGetFirstPrintServer(3nw)


NWPSCfgGetFirstPrintServer -- finds the first print server in the Bindery or Directory

Synopsis

   #include <nwps_cfg.h> 
   or 
   #include <nwpsrv.h> 
   

NWCCODE NWAPI NWPSCfgGetFirstPrintServer (WORD connType, DWORD connID, NWPSListHandle NWFAR *handle, char NWFAR *pServerName);

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.

handle
(OUT) Points to the value to be passed to NWPSCfgGetNextPrintServer and NWPSCfgEndNextPrintServer.

pServerName
(OUT) Points to the name of the first print server found. Its maximum length is MAX_DN_BYTES for Directory Services; 48 characters for other services.

Return values

0x0000
Successful

0x7760
NWPSE_END_OF_LIST

-1
General Error

other
Bindery or Directory Services Errors

Notices

Memory allocated and files opened by NWPSCfgGetFirstPrintServer must be respectively deallocated and closed by calling NWPSCfgEndNextPrintServer. If the completion code is non-zero, the value returned for the handle is zero, calling NWPSCfgEndNextPrintQueueAttris not required.

Services

Print Server

References

NWPSCfgEndNextPrintServer(3nw), NWPSCfgGetNextPrintServer(3nw), NWPSCfgVerifyPrintServer(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.