NWPSCfgAddPrinter(3nw)


NWPSCfgAddPrinter -- adds printer to list of printers of defined print server

Synopsis

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

NWCCODE NWAPI NWPSCfgAddPrinter (WORD connType, DWORD connID, char NWFAR *pServerName, char NWFAR *printerName, WORD NWFAR *printerNumber);

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.

pServerName
(IN) Points to the name of the print server.

printerName
(IN) Points to the name of the printer to add.

printerNumber
(IN) Points to the number of the printer to add.

Return values

0x0000
Successful

-1
General Error

other
Bindery or Directory Services Errors

Notices

printerNumber is used for the print server printer attribute and can be NULL or a pointer to -1 if the caller does not care what that number is. A number is assigned and returned if not NULL. printerNumber is required for bindery identification.

In NWPS_BINDERY_SERVICE, the list of operators contains SUPERVISOR. In NWPS_DIRECTORY_SERVICE, the list of operators contains the current user.

The default attributes follow:

   NWPS_ATTR_OPER   = SUPERVISOR (Bindery Services) 
   NWPS_ATTR_OPER   = current user (Directory Services) 
   NWPS_ATTR_STAT   = NWPS_NOT_CONNECTED 
   NWPS_ATTR_CONF   = LPT1 
   NWPS_ATTR_NOTIFY = job owner 
   NWPS_ATTR_OWNER  = current user 

Services

Print Server

References

NWPSCfgAddPrinterAttr(3nw), NWPSCfgDeletePrinter(3nw), NWPSCfgGetFirstPrinter(3nw), NWPSCfgGetNextPrinter(3nw), NWPSCfgEndNextPrinter(3nw), NWPSCfgVerifyPrinter(3nw), NWPSCfgGetFirstPrintServer(3nw), NWPSCfgGetNextPrintServer(3nw), NWPSCfgEndNextPrintServer(3nw), NWPSCfgVerifyPrintServer(3nw), NWCCOpenConnByName(3nw), NWDSCreateContext(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.