Novell is now a part of Micro Focus

Developer Pointers

Articles and Tips: article

01 Jan 1999


Novell Technical Information Documents

All of the Technical Information Documents (TIDs) discussed below are available at the following locations:

  • The Novell Technical Solutions Database on CompuServe (GO NTID)

  • The DeveloperNet Support World Wide Web site( http://devsup.novell.com)

  • The DeveloperNet Support Bulletin Board (801-861-5836)

Set Broadcast to Polling Mode under Windows NT


Author:

EEK

Document ID:

TID101999

Date:

1998/11/17 5:51 PM

Alert status:

Yellow

Information type:

Issue

Readme for:

IMSGE001.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

With Novell's NT Client, when calling NWSetBroadcastMode to set the workstation's broadcasting mode to poll, NWSetBroadcastMode needs to be called twice in order for the messages to be successfully retrieved later. send.exe utility exhibits the same behavior.

This should be fixed in the future client releases.

Detailed Description

With Novell's Windows NT Client:

If you want to set the workstation's broadcasting mode to poll using send.exe, you type "SEND /A=P", and any messages received by the workstation can be retrieved by typing "SEND /P". However, with Novell's NT Client, you need to type "SEND /A=P" twice in order to successfully set the broadcasting mode to poll.

When using the NWSetBroadcastMode API, you need to call it twice also.

e.g. NWSetBroadcastMode(connHandle, 0x0003) //This needs to be called twice.

WSASetService Returns Error Code 10022


Author:

EEK

Document ID:

TID101998

Date:

1998/11/16 3:38 PM

Alert status:

Yellow

Information type:

Issue

Readme for:

IWS2E004.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Detailed Description

When doing SAP name space (NS_SAP) registration using WinSock 2 API, it is possible that you get error code 10022 (Invalid argument) or 10049 (Cannot assign requested address) return from WSASetService. In this case, check to see if SOCKET_ADDRESS structure's iSockaddrLength field is set to sizeof(SOCKADDR_IPX). When you set iSockaddrLength to sizeof(SOCKADDR) and with WSAQuerySet's dwNameSpace field set to NS_SAP, WSASetService returns 10022 or 10049 with Novell's SAP provider. In general this is considered an error. However, since sockaddr_ipx is 14 bytes and programmers (incorrectly) expect sockaddrs to be a minimum of 16 bytes, Novell's SAP provider should still be able to accept the value, but reduce it to 14 bytes internally. This should be fixed in the future client releases.

Registering a Service in SAP Name Space using WinSock 2 API


Author:

EEK

Document ID:

TID101997

Date:

1998/11/13 5:08 PM

Alert status:

Yellow

Information type:

Issue

Readme for:

XWS2E007.EXE

Novell product class:

NetWare API

Novell product and class:

NetWare NDK 1.0

Category:

none

Compiler:

Watcom C 11

Target OS:

Windows 95

Abstract

This program is intended to create a service named "SetService" and add it to the SAP name space.

Sample code simple method to copy leaf object in DS tree


Author:

RLE

Document ID:

TID101995

Date:

1998/11/11 7:05 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

DSCOPY.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

DSCOPY.C is a sample code which shows how DS leaf object can be easily copied in three steps from SOURCE to DESTINATION using existing NWDS() calls.

Detailed Description

DSCOPY.C is a sample code which shows how DS leaf object can be easily copied in three steps from SOURCE to DESTINATION using existing NWDS() calls:

  1. First source object is saved using NWDSBackupObject().

  2. Next source object is moved to the new location using NWDSMoveObject() or in case newly created object is in the same container as the source source object is renamed using NWDSModifyRDN().

  3. Finally source object is restored using NWDSRestoreObject().

You should be aware that applying this simple method of copy on a DS leaf object, any assignments of the source object which are part of another object may be somehow affected.

This program utilizes existing DS connection and default DS tree.

DS synchronization issue should be considered when implementing this approach into non-trivial DS tree. Password/security issue should also be considered when using NWDSBackupObject() and NWDSRestoreObject() function.

Name Space Independence Search with WinSock 2


Author:

EEK

Document ID:

TID101993

Document Revision:

L

Date:

1998/11/9 12:21 PM

Alert status:

Yellow

Information type:

Issue

Readme for:

XWS2E002.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

The sample program fssrch.c does a lookup for NetWare file servers in SAP and SLP.

The NLM program will only work on NetWare 5 platform at this time.

Detailed Description

This program is intended to show how to obtain name space independence with WinSock.

The example is intended to find NetWare file servers in either IPX or IP Networks. The name spaces NetWare uses are SAP for IPX and SLP for IP. However, as this program will show, it is not necessary to know before hand which name space is loaded in order to find file server names and addresses.

VB sample code which demonstrates NWCONN ActiveX DLL library usage.


Author:

RLE

Document ID:

TID101986

Date:

1998/11/6 10:39 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

VBACTUSR.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

Visual Basic 5.0

Target OS:

Windows NT 4.0 WKS SP3

Abstract

VB sample code which demonstrates NWConn ActiveX DLL library. Sample code shows how list of active connections (users) can be obtained from the server or how specific connection can be cleared.

Detailed Description

VB sample code which demonstrates NWConn ActiveX DLL library. Sample code shows how list of active connections (users) can be obtained from the server or how specific connection can be cleared.

This sample code demonstrates usage of ActiveX DLL library NWConnLib (the library file NWConn.DLL comes along with this sample code).

The NWConnLib library (which is mentioned as a temporary supplement for RAD developers to Novell's existing AxtiveX controls) is also available including source code as TID sample VBCONLIB at http://developer.novell.com.

You have to register NWConnLib library in your system prior to use it. For registration please use program REGSVR32.EXE

ActiveX DLL connection library (NWConn.dll) for RAD development


Author:

RLE

Document ID:

TID101985

Date:

1998/11/6 10:30 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

VBCONLIB.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

Visual Basic 5.0

Target OS:

Windows NT 4.0 WKS SP3

Abstract

This sample code is ActiveX DLL connection library written in Visual Basic. It provides several basic methods and properties for NW connection management in RAD environment.

Detailed Description

This sample code is ActiveX DLL connection library written in Visual Basic. It is intended as a (temporary) supplement to Novell's existing AxtiveX controls for RAD development.

This connection library offers several properties and methods to provide RAD support for active connection management:

  1. List of active connections on the selected server

  2. ClearConnection() method to clear selected active connection from the server

  3. SendMessage() method to send message to the selected active connection

  4. Connection's properties (login date/time, user ID, connection number, network number)

  5. Server properties (version and revision info, maximum connections, used connections, max. connections used)

These methods and properties are missing from the Novell's current version of ActiveX controls; they can be supplied only by direct DLL calls which is for theRAD developement unacceptable.

NWConnLib uses Novell's DLL calls. This means that 32-bit Novell client must be installed in order to use this library. Also this library must be registered in the system prior to be used. For registration please use program REGSVR32.EXE.

If you want to recompile the source code, you do not need to register the library, VB makes it for you!

The TID sample code VBACTUSR explains how to use this ActiveX DLL in Visual Basic environment.

This ActiveX DLL was tested in VB5 environment only.

NWAdmin Superceded by Admin32


Author:

BTO

Document ID:

TID101984

Date:

1998/11/6 10:22 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

NWADMIN.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare SDK 15.0

Category:

none

Compiler:

default

Target OS:

Windows 95

Abstract

NWAdmin95 still exists, but it has been superceded by ADMIN32 which can be found in the Win32 directory. Use Admin32 for everything as long as your running on NW5. Admin32 understands all the new calls.

Detailed Description

Problem: I installed Netware 5.0 with NDPS and started NWAdmin from my Windows 95 client. I get the error "The dynamic link library NLSMGR95.DLL cannot be located or corrupted." After this error I get another error which says NDPS support will be disabled. I still get the NWAdmin window but I could not create NDPS manager and NDPS printer objects.

The NWAdmin was working properly with Netware 4.11 with NDPS support. I was able to create NDPS printers.

Resolution: NWAdmin95 still exists, but it has been superceded by ADMIN32 which can be found in the Win32 directory. Use Admin32 for everything as long as your running on NW5.

Admin32 understands all the new calls and loads all the necessary DLL's.

Connects to server calls NWGetNSEntryInfo and NWGetObjectName


Author:

CMI

Document ID:

TID101983

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

CMGETOWN.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

Assuming the user is already logged and authenticated to the server, this program establishes a connection. Then it calls NWGetNSEntryInfo to get the creatorID to pass into NWGetObjectName. The program then returns the object name which is the owner of the specified file.

Using Cross Platform APIs For Protocol Independent Address


Author:

SPE

Document ID:

TID101982

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

XXPLAT01.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

OPENCON2.C is based on the shipping sample code with changes to print out the server's address for NetWare 5 using IPX or IP.

Detailed Description

OPENCON2.C is based on the shipping sample code with changes to print out the server's address for NetWare 5 using IPX or IP. This is the most "generic" call to use for getting addresses in a protocol independent manner, if there is an open connection.

If there is not an open connection, another approach is to query DS for this information.In this case, call NWDSRead() of the NCP Server object that describes the server. The attribute to read is "Net Address"; the syntax is roughly described as {addrType,addrLen, addr} and is multi-valued. On a NetWare 5 server, the IPX and/or IP address will be included. Previous versions of NetWare will have IPX address only.

Sample code DS schema management using NWDir ActiveX controls


Author:

RLE

Document ID:

TID101981

Document Revision:

B

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

VBSCHEMA.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

VBSCHEMA is a sample VB code which demonstrates how to use Novell's ActiveX controls NWDir for DS schema management in VB environment.

Code shows how existing layouts and field types can be retrieved from DS schema, new layouts and fields can be created or existing layouts and fields can be removed from DS schema.

Detailed Description

VBSCHEMA is a sample VB code which demonstrates how to use Novell's ActiveX controls NWDir for DS schema management in VB environment.

Code shows how using this ActiveX controls existing layouts and field types can be retrieved from DS schema, new layouts and fields can be created or existing layouts and fields can be removed from DS schema.

We suppose user is already DS authenticated NWSess ActiveX controls are used in this sample to retrieve all available authenticatedDS trees.

Sample code has basic error handling implemented.

Notice that latest version of NWDir ActiveX controls (release 2) has in comparison to DS schema APIs only limited functionality.

It for example does not allow you to create and/or modify all existing layout and fields flags.

VB sample code which demonstrates how to use NWVolAdm when searching for a file/dir


Author:

RLE

Document ID:

TID101980

Document revision:

B

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

VBFINDER.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

VB sample code which demonstrates how to use Novell's ActiveX controls NWVolAdm when recursively searching for an existing/deleted file or for a directory on NetWare volume.

Detailed Description

VB sample code which demonstrates how to use Novell's ActiveX controls NWVolAdm when recursively searching for an existing/deleted file or for a directory on NetWare volume. We suppose that user is already authenticated. NWSess controls are used in this sample code to retrieve all connected NetWare volumes. No error handling is implemented to keep the code simple.

VB sample code DLL calls for DS search


Author:

RLE

Document ID:

TID101979

Document Revision:

B

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

VBDSSRCH.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

Sample code which demonstrates how to use DLL function calls in VB when searching DS tree for an object. We suppose user is already DS authenticated. No error handling is implemented to keep the code simple.

Detailed Description

Sample code which demonstrates how to use DLL function calls in VB when searching DS tree for an object. We suppose user is already DS authenticated. No error handling is implemented to keep the code simple.

VB sample code using NWDir and NWSess ActiveX components


Author:

RLE

Document ID:

TID101978

Document revision:

B

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

VBADMIN4.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

Sample code which demonstrates how to use Novell's ActiveX controls NWDir for DS management in VB environment.

Detailed Description

Sample code which demonstrates how to use Novell's ActiveX controls NWDir for DS management in VB environment. This is the fourth part of more complex sample code (see comments below about each part).

We suppose user is already DS authenticated NWSess ActiveX controls are used in this sample code to retrieve all connected/authenticated DS trees. No error handling is implemented to keep the code simple.

Part I. vbadmin1 Example demonstrates how existing objects can retrieved from DS and put into well-arranged picture-tree view.

Part II. vbadmin2 Added code which demonstrates how multi-valued attributes(fields)can be retrieved from DS and presented in readable form.

Part III. vbadmin3 Added code which demonstrates how single-valued or multi-valued attributes(fields) can be edited and changed: Network Address Restriction, Password change, Login script modifications, Full name, Telephone Number, Facsimile Telephone Number

Part IV. vbadmin4 Added code which demonstrates how single-valued or multi-valued attributes(fields) can be edited and changed: rename object (CN),other names (hidden in CN attribute), Group Membership

Part V. vbadmin5 Added code which demonstrates how objects in DS can be created or removed.

VB sample code using NWDir and NWSess ActiveX components


Author:

RLE

Document ID:

TID101977

Document revision:

B

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

VBADMIN3.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

Sample code which demonstrates how to use Novell's ActiveX controls NWDir for DS management in VB environment.

Detailed Description

Sample code which demonstrates how to use Novell's ActiveX controls NWDir for DS management in VB environment. This is the third part of more complex sample code (see comments below about each part).

We suppose user is already DS authenticated NWSess ActiveX controls are used in this sample code to retrieve all connected/authenticated DS trees. No error handling is implemented to keep the code simple.

Part I. vbadmin1 Example demonstrates how existing objects can retrieved from DS and put into well-arranged picture-tree view.

Part II. vbadmin2 Added code which demonstrates how multi-valued attributes(fields)can be retrieved from DS and presented in readable form.

Part III. vbadmin3 Added code which demonstrates how single-valued or multi-valued attributes(fields) can be edited and changed: Network Address Restriction, Password change, Login script modifications, Full name, Telephone Number, Facsimile Telephone Number

Part IV. vbadmin4 Added code which demonstrates how single-valued or multi-valued attributes(fields) can be edited and changed: rename object (CN),other names (hidden in CN attribute), Group Membership

Part V. vbadmin5 Added code which demonstrates how objects in DS can be created or removed.

VB sample code using NWDir and NWSess ActiveX components


Author: RLE

Document ID:

TID101976

Document revision:

C

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

VBADMIN2.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

Sample code which demonstrates how to use Novell's ActiveX controls NWDir for DS management in VB environment.

Detailed Description

Sample code which demonstrates how to use Novell's ActiveX controls NWDir for DS management in VB environment. This is the second part of more complex sample code (see comments below about each part).

We suppose user is already DS authenticated NWSess ActiveX controls are used in this sample code to retrieve all connected/authenticated DS trees. No error handling is implemented to keep the code simple.

Part I. vbadmin1 Example demonstrates how existing objects can retrieved from DS and put into well-arranged picture-tree view.

Part II. vbadmin2 Added code which demonstrates how multi-valued attributes(fields)can be retrieved from DS and presented in readable form.

Part III. vbadmin3 Added code which demonstrates how single-valued or multi-valued attributes(fields) can be edited and changed: Network Address Restriction, Password change, Login script modifications, Full name, Telephone Number, Facsimile Telephone Number

Part IV. vbadmin4 Added code which demonstrates how single-valued or multi-valued attributes(fields) can be edited and changed: rename object (CN),other names (hidden in CN attribute), Group Membership

Part V. vbadmin5 Added code which demonstrates how objects in DS can be created or removed.

VB sample code using NWDir and NWSess ActiveX components


Author:

RLE

Document ID:

TID101975

Document revision:

D

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

VBADMIN1.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

Sample code which demonstrates how to use Novell's ActiveX controls NWDir for DS management in VB environment.

Detailed Description

Sample code which demonstrates how to use Novell's ActiveX controls NWDir for DS management in VB environment. This is the first part of more complex sample code (see comments below about each part).

We suppose user is already DS authenticated NWSess ActiveX controls are used in this sample code to retrieve all connected/authenticated DS trees. No error handling is implemented to keep the code simple.

Part I. vbadmin1 Example demonstrates how existing objects can retrieved from DS and put into well-arranged picture-tree view.

Part II. vbadmin2 Added code which demonstrates how multi-valued attributes(fields)can be retrieved from DS and presented in readable form.

Part III. vbadmin3 Added code which demonstrates how single-valued or multi-valued attributes(fields) can be edited and changed: Network Address Restriction, Password change, Login script modifications, Full name, Telephone Number, Facsimile Telephone Number

Part IV. vbadmin4 Added code which demonstrates how single-valued or multi-valued attributes(fields) can be edited and changed: rename object (CN),other names (hidden in CN attribute), Group Membership

Part V. vbadmin5 Added code which demonstrates how objects in DS can be created or removed.

VB sample code using NWDSWhoAmI() DLL call


Author:

RLE

Document ID:

TID101974

Document revision:

B

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

VBWHOAMI.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

Sample code which demonstrates how to use DLL function calls in VB when calling NWDSWhoAmI(). We suppose user is already DS authenticated. No error handling is implemented to keep the code trivial.

Detailed Description

Sample code which demonstrates how to use DLL function calls in VB when calling NWDSWhoAmI(). We suppose user is already DS authenticated. No error handling is implemented to keep the code trivial.

Use JNDI to access NDS (samples in November 1998 Developer Note)


Author:

MMA

Document ID:

TID101973

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

XJNDIDEV.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

Samples to list, search, read, add NDS objects and to extend the schema.

Detailed Description

JNDIListObjs list objects

JNDICreateSubctx add NDS objects

JNDIGetattrs read specified attributes and their values

JNDIGetAllAttrs read all attributes of an entry

JNDISearch search NDS objects

JNDIExtSchema extend NDS schema (add a custom attribute and a class)

Detail documentation of these code can be found in Nov 98 Developer Note article titled "Using Java Naming and Directory Interface (JNDI) to develop Novell Directory Services enabled applications"

Delphi Sample: Find and Fix Directory Map Objects


Author:

WSC

Document ID:

TID101972

Date:

1998/11/5 10:54 AM

Alert status:

Yellow

Information type:

Issue

Readme for:

D3MAPOBJ.EXE

Novell product class:

NetWare API

Novell product and version:

NetWare default

Category:

none

Compiler:

default

Target OS:

default

Abstract

This application was written as a fix to the problem that occurred if a server that is referenced by a map object is moved to a different container, and later deleted.

Since NWAdmin would not update the 'Host Server' attribute of the Directory Map object, you might get invalid mappings.

The program verifies that the 'Host Server' property matches the 'Path' attribute, and updates the 'Host Server' attribute on request.

The program verifies all directory maps in a subtree in or below a given context:

  • It will read the 'Host Server' attribute of the Directory Map objects.

  • It retrieves the 'Path' attribute of the Directory Map object

  • It extracts the Volume object from the path

  • It retrieves the 'Host Server' attribute of the volume object

  • It compares 'Host Server' of the Volume with the 'Host Server' of the Directory Map

  • In case of a mismatch it asks if an update of this object is desired.

More general, this sample Delphi program shows how to...

  • read and update NDS objects

  • use the predefined high-level NDS APIs from Delphi_U.PAS to ease NDS development

  • easily browse through containers and get NDS object info

  • store NDS objects into lists

  • easily call recursive procedures for all or selected objects

It also serves as an illustration how easy NDS development is, once some higher level procedures are setup.

General information on how to use Delphi with the NetWare SDK can be found in the HOW-TO.DOC file.

To run the application, you should have the NetWare client software installed and need access to the 16 bit or 32 bit NetWare DLLs as provided in the NetWare Client software:

CALWINxx.DLL
NETWINxx.DLL
CLXWINxx.DLL
LOCWINxx.DLL

where xx stands for '16' or '32'


NetWare SDK used:

NDK Oct 98

Platform:

Windows Win95

Compilers:

Borland Delphi 3.x

Though it was not written for Delphi v1.x (16bit), it could be converted with only minor modifications.

Functions used:

NWDSGetContext
NWDSSetContext
NWDSAllocBuf
NWDSInitBuf
NWDSPutChange
NWDSPutAttrVal
NWDSModifyObject

High-level Functions:

DoSomethingForEachObject2
DSListAddContainersAndObjects
DSGetAttributeAsString


Disclaimer

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