Get SupportDownload SoftwareGo ShoppingContact Us
Log-In Log-Out
 














 
Last Updated
 
Course Home Download NLM.exe 96KB

An NLM That Creates a Class In NDS

So now we have a way to communicate. Let's talk about NDS. Directories have become popular because of the large amount of information that is needed on individuals and equipment attached to a network. Since NLMs and NDS were developed on the same Operating System and within Novell, they communicate faster than any other method. So if you need fast access to the directory, you need to write an NLM. Lets look at an NLM example that creates a class in NDS. This is an advanced example. Reading and writing to NDS is also in this code example that you can download.

Start CodeWarrior and "Open Recent" project Bookmark.mcp.

Bookmark.mcp Project

Click on the Target setting ICON in the project screen.

The Target icon looks like this:

Target icon

Click on NLM Target.

You should see the following:

NLM Target settings

Rename the NLM to BookMark.NLM in the target setting in CodeWarrior.

Close the Generic NLM Build Setting window.

Build BookMark.NLM with the F7 key in CodeWarrior.

Copy Bookmark.nlm to the server's "\system" directory.

I will not explain this code in detail. You will only run the code in this example. I will walk through the code in the NDS.NLM example. I want you to focus on what is happening in NDS.

void CreateClass(NWDSContextHandle con)
{

We need to have the context that we are going to create the class in.

cCode = NWDSBeginClassItem(con, classBuf)) 

Use the NWDSBeginClassItem API to create an area for building the user Class.

cCode = NWDSPutClassItem(con, classBuf, "Top")
cCode = NWDSPutClassItem(con, classBuf, "Organization")
cCode = NWDSPutClassItem(con, classBuf, "CN")

Then add Common Name to the class. The class will be of type Organization from Top. Top and Organization are NDS types. We will use ConsoleOne to view this data upon completion.

printf("Bookmark Class added.\n");

The print statement shows that you have completed the bookmark class creation.

Get the context name for the server by typing the following command on the server:

config

On the server type:

Load Bookmark



Login using .admin.organization. For example, your server may have a context of Novell. You would type .admin.novell and press return. Use the password for admin. The password is specific for your server.

ConsoleOne exists on the server. ConsoleOne should have already been installed on the client from the NDK.

Using ConsoleOne, we verify that the bookmark class has been created.


Select Schema Manager from ConsoleOne.

ConsoleOne Tools menu

Look for Test:Bookmark in Schema Manager.

Schema Manager window

Now, you should be ready to code an NDS NLM.


Last updated on:

Course Home Download NLM.exe 96KB