Novell is now a part of Micro Focus

Novell Directory Services Q & A

Articles and Tips: article

Developer Support Engineer
Developer Support

01 Oct 1996

Novell Directory Services Q & A

Q. In Release 8 of the Novell SDK, on the Known Problems And Inconsistencies sheet there is a comment about DSAPI.NLM file failure. What are the problems with this DSAPI.NLM and why shouldn't I use it?

A. The DSAPI.NLM, v4.10f, that shipped on our SDK Release 7 and Release 8 has several problems; most of these are connection oriented. For example, any of the APIs dealing with partitions, such as NWSDListParitions, can produce errors and not release the connection allocated by these calls.

There are two solutions to this problem.

  1. LIBUP9.EXE, which is Novell's first official release of Modular CLIB, will be available soon off of CompuServe or Novell's Web page (http://WWW.NOVELL.COM). This Modular CLIB has been verified to fix the problems introduced by DSAPI.NLM v4.10f. In addition, a current beta version of Modular CLIB is available on CompuServe, Novell's WEB page, the Devsup Bulletin Board, and Novell's FTP site as PLIB2.EXE.

  2. Obtain a copy of LIBUP8.EXE, from the sources listed above. This archive contains DSAPI.NLM v4.10d, which is the most stable DSAPI.NLM available. Beware of problems with LIBUP8.EXE. See the next question below.

Q. I have been running DSAPI.NLM v4.10d and CLIB.NLM v4.10h, both from LIBUP8.EXE. I have noticed that when my application calls NWDSSearch I get either a -322 or -642 error. I didn't get this error(s) when I ran an earlier version of CLIB.

A. DSAPI.NLM is dated 4-3-95. It is the last stable release of DSAPI.NLM prior to the Modular CLIB/DSAPI that is available in LIBUP9.EXE. CLIB v4.10h (4-15-96) is newer and contains some enhancements, specifically with connection flags that DSAPI.NLM can't deal with. This is the cause of the errors. Error -322 means the iteration handle, used by NWDSDearch, is invalid. Error -642 means the iteration handle currently being used is the wrong handle. The iteration handle is needed to perform multiple searches in NetWare Directory Services (NDS) for the current search. This iteration handle becomes invalid because CLIB v4.10h "forgets" that DSAPI.NLM has previously allocated a connection associated with the iteration handle and allocates a new connection. Thus, when NDS tries to reuse the iteration handle, one of the two errors previously mentioned is returned.

The best solution to fix this problem is to use the new Modular CLIB/DSAPI available in LIBUP9.EXE. This has been tested and resolves this problem.

Q. As an NLM, I am trying to log in to NDS using connection 0. This does not appear to work. What am I doing wrong?

A. As an NLM, running on a NetWare server, you have all rights to practically every service on the server using connection 0. However, NDS is another story. You can't access NDS using connection 0. As an NLM, you must log in and get authenticated to NDS much like a client is authenticated to NDS. Until an authenticated connection is established, the client or NLM can only access NDS information that is classified as public. NLMs must use NWDSLogin or NWDSAuthenticate. Attempting to authenticate with connection 0 will result in the error ERR_ATTEMPT_TO_AUTHENTICATE_0.

Q. I am loading DSEVENT.NLM (8/10/95) along with DSAPI.NLM (8/11/95). Then I run the sample code VENTCLIB.C, from the NetWare SDK Release 8, which traps an object create and object delete. At this point I am returned a "C..." I was expecting an object name. What is the problem?

A. The (8/1//95) version of DSEVENT.NLM has a problem correctly translating strings from the unicode format to ASCII format. DSEVENT.NLM treats the names in local code page format (ASCII) instead of the unicode page format. This accounts for the "C..." since the "C" is the first unicode character and the "." the second. The solution was to fix underlying functions to recognize the XLATE flags, which are flags that determine whether a string should be translated from ASCII to Unicode or the reverse. This problem has been fixed in the DSEVENT.NLM that will ship with Green River.

For now, before Green River ships, you can clear the XLATE string flag; however you will need to translate the name yourself. Call NWUnicodeToLocal to translate the string from the unicode format to the ASCII standard.

Q. I have extended the NDS schema; is it possible to delete the extension? For example, I have added the attribute "hobbies" to each user object. Can this be deleted?

A. It depends on how you have extended the schema. There are three main ways you can extend the schema:

  1. If you add a class, you need to remove all objects created from that class, then you can remove the class.

  2. If you added an optional attribute to a base schema class, you have to re-install NDS in order to remove the attribute.

  3. If you added an attribute to an object that is not a part of the base class, you need to remove all objects created from that class then you can delete the schema extension.

For the example in the question, since a user object is created from a base class, you can either reinstall NDS to remove the schema extension or if that isn't an option, the schema extension can't be removed.

Q. I have an application that depends on NetWare Directory Services NDS Event Services (DSEVENTS). With two possible configurations of DSEVENTS, the older DSAPI.NLM which included DSEVENT functionality, and the newer DSEVENT.NLM which has the functionality broken out of DSAPI.NLM, how can I insure that I am guaranteed DSEVENT functionality in both cases?

A. Do the following:

  1. Call the API ImportSymbol, passing in a unique DSEVENT symbol such as one of the DSEVENT functions. For example, NWDSEREGISTERFOREVENT.

  2. If ImportSymbol returns non-zero, then either DSAPI.NLM with DSEVNET functionality built in (dated earlier than 8/11/95) is loaded, or DSEVENT.NLM (8/10/95 or later) along with DSAPI.NLM (8/11/95 or later) is loaded.

  3. If ImportSymbol returns 0, then DSAPI.NLM is dated 8/10/95 or later. Load DSEVENT.NLM.

  4. Call ImportSymbol one more time to ensure that DSEVENT.NLM loaded correctly.

Copyright 1996 by Novell, Inc. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, for any purpose without the express written permission of Novell.

All product names mentioned are trademarks of their respective companies or distributors.

* 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.

© Copyright Micro Focus or one of its affiliates