NWDPNSrvSetNativeNDSContext

Sets the library's implicit name service to NDS® and defines the context variable to be used in all implicit references to name service objects

Local Servers: nonblocking
Remote Servers: blocking
NetWare Server: 4.11, 5.x
Platform: NLM, Windows 95, Windows 98
Service: Distributed Print


Syntax

#include <nwdp_nsr.h>  

N_EXTERN_LIBRARY (nint) NWDPNSrvSetNativeNDSContext (
NWDPAccessorRef accessorRef,
nuint32 contextHandle);


Parameters

accessorRef

(IN) Specifies the NWDPAccessorData structure whose fields are accessed by using the provided error macros.


contextHandle

(IN) Specifies the NDS context handle created by calling NWDSCreateContextHandle.


Return Values

0x00000000

N_SUCCESS

0x00000001

NWDP_RC_WARNING

0xFFFFFFFE

NWDP_RC_INVALID_ACCESSOR

0xFFFFFFFF

N_FAILURE


Remarks

You must be logged in and authenticated to call NWDPNSrvSetNativeNDSContext.

IMPORTANT:  Take care when altering the contents of the NDS context after calling NWDPNSrvSetNativeNDSContext because all Distributed Print Services functions depend on this same value. No information other than the value of the contextHandle parameter is preserved in the structure referenced by the accessorRef parameter.

Since the library has a unicode interface for all strings, NWDPNSrvSetNativeNDSContext turns off DCV_XLATE_STRINGS for the passed contextHandle, if it is set. Also, NWDP_RC_WARNING is returned with libError set to NWDP_LE_NSRV_CONTEXT_XLATE_SET. If DCV_XLATE_STRINGS has already been turned off from the context handle, N_SUCCESS is returned.

If NWDPNSrvSetNativeNDSContext returns N_FAILURE, the NWPDLibErrorMac (accessorRef) contains the following:

0x01000001L NWDP_EC_INVALID_PARAMETER
0x01000005L NWDP_EC_NDS