Get SupportDownload SoftwareGo ShoppingContact Us
Log-In Log-Out
 














 
Last Updated
 
Course Home Download NLM.exe 96KB

Coding Example One

STARTING CODEWARRIOR

You should have a CodeWarrior IDE icon on your desktop after installing CodeWarrior. You should have installed the NetWare CD for CodeWarrior to develop NLMs. NLM.EXE should be installed at this time. Click on the CodeWarrior IDE icon to start CodeWarrior. CodeWarrior should be displayed.

ANOTHER HELLO WORLD APPLICATION

To create your first application, use your mouse to click on File in CodeWarrior.

Click on "New Project".

CodeWarrior interface

Click on the "+" next to NetWare.

New project dialog

Click on the "+" next to NLM.

Click on the "Generic NLM C" line.

New Project dialog with Stationary open at Netware/NLM

Click the "OK" button.

In the File Name window type "HELLO" and click the "Save" button.

CodeWarrior should now generate the Hello.mcp project.

Replace the Hello.mcp project if it already exists.

You can also bring up the project file using the "Open Recent" in the drop down.

Open recent drop down list

Click on the "+" next to Source.

Hello world project

Double click on HelloWorld.c to open the code.

You should see the following:

/*
 * Hello World for CodeWarrior
 * © 1998 Metrowerks Corp.
 *
 * Questions and comments to:
 * <mailto:support@metrowerks.com>
 * <http://www.metrowerks.com> 
 */

#include <stdio.h>

int main (void)
{
    printf ("Hello World from CodeWarrior!\n\n");
 
    return 0;
}

printf is imported from CLIB.NLM to process the request to the display.

The following should display when Load Hello is executed on the server:

Hello World from CodeWarrior

Build the NLM by pressing the F7 key. You could also click "Project" and then "Make" to build the project.

Now copy the file Hello.nlm from the hard drive on the client to the \system directory on the NetWare server. You may have to look for the Hello.nlm file to complete the copy.

On the NetWare server, type "Hello" to execute the program.

Note: On a NetWare 4 server, type "Load Hello" to execute the program.

You now have created a bug-free NLM. This is a simple example, but you should now understand how to create and load an NLM.


Last updated on:

Course Home Download NLM.exe 96KB