NDS Context Handles in NDPS Libraries
Articles and Tips: tip
01 May 2002
The Novell Client32 uses a series of libraries to support printing (DPAWIN32.DLL, DPLWIN32.DLL, DPPWIN32.DLL, DPSWIN32.DLL, and DPLRNAME.DLL). The Windows 2000/NT client v4.83 and the Windows 9x client v3.32 updated these libraries. One of the new features of these libraries is to periodically destroy the NDS context handle. Symptoms include an error 303 indicating a DS error, or all access to NDPS objects in the directory may cease, or NWAdmin may GPF (General Page Fault).
In an NWAdmin snap-in, the solution is to determine if the NDS context handle that you received from NWAdmin is valid by using NWDPNSrvGetNativeNDSContext.Invalid context handles return a -1. If it is valid, save the NDS context handle, then create a new NDS context handle for your own use with NWDSCreateContextHandle. You can then use this handle by calling NWDPNSrvSetNativeNDSContext with your new NDS context handle.
When your snap-in is shutting down (that is, in the destructor), free the NDS context handle that you created for your own use. Then restore the original context handle.
* Originally published in Novell AppNotes
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.