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
#include <nwdp_nsr.h>
N_EXTERN_LIBRARY (nint) NWDPNSrvSetNativeNDSContext (
NWDPAccessorRef accessorRef,
nuint32 contextHandle);
(IN) Specifies the NWDPAccessorData structure whose fields are accessed by using the provided error macros.
(IN) Specifies the NDS context handle created by calling NWDSCreateContextHandle.
0x00000000 |
N_SUCCESS |
0x00000001 |
NWDP_RC_WARNING |
0xFFFFFFFE |
NWDP_RC_INVALID_ACCESSOR |
0xFFFFFFFF |
N_FAILURE |
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: