Novell is now a part of Micro Focus

Overview of Novell's DeveloperNet2000 ActiveX Controls, Part 2

Articles and Tips: article

DeveloperNet2000 Engineer Manager
Developer Services Division

01 Feb 1997

Describes a set of software components intended to be used by programmers on the Win32 desktop platform who need to interface with Novell NetWare Services. Part 2 of a two-part series.


This DevNote (the second in a two-part series) describes a set of software components intended to be used by programmers on the Win32 desktop platform who have a need to interface with Novell NetWare services. This is a working specification that is subject to change.

Part 1 (Novell Developer Notes, Nov. 1996, p. 28) covered the following topics: changes from previous OCX controls, network session control, and directory control.

NWVolumeAdmin Control (NWVolAdm)

Description: This control is a non-visual interface to facilitate the management of network volumes by a network admistrator.

As an example of how to use the control, consider the case where the admistrator wishes to increase the disk space available to all current users:

// Increase available space for users of UTH-DEV1_SYS volume


   UNCName = NWSession1.ConnectedVolumes("uth-dev1_sys")

   NWVolAdm1.FullName = UNCName;

   for each UsrLimit in NWVolAdm1.UserSpaceLimits

      UsrLimit.ChangeTotalSpace( +2048 );



booleanLoad( void )

Mountthis volume on its corresponding server, thus making it generally available on thenetwork. Note that while a volume is in the unmounted state, its attributes cannot bequeried correctly (?)

booleanUnload( void )

Causethe server to dismount this volume




NDSdistinguished name of this volume



Relativedistinguished name of this volume



Totaldisk space available on this volume



Utilizeddisk space that is free on this volume



Diskspace that could be freed up on this volume



Totalamount of bad disk space on this volume



Dateand time of last modification on this volume



Volumecan be removed (e.g., CD ROM drive)



Isthe volume mounted at its server ?



Installedname spaces on this volume



Per-userdisk restrictions on this volume

NWUserSpaceLimit Object

Description: Users restricted in use of disk space will be represented as instances of the UserSpaceLimit object. Users can be individually managed and their disk space limitation increased or decreased. Note that all disk space measurements are in KBytes.


boolean ChangeTotalSpace(ChangeAmount)

Attempt to increase/decreasedisk space limit




User name



Currentdisk space limitation for this user



Diskspace currently used by this user

NWUserSpaceLimits Iterator

Description: Iterates the UserSpaceLimit objects that are present for a given volume. Note that the only way to create a new UserSpaceLimit is to use the Add method of this iterator; it is invalid to attempt to use CreateObject to instantiate a new NWUserSpaceLimit object.

Non-standard methods:

UserSpaceLimit*Add( User, TotalSpace )

Adda new disk restriction

void Remove( User )

Removean existing disk restriction

NWServerAdmin Control (NWSrvAdm)

Description: A control that allows a network administrator to manage a NetWare server remotely from a custom application written using a RAD tool such as Visual Basic or Delphi.


booleanExecuteProfile( NCFFileName )

Runthe given NCF file on this NetWare server

booleanLoadNLM( NLMName, Parameters )

Loada given NLM module on this NetWare server

booleanUnloadNLM( NLMName )

Unloada given NLM module from this NetWare server

??boolean SetParameterValue( ParameterName, Value )

Seta server parameter (such as "Sound Bell ForAlerts") to the given value. For simplicity,the ParameterName string will be case insensitiveand will match the syntax used from the serverconsole.

??VARIANT GetParameterValue( ParameterName)

Getthe value of a server parameter and returnit to the caller




NDSdistinguished name of this server



Relativedistinguished name of this server



What version of NetWare is being run ?



Company name



Total connections available to this server



Currently used connections to the server



TRUE if the server supports NDS

NWPrintQueueAdmin Control (NWPrtQAdm)

Description: The NWPrintQueueAdmin Control is used by the RAD programmer to view the contents and status of network printer queues, and also to add and remove print jobs from those queues by copying files into the queue directory or alternatively by capturing an LPT port. Possible uses of this control include monitoring who uses what print queue, average job sizes, re-prioritizing jobs in the print queue, and so on.

Each print job is merely a file (binary or text), with some attached print job information concerning how that item should be printed, whether a banner page is to be used and so on.

Note that the Print Server and Printer are not represented in this abstraction. This control is for management of print queues only and does not allow control over print servers and individual printers at this time.


void Update( void )

Update the contents of the print queue with itscurrent information. This method is called automatically at runtime when the UpdateIntervalparameter is set to a non-zero value.

boolean Hold( void )

Temporarily suspend printing from this print queue

boolean Resume( void)

Resume printing from this print queue

boolean BeginJob( LptPort )

Start capturing output from the given LPT portinto a new print job within this queue. Note that only one job can be captured at a time,so if this call is used again before EndJob or AbortJob has been called it will return FALSEl.

PrintJob* EndJob( )

Calling this method will mark the print job thatis being captured as being complete and will return a pointer to the PrintJob object thatwas created in the queue. Note that the PrintJob object will also be automatically added tothe PrintJobs enumerator.

void AbortJob( )

Abort the current print job and erase it from thisqueue.


void RefreshViews( void )

This method is called wheneverthe print queue information is re-checked, which can be due to an automatic or manualupdate operation.




NDSdistinguished name of this print queue



Relativedistinguished name of this print queue



Description of this print queue


PrintJobs [enumerated]

Print jobs that are in this queue



Number of milliseconds between auto updates



Server where this queue is located



Directory used for this queue on the host server



Default text to print on the banner page



Images to represent print jobs in the queue

NWPrintJob Object

Description: The per-job print settings for each print job are represented as individual PrintJob objects within the NWPrintQueueAdmin control.


boolean Hold( void )

Hold this print job

boolean Resume( void )

Allow this print job to be printed

boolean MoveAfter( Job )

Prioritize this job after the given job. This methodalso accepts the reserved values of JOB_FIRST and JOB_LAST to indicate that the print jobshould be moved to the head or tail of the print queue.




Imageto represent the job and its status



Time of printing



UserID of person who created the job



Status code (Printing, Queued, Held, etc.)



Description of the print job



Text to be printed on banner page



Number of copies



Size of the print job in bytes

NWPrintJobs Iterator

Description: Iterates the PrintJob objects that are present within a given queue. Note that new print jobs can be added using the Add method of this iterator; however, it is invalid to attempt to use CreateObject to instantiate a new PrintJob object.

Non-standard methods:

NWPrintJob*Add( FileName, &Index, ... )

Createa new print job in the queue from an existing file

void Remove( Index )

Remove an existing print job

void Purge( void )

Remove ALL print jobs from the queue

NWBindery Control (NWBind)

Description: The NWBindery Control is modelled after the richer set of functionality found in the NWDirectory Control. A user of the NWBindery and NWDirectory Controls should immediately notice that the programming model for both is identical. The only major difference is that the NWBindery is only single level instead of a hierachical tree.

Once again, individual objects within the NWBindery Control will be represented as a series of Entries, each of a specified Format. Note that the Format names used for Bindery classes will be clearly distinguished from NWDirectory class names by adding a preceding underscore.

The purpose of the NWBindery Control is to permit easy access to the legacy NetWare 3.x Bindery mechanism, but at the same time teach people the concepts used in the NWDirectory control.

Note:It is not possible to instantiate a Bindery object within the NWDirectory Control, nor vice versa. The two mechanisms work the same way, but are restricted to only containing entries that were designed to work with them. This of course reflects the fact that the NDS Directory and NetWare 3.x Bindery are not interoperable, and that one was derived from the other.


booleanEntryExists( FullName )

Testfor existence of an entry within the database

boolean Backup( void )

Create an archived backup of the Bindery database.

Boolean Restore( void )

Restore an old copy of the Bindery database


void EntryAdded( Entry )

An entry has been added to the database. Ifa visual view is currently displaying the items in the bindery, the entry should be added.

void EntryDeleted( Entry )

An entry has been deleted from the database.


Entries [enumeration]
Hierarchicallist of entries in the database


Filters [enumeration]

Which types of entry are enumerated



List of images used to represent services

Property Page User Interfaces

Note that each of the above controls will be required to support both the Property Page interface and the Property Browsing interface. This appears to only be a requirement because some containers do not permit per-property browsing-thus mandating the use of Property Pages on all cross-builder ActiveX Controls. Note that ActiveX Controls that don=t wish to operate in such containers can simply support per-property browsing, as seen with the built in controls used in Visual Basic.

This section of the document is intended to give a flavor for what the property page interfaces should look like, and is not exhaustive. Also note that each property page may also be used "individually" in per-property browsing-where some types of properties (such as the Context Name) may have to be edited using a pop-up dialog.

It is anticipated that programmers may actually start out hard-coding the Tree Name and Context Name at design time, and later set those fields dynamically at runtime once they are familiar with their meaning and operation and wishes to create an application that could operate in any NetWare network.

Figure 1: NWSession ActiveX Control.

This property page allows the programmer to customize the appearance of the Novell login dialog exposed by this control.

It is also possible to specify the server or tree information to be placed in the login dialog. Note that in normal use, such information would be specified at runtime (depending on what network the application is being run on). However some internal corporate IS developers may wish to hard-code the default tree and context names for their environment.

Figure 2: NWDirectory ActiveX Control.

The General Page of the NWDirectory Control settings notebook allows the programmer to pick the NDS tree that is to be analyzed and also to select the initial context within that tree.

When browsing multiple directory trees with the same NWDirectory Control, or using the control across many networks, these properties will only be specified at runtime.

Figure 3: The Filters page.

The Filters Page of the NWDirectory Control settings notebook contains a list of all the criteria that will be used when filling the entries within the tree.

Note that a criteria may simply refer to the Layout Type of the objects to be included - or alternatively a Layout Type plus one or more FieldName + Comparison + Value conditions as illustrated.

Once a list of criteria has been entered, the NWDirectory Control also needs to know whether the criteria set is inclusive or exclusive.

Figure 4: The Layouts page.

The Layouts Page of the NWDirectory Control settings notebook is for informational purposes only. It provides the programmer with a convenient way to analyze the content of the current directory trees' schema at design time.

Figure 5: NWVolumeAdmin ActiveX Control.

All of the Administration controls have the same basic property page that allows the programmer to associate them at design time with a particular instance of a volume, server, or print queue.

However, a more common use for these controls is in conjunction with the NWBindery or NWDirectory controls-to administer the attributes of a device that has been selected from a tree or bindery list.

Figure 6: NWBindery ActiveX Control.

The Filters Page of the NWBindery Control settings notebook allows the programmer to decide at design time which Bindery objects should be enumerated and which should not.

It is anticipated that this functionality will be used more frequently in the Bindery than in the NWDirectory, since the Bindery database lacks any hierarchical grouping of objects.

Figure 7: Bindery Control Properties.

The Layouts page of the NWBindery Control is for informational purposes only. It describes the fields present in each Layout that exists in the Bindery, along with the datatype(s) for each field.

Dialog User Interfaces

AddCriteria Dialog

The AddCriteria Dialog is used from both the NWDirectory and NWBindery Controls from both the Filters Page of the settings notebook and also from the per-property browsing dialog for the Filters property.

Figure 8: AddCriteria Dialog.

Note that a criteria can be defined that simply includes entries of a given Layout class.

Alternately, one or more tests can be created for instances of a given Layout class that can be combined together using a logical AND / OR operator.

* 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