NWPSComAttachToPrintServer(3nw)


NWPSComAttachToPrintServer -- establishes SPX connection between workstation and print server

Synopsis

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

NWCCODE NWAPI NWPSComAttachToPrintServer (WORD connType, DWORD connID, WORD timeOut, char NWFAR *pServerName, WORD NWFAR *spxID);

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 NetWare server connection ID number or Directory Services context.

timeOut
(IN) Specifies the number of seconds before time out.

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

spxID
(OUT) Points to the number of the SPX connection to the print server.

Return values

0x0000
NWPSE_SUCCESSFUL

0x00ED
NWPSE_CONNECTION_TERMINATED

0x0040
NWPSE_NO_AVAILABLE_SPX_CONNECTION

0x0041
NWPSE_SPX_NOT_INITIALIZED

0x0042
NWPSE_NO_SUCH_SERVER

0x0043
NWPSE_UNABLE_TO_GET_SERVER_ADDR

0x0044
NWPSE_UNABLE_TO_CONNECT_TO_SERV

0x0045
NWPSE_NO_AVAILABLE_IPX_SOCKETS

0x0046
NWPSE_ALREADY_ATTACHED_TO_A_PRINT

Notices

NWPSComAttachToPrintServer is for operators and users; call it before calling NWPSComLoginToPrintServer.

Services

Print Server

References

NWPSComDetachFromPrintServer(3nw), NWPSComLoginToPrintServer(3nw), NWScanObject(3nw), NWCCOpenConnByName(3nw), NWDSCreateContext(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.