JumpStart on the Net2000 Novell Directory Services ActiveX Controls
Articles and Tips: article
Senior Research Engineer
Novell Systems Research
01 May 1996
This DevNote provides an introduction to Novell's Net2000 ActiveX Controls released as a proof-of-concept on the Net2000 JumpStart CD. We introduce the three Net2000 Directory Services ActiveX Controls found in NWDIRSRV.OCX, one of the four OCX files previewed on the JumpStart CD. The NDS controls featured are NDSObjBrowser, NDSMethods, and NDSObjList. Installation, setup, and usage are described. This DevNote provides a quick preview for developers using tools that support ActiveX Controls as to what capabilities exist within the Novell controls. Developers involved in the planning and construction of network utilities or applications that are NDS aware will benefit from this DevNote. A release of the Net2000 SDK is planned for the October 1996, Professional Developers Conference on Net2000.
- Introduction
- Software Components
- Installation and Setup
- Novell NDS Controls
- NDS Object Browser: NDSObjBrowser
- NDS Object List: NDSObjList
- NDS Methods ActiveX Control: NDSMethods
- Common Result Codes
- Summary
Introduction
Code reusability has been the holy grail of the software development community for decades. Object-oriented development and related component architectures are at last providing a foothold on delivering code reusability. Objects and components encapsulate everything from sophisticated to mundane code in neat little packages for reuse. Anything from 10 to tens-of-thousands of lines of code can be encapsulated in a single component. Novell recently previewed a set of controls that expose network services at the client in the form of ActiveX Controls, formerly known as OLE Custom Controls or OCX.
This DevNote describes the Novell Directory Services ActiveX Controls supplied with various other controls previewed on the Novell Net2000 Jump Start CD-ROM. (See the accompanying article on the JumpStart CD for more information on the Net2000 JumpStart CD.)
We start off by providing a description of software component technology focusing specifically on ActiveX Controls. We then cover the basic steps for getting the Directory Services ActiveX Controls ready for use in Visual Basic 4.0, with a note on Delphi 2. Installation, registration and adding the controls to the Visual Basic and Delphi control palettes are detailed. The remainder of the DevNote provides the current specification for the NDS ActiveX Controls, including each of its control's properties, events, and methods. Also included is a list of error return values know as common result codes. These result codes are used to aid in the error handling for all of the controls, thus consolidating error handling for the entire set.
This DevNote provides a quick preview for developers using tools that support ActiveX components as to what capabilities are offered within the controls. Developers involved in the planning and construction of network utilities, applets, or applications who desire to make them "NDS aware" will benefit from this DevNote.
Note: The Net2000 ActiveX Controls were distributed in pre-release form and cannot be used to develop any commercial applications until officially released. These controls have only been tested on Windows 95 with the Novell Client 32 for Windows 95. The release versions of these controls will support both Windows 95 and Windows NT. The contents, sample code, and developer tools contained on the JumpStart CD are subject to change and will be enhanced throughout 1996. A Net2000 SDK is planned for the October 1996 Professional Developers Conference.
Software Components
The industry has devoted considerable attention to the area of software components. Like their hardware cousins, software components providemanufactured or pre-built, higher level access to underlying functionality and interfaces.
Components are often created using existing C and C++ APIs that expose services at a more granular level. Components from a systems vendor such as Novell will rarely, if ever, eliminate the need for high quality underlying APIs. Traditional APIs, and newer APIs in the form of object frameworks, will still be used for the development of applications and utilities, in addition to being used for the development of components.
Components offer many advantages over traditional development techniques, such as allowing for specialization. Developers not well versed in a certain area of development can use a component created by a specialist. Components also dramatically decrease the length of time required for development. Development cycles once measured in years can now be measured in weeks.
Additionally, the value of a component is leveraged if it can be "consumed" by more than one tool. ActiveX Controls are supported or consumed by a variety of tools, including Microsoft Visual Basic Version 4, Borland Delphi Version 2, and Microsoft Visual C++ Version 4. Offering exposure of NetWare and network services as ActiveX Controls makes those services available to millions of developers.
Note: Those interested in AppWare and ALM technology may want to visit Network Multimedia's home page at http://www.networkmutlimedia.com or contact them by phone at (801) 261-8232. Network Multimedia is a spin-off from Novell that continues to improve upon AppWare, a high-level, visual, event-driven environment for Windows and Macintosh that provides a truly visual paradigm for development of network solutions. Network Multimedia is focusing the AppWare environment and future ALM development on networking. They currently have a set of ALMs that provide similar functionality to the ActiveX controls previewed on the JumpStart CD.
ActiveX Controls
ActiveX controls, formerly know as OLE Custom Controls or OCX, are replacements for their predecessors, Visual Basic Custom Controls or VBX used in older versions of Visual Basic and other tools supporting VBX. VBX controls are essentially obsolete given that if you desire to develop for Windows 3.1, 16-bit ActiveX Controls are now typically used as replacements for their VBX predecessors as long as they are provided by the control's developer.
Note: The ActiveX Controls provided on the JumpStart CD are 32-bit only.
Components-To GUI or Not to GUI
Due to the desktop-centric view of the universe that most tool vendors have had since the introduction of software components on PC platforms, one could argue that "control" is a poor choice of terminology for describing components.
Most of the controls initially available were visual elements such as buttons, list boxes, and tables. For network computing, many components have no GUI and don't require one. Even if it is desired that controls have GUI elements, component designers should consider providing the GUI elements as optional. This provides more flexibility and opens doors for creativity. If a control exposes server functionality at the client, or runs on a server, console-type interfaces will probably be the only interfaces desired.
A good example of a control with no GUI is the NDS Methods ActiveX Control previewed in this DevNote. It provides "one-liner" access to methods for changing passwords, getting and setting NDS object attributes, etc. As true network applications and application partitioning become more common, much of the logic for applications will be developed with "controls" that have no GUI. Entire partitions will often be "GUIless"; yet, developers will still benefit greatly from higher level tools that consume components.
The remainder of the DevNote covers the specifics of the installation, setup, and usage of the ActiveX Controls found in NWDIRSRV.OCX.
Installation and Setup
Getting started with the Net2000 ActiveX Controls is a three step process:
Install the components onto your hard disk from the CD.
Manually register the components in the Win95 System Registry (necessary for this release).
Add the controls to the palette of the tool you plan to use.
Requirements
The ActiveX Controls discussed in this DevNote were distributed in pre-release form and cannot be used to develop any commercial applications until officially released. These controls have only been tested on Win95 with the Novell's Client 32.
The release versions of these controls will support both Win95 and Windows NT. Only 32-bit ActiveX Controls were included; therefore, 32-bit platforms and tools that support 32-bit ActiveX Controls are required, such as Delphi for Win95 and Windows NT Version 2.0 or Visual Basic Programming System for Windows 32-bit Version 4.0. Other tools such as MS Visual C++ 32-bit Version 4.1 will also support the use of ActiveX Controls but have not been tested with controls discussed in this DevNote.
Installing the ActiveX Files to Your Hard Disk-Run SETUP.EXE
You can install the Net2000 ActiveX Control files by running SETUP.EXE, found in the \NET2KCMP subdirectory on the Net2000 JumpStart CD. You can also load Setup from the Net2000 Browser program, NET2000.EXE found in the root directory on the CD. To run the setup program from the browser click on the Software button on the button bar at the bottom of the browser, as shown below.
Figure 1: Net2000 browser.
After pressing the Software button, you will see a list of software products available on the CD displayed in a hierarchical view.
Note: The Net2000 JumpStart CD Browser was developed using Borland's Delphi.
Double click on the Net2000 Sample Components list item to launch the setup program. Follow the directions provided in the Setup program to copy the OCX and related files to your hard disk. You are now ready to register the controls in the Registry.
Figure 2: Net2000 browser with hierarchical view.
Registering the Controls
Before the ActiveX Controls can be used, they must be registered within the Window's System Registry. In 32-bit Windows, the Registry now resides in the private system files replacing REG.DAT used for 16-bit systems.
Use REGSVR.EXEand REGSVR32.EXE utilities to manually register and unregister OLE servers, OLE DLLs, and ActiveX Controls (.OCX). Two batch files were provided on the JumpStart CD that call the program REGSVR32.EXE to register and unregister the ActiveX Controls. They are REGOCX.BAT andUNREGOCX.BAT. These files are installed to same directory as the .OCX files: \NET2000\CONROLS\. You can run REGOCX.BAT to register all four OCX files and the ActiveX Controls they contain or type the following at the command line to register only the NDS ActiveX Controls available in NWDIRSRV.OCX.
REGSVR32 /C NWDIRSRV.OCX
Usage for REGSVR32.EXE is as follows:
REGSVR32 [/U] [/S] [/C] OCXNAME
The /S flag is for silent-it will suppress messages. The /U is used to unregister a control; a /C option will allow for console output-the utility will display either a success or failure dialog box upon completion.
The last step required before using ActiveX Controls is to add them to the palette of the tool you plan to use.
Adding the NDS Controls to the Visual Basic Palette
To use the Net2000 ActiveX Controls for NetWare with Visual Basic, choose the Custom Controls item in the Tools menu. A list box will be presented which will contain all registered controls.
Figure 3: VB with custom controls.
Select the appropriate Net2000 controls, in this case at least the Novell NDS Controls. Then press the OK button. The Net2000 components will then be associated with the current project. The VB palette will contain these controls, once the project is saved, whenever you are working on the project. You must perform for each new project. Here is a look at the VB palette after adding the NDS Controls.
Figure 4: VB Palette with added NDS controls.
A Note on Adding Controls to the Delphi Component Palette
To use the Net2000 ActiveX Controls for NetWare with Delphi, choose the Install item on the Tools menu. When the OCX button is pressed, a list of registered ActiveX Controls will be presented. After reviewing and selecting from the information presented, press the OK button to add the selected controls. Repeat for all desired controls. After you add the desired ActiveX Controls, Delphi will rebuild the component library. You will only need to perform this step once.
Novell NDS Controls
The ActiveX Controls found in the file NWDIRSRV.OCX include NDSObjBrowser, NDSObjList, and NDSMethods. The next three sections provide the current specification for each NDS control.
NDS Object Browser: NDSObjBrowser
This ActiveX Control will provide a graphical selection and navigation utility for Novell Directory Services (NDS). This ActiveX Control will provide a similar interface to that available in the NWAdmin utility provided with NetWare 4 for network administration.
Properties
The following table lists the various stock properties supported by this control.
Property Name
|
Type
|
Description
|
Appearance |
stock |
Determinesif the control has a 3-D appearance. The supported values are: "0 - Flat"and "1 - 3D". |
BorderStyle |
stock |
Determinesif the control has a border. The supported values are: "0 - None" and "1- Fixed Single". |
Font |
stock |
|
hWnd |
stock |
Containsthe Window handle to the Windows 95 tree control window. |
The following table lists the various custom properties supported by this control.
PropertyName
|
Type
|
Description
|
AllowUp |
BOOL |
Determinesif the browser will allow the user to browseabove the initial NDS context. If this propertyis TRUE, the up arrow entry will be presentin the browser when the current context isanything other than [Root]. |
GraphicType |
short / enum |
Determinesthe type of graphic to be associated witheach item in the browser. Supported valuesare no graphic, small bitmap, and large bitmap. |
SortOrder |
short / enum |
Determinesthe sorting method to be used when orderingitems to be displayed in the control. Supportedvalues include: "0 - No Sorting","1 - By Name", and "2 - ByClass". The default value is "2- By Class". When sorting by NDS classname, the items will be sorted a second timewithin each class grouping by name. |
TreeStyle |
BOOL |
Determinesif the browser control will include the variouslines connecting the items and the + and- buttons which denote items which can beexpanded and collapsed. The supported valuesare: "0 - No Lines or Buttons","1 - Lines Only", and "2 -Lines and Buttons". The default valueis "2 - Lines and Buttons". |
The following table lists the various custom read-only properties supported by this control.
PropertyName
|
Type
|
Description
|
NDSContext |
LPCSTR |
|
NDSTreeName |
LPCSTR |
|
NWErrorCode |
long |
Thisproperty will contain the detailed NetWareerror code which represents the last NetWare-specificerror which occurred. This property is tobe implemented as read-only. |
NWErrorText |
LPCSTR |
Thisproperty will contain the detailed NetWareerror string which represents the last NetWare-specificerror which occurred. This property is tobe implemented as read-only. |
Events
The following table summarizes the events available for the NDSObjBrowser.
EventName
|
Description
|
ContextChanged |
Thisevent will occur when the context is changedin the browser. A double-click on the uparrow item, "..", will cause thecontext to be changed to the context onelevel above the current context. Expandinga container object will not cause this eventto be generated. |
ItemDblClick |
Thisevent will be fired when the user clicksthe right mouse button twice over an itemin the NDS browser control. The name, class,and location of the object as passed to theevent handler. |
ItemRtClick |
Thisevent will be fired when the user clicksthe right mouse button over an item in theNDS browser control. The same parameterswill be provided to the event handler aswith "ItemDblClick" with the additionof the x and y screen coordinates of wherethe click occurred. |
Methods
A single method, BeginBrowse, exists for the current version of the NDSObjBrowser.
BeginBrowse
This method will cause the control to initialize itself with data read from the specified NDS context in the specified NDS tree.
Input Parameters
ParameterName
|
Type
|
Description
|
TreeName |
LPCSTR |
Identifiesthe NDS tree for which the control is todisplay information. If this parameter containsno value, the primary NDS tree will be used. |
StartingContext |
LPCSTR |
Identifiesthe starting NDS context which is to be displayedin the browser. If this parameter containsno value, the current NDS context for thespecified NDS tree will be used. |
ClassFilter |
LPCSTR |
Identifiesthe NDS classes which will be displayed. It this parameter is specified and is notempty, only items of the specified classeswill be displayed. |
Return Code. This method returns a result code named "ResultCode," of type long, which indicates whether or not the operation was successful. Refer to the section "Common Result Codes" for a detailed list of the possible values returned, along with their meanings.
NDS Object List: NDSObjList
This ActiveX Control will provide a visual element that allows selection between the various NDS objects within a single NDS context. This is effectively a flat view of the same information presented in the NDS Object Browser ActiveX control. The visual element is based on the Win95 list view control.
Properties
The following table lists the various stock properties supported by this control.
PropertyName
|
Type
|
Description
|
Appearance |
stock |
Determinesif the control has a 3-D appearance. Thesupported values are: "0 - Flat"and "1 - 3D". |
BackColor |
stock |
|
BorderStyle |
stock |
Determinesif the control has a border. The supportedvalues are: "0 - None" and "1- Fixed Single". |
Font |
stock |
|
ForeColor |
stock |
|
hWnd |
stock |
Containsthe Window handle to the Windows 95 tree control window. |
The following table lists the various custom properties supported by this control.
PropertyName
|
Type
|
Description
|
AllowUp |
BOOL |
Determinesif the browser will allow the user to browseabove the initial NDS context. If this propertyis TRUE, the up arrow entry will be presentin the browser when the current context isanything other than [Root]. |
AutoArrange |
BOOL |
Determineswhether or not the large and small icon viewswill automatically arrange the object icons. |
ListStyle |
enum / short |
Determineswhich style the list control will be displayedin. The supported values are: "0 - LargeIcons", "1 - Small Icons","2 - List", and "3 - Details".The default value is "2 - List ". |
MultipleSelect |
BOOL |
Determineswhether or not multiple item in the controlcan be simultaneously selected. |
SortOrder |
short / enum |
Determinesthe sorting method to be used when orderingitems to be displayed in the control. Supportedvalues include: "0 - No Sorting","1 - By Name", and "2 - ByClass". The default value is "2- By Class". When sorting by NDS classname, the items will be sorted a second timewithin each class grouping by name. |
The following table lists the various custom read-only properties supported by this control.
PropertyName
|
Type
|
Description
|
NDSContext |
LPCSTR |
|
NDSTreeName |
LPCSTR |
|
NWErrorCode |
long |
Thisproperty will contain the detailed NetWareerror code which represents the last NetWare-specificerror which occurred. This property is tobe implemented as read-only. |
NWErrorText |
LPCSTR |
Thisproperty will contain the detailed NetWareerror string which represents the last NetWare-specificerror which occurred. This property is tobe implemented as read-only. |
Events
A single event, FillList, currently exists for the NDSObjList control.
Event Name
|
Description
|
ItemDblClick |
Thisevent will be fired when the user clicksthe left mouse button twice over an itemin the NDS object list control. The objectname, class, and location are passed to theevent handler. |
Methods
Four methods are currently available for the NDS ObjList control: FillList, GetNumSelections, GetSelection, and GetSelectionList.
FillList
This method will obtain the list of NDS objects that are found in the specified context.
Input Parameters
ParameterName
|
Type
|
Description
|
TreeName |
LPCSTR |
Identifiesthe NDS tree for which the control is todisplay information. If this parameter containsno value, the primary NDS tree will be used. |
Context |
LPCSTR |
Identifiesthe NDS context for which the NDS objectsare to be displayed in the control. If thisparameter contains no value, the currentNDS context for the specified NDS tree willbe used. |
ClassFilter |
LPCSTR |
Identifiesthe NDS classes which will be displayed.If this parameter is specified and is notempty, only items of the specified classeswill be displayed. |
Return Code. This method returns a result code named "ResultCode," of type long, which indicates whether or not the operation was successful. Refer to the section "Common Result Codes" for a detailed list of the possible values returned, along with their meanings.
GetNumSelections
This method will obtain the number of items currently selected.
Input Parameters
|
No input parameters exist for this method. |
Return Code. This method returns a result code named "Count," of type long, which identifies the number of items currently selected in the control. A value less than or equal to zero, probably indicates an error condition. Refer to the section "Common Result Codes" for a detailed list of the possible values returned, along with their meanings.
GetSelection
This method will obtain the name of a single item which is selected from the control.
Input Parameters
ParameterName
|
Type
|
Description
|
Index |
long |
Identifiesthe specific selected item which should be returned. |
Return Code. This method returns a result code named "Name," of type LPSTR, which contains the name of the specified selected item in the control.
GetSelectionList
This method will obtain the complete list of all selected items in the control.
Input Parameters
|
Noinput parameters exist for this method.
|
|
Return Code. This method returns a result code named "ItemList," of type LPSTR, which contains a list of all items currently selected in the control. The return of an empty string may indicate an error condition.
NDS Methods ActiveX Control: NDSMethods
This ActiveX control will provide a series of methods (functions) that will provide large-grained access to NDS. This control will have no visual appearance at run-time, but will be represented by an icon at design-time.
Properties
The following table lists the various stock properties supported by this control.
PropertyName
|
Type
|
Description
|
NWErrorCode |
long |
Thisproperty will contain the detailed NetWareerror code which represents the last NetWare-specificerror which occurred. |
NWErrorText |
LPCSTR |
Thisproperty will contain the detailed NetWareerror string which represents the last NetWare-specificerror which occurred. |
Events
A single event exists for the NDSMethods control, as described in the following table.
Event Name
|
Description
|
NetWareError |
Thisevent signifies that a NetWare-specific errorcondition has occurred. The "NWErrorCode"and "NWErrorText" property valuescan be examined for additional information. |
Methods
The methods that exist for the NDSMethods control include ChangePassword, GetCurrContext, GetCurrTree, GetTextAttribute, ObjectExists, SetTextAttribute, and WhoAmI.
ChangePassword
This method will change or reset the password of the specified NDS object.
Input Parameters
ParameterName
|
Type
|
Description
|
TreeName |
LPCSTR |
Identifiesthe specific NDS tree to be manipulated.If a value for this parameter is not specified,the primary NDS tree will be used. |
ObjectName |
LPCSTR |
Identifiesthe specific NDS object to be manipulated.An NDS context should not be specified aspart of the object name parameter. A valuemust be supplied for this parameter. |
ContextName |
LPCSTR |
Identifiesthe specific NDS context of the specifiedNDS tree which is to be manipulated. If avalue for this parameter is not specified,the current context of the specified NDStree will be used. |
NewPwd |
LPCSTR |
Identifiesthe new password value. |
CurrPwd |
LPCSTR |
Identifiesthe current password value. This parameteris ignored if the current user has Adminequivalence. |
Return Code. This method returns a result code named "ResultCode," of type long, which indicates whether or not the operation was successful. Refer to the section "Common Result Codes" for a detailed list of the possible values returned, along with their meanings.
GetCurrContext
This method will return information about the current NDS context for the specified NDS tree. The NDS context is basically the current NDS container that is being manipulated.
Input Parameters
ParameterName
|
Type
|
Description
|
TreeName |
LPCSTR |
Identifiesthe specific NDS tree to be manipulated.If a value for this parameter is not specified,the primary NDS tree will be used. |
Return Code. This method will return a result code of the name "ContextName," of type LPSTR, which identifies the current context for the specified NDS tree. If the returned string is empty, an error has occurred and the "NWErrorCode" and/or "NWErrorText" properties should be examined for the exact nature of the error.
GetCurrTree
This method will obtain the name of the current NDS tree. The current tree can be set by clicking the right mouse button on the Network Neighborhood icon on the Win95 desktop and selecting the NetWare Connections item in the pop-up menu.
Input Parameters
|
Noinput parameters exist for this method. |
Return Code. This method will return a result code of the name "TreeName", of type LPSTR, which identifies the name of the current NDS tree. If the returned string is empty, an error has occurred and the "NWErrorCode" and/or "NWErrorText" properties should be examined for the exact nature of the error.
GetTextAttribute
This method will obtain the textual value for the specified property (attribute) of the specified NDS object. In this version of the control, only the "Login Script" attribute can be manipulated.
Input Parameters
ParameterName
|
Type
|
Description
|
TreeName |
LPCSTR |
Identifiesthe specific NDS tree to be manipulated.If a value for this parameter is not specified,the primary NDS tree will be used. |
ContextName |
LPCSTR |
Identifiesthe specific NDS context of the specifiedNDS tree which is to be manipulated. If avalue for this parameter is not specified,the current context of the specified NDStree will be used. |
ObjectName |
LPCSTR |
Identifiesthe specific NDS object to be manipulated.An NDS context should not be specified aspart of the object name parameter. A valuemust be supplied for this parameter. |
AttributeName |
LPCSTR |
Identifiesthe specific NDS attribute (property) ofthe specified NDS object which is to be manipulated.The property name should be specified exactlyas defined in the NDS schema. A value mustbe supplied for this parameter. |
Return Code. This method returns a result code named "CurrValue," of type LPSTR, which contains the current value of the specified property (attribute) of the specified NDS object. If the returned string is empty, an error may have occurred and the "NWErrorCode" and/or "NWErrorText" properties should be examined to determine if an error has actually occurred.
ObjectExists
This method determines if the specified NDS object exists.
Input Parameters
ParameterName
|
Type
|
Description
|
TreeName |
LPCSTR |
Identifiesthe specific NDS tree to be manipulated.If a value for this parameter is not specified,the primary NDS tree will be used. |
ObjectName |
LPCSTR |
Identifiesthe specific NDS object to be manipulated.An NDS context should not be specified aspart of the object name parameter. A valuemust be supplied for this parameter. |
ContextName |
LPCSTR |
Identifiesthe specific NDS context of the specifiedNDS tree which is to be manipulated. If avalue for this parameter is not specified,the current context of the specified NDStree will be used. |
ClassName |
LPCSTR |
Identifiesthe class of the specific NDS object to be manipulated. |
Return Code. This method returns a result code named "ResultCode," of type long, which indicates whether or not the specified NDS object already exists in the specified container of the specified NDS tree. Refer to the section "Common Result Codes" for a detailed list of the possible values returned, along with their meanings.
SetTextAttribute
This method will set the textual value for the specified property (attribute) of the specified NDS object. In this version of the control, only the "Login Script" attribute can be manipulated.
Input Parameters
ParameterName
|
Type
|
Description
|
TreeName |
LPCSTR |
Identifiesthe specific NDS tree to be manipulated.If a value for this parameter is not specified,the primary NDS tree will be used. |
ContextName |
LPCSTR |
Identifiesthe specific NDS context of the specifiedNDS tree which is to be manipulated. If avalue for this parameter is not specified,the current context of the specified NDStree will be used. |
ObjectName |
LPCSTR |
Identifiesthe specific NDS object to be manipulated.An NDS context should not be specified aspart of the object name parameter. A valuemust be supplied for this parameter. |
PropertyName |
LPCSTR |
Identifiesthe specific NDS property (attribute) ofthe specified NDS object which is to be manipulated.The property name should be specified exactlyas defined in the NDS schema. A value mustbe supplied for this parameter. |
NewValue |
LPCSTR |
Identifiesthe new value for the specified property(attribute) of the specified NDS object. |
AppendFlag |
BOOL |
Identifieswhether the new value should replace allcurrent values or be appended to the list.This parameter is only used for propertywhich can contain a list of values (multi-valuedattributes). |
Return Code. This method returns a result code named "ResultCode," of type long, which indicates whether or not the operation succeeded.
WhoAmI
This method determines the name that the current workstation used when authenticating to the specified NDS tree.
Input Parameters
ParameterName
|
Type
|
Description
|
TreeName |
LPCSTR |
Identifiesthe specific NDS tree to be manipulated.If a value for this parameter is not specified,the primary NDS tree will be used. |
Return Code. This method returns a result code named "FullName," of type LPSTR, which identifies the fully distinguished (contains context information) name of the NDS object which was used to authenticate to the specified NDS tree. If the returned string is empty, an error has occurred and the "NWErrorCode" and/or "NWErrorText" properties should be examined for the exact nature of the error.
Common Result Codes
The following values are returned by the various methods which return a value of name "ResultCode".
Value
|
Meaning
|
0 |
Successful execution |
-1 |
Ageneral failure has occurred |
-2 |
Amemory allocation failure has occurred |
-3 |
Thereis not an authenticated connection to NDS |
-4 |
Thespecified NDS tree or NetWare server name is invalid |
-5 |
Thespecified NDS object does not exist |
-6 |
Thespecified NDS context does not exist |
-7 |
Thespecified NDS attribute does not exist |
-8 |
Noconnection has been identified as the current connection |
-9 |
Thespecified NDS attribute does not supportthe specified or implied data type (syntax). |
Summary
Visual, event-driven development has become the choice for a variety of software projects. This DevNote has provided an introduction to Novell's Net2000 Directory Services ActiveX Controls, formerly known as OCX, released as a proof-of-concept on the Net2000 JumpStart CD. The JumpStart CD also included components that encapsulate lower level APIs in the areas of NDS schema, authentication, and volume.
We covered the three Net2000 Directory Services controls found in NWDIRSRV.OCX: NDSObjBrowser, NDSMethods, and NDSObjList. You should now be able to easily install, register, and experiment with the ActiveX Controls described.
This DevNote has provided a quick preview for developers interested in using tools that support the use of ActiveX Controls. We hope that if you are a developer or someone involved in the planning and construction of network utilities or applications that you have benefited from the material presented in this DevNote. Look for more DevNotes in the future covering more detail on ActiveX Controls from Novell and third parties that put network development solutions at your fingertips. Finally, look for the Net2000 SDK in October 1996 at the Professional Developers Conference.
Net2000 JumpStart CD The Net2000 JumpStart CD is designed togive developers an early preview of architectures,directions,sample code, and actual developertools that demonstrate Novell's commitmentto making it easier to build network applicationsand services. The Novell Net2000 JumpStartCD was available at Novell's BrainShare conferenceand at NetWorld+Interop.For the latest Net2000information and products see the URL: http://developer.novell.com/net2000/ Net2000 JumpStart CD Contents Overview The Net2000 JumpStart CD has been organized tofocus on the following key initiatives and solutions: 1. Introduction to Net20002. Net2000 for NetWare Development3. Net2000 Components4. Net2000 and the Internet5. Writing to NetWare Today The Introduction to Net2000 is providedfor developers so theycan learn more about Net2000 directions andopportunities, Novell's vision of client/networkcomputing, and Novell's 1996 Net2000 initiatives. The Net2000 for NetWare Development informationon the CD provides information on significantenhancements for developers to the NetWareplatform. Information on key toolsand technologiessuch as NMX that enhance the NetWare development platformis provided. Net2000 NMX for NetWare is apowerful enginethat runs on NetWare 3.x and4.x that provides full basic scripting, NLMdevelopment, and loading and unloading ofNLMs on demand. The Net2000 NMX engine alsoincludes multiple NMX components toaccessNDS, NetWare 3.x, server console, and systemcommands toenable administrators and developerseasier access to network services. The HiTecSoft4GL NetBasic development environment provides administratorswith a GUI tool to build powerful basic scripts thatrun on NetWare, NetBasic provides access to all NMX components. The Net2000 section of the JumpStartCD provides access to strategy papers and examples demonstrating Novell'sexposure of advanced network services throughstandard interfaces and higher level components.Sample components, such as the NDS ActiveXControls highlighted in this DevNote, along withtechnical documents on Novell's directionregarding distributed object computing areincluded on the CD. Other components on the CDexpose services such as NDS schema, NDS objectattributes, authentication, volume, and list services. The JumpStart CD also includesproducts and information on Net2000 and theInternet. Included is an introduction to anew CGI specification, Novell Web Serverfor developers, and documents regarding buildingInternet solutions with Net2000. Additionally, the JumpStart CD includes a section on Novell's GroupWise XTD groupware development tools. TheCD introduces many new developer interfacesand services for workflow and collaborativeapplications. Developers can access earlyspecifications and documentation on these interfaces. The JumpStart CD also includesinformation and products from Novell Net2000Partners. A few of these tool partners haveincluded some sample components, developertools, and documents that also expose newservices and enhancements forthe NetWareplatform. For example, Apiary provides many3rd party components to access NetWare servicesand functionality. These samples provide developersa preview of the tools and functionality thatcan be used to build their Visual Basic orDelphi applications and utilities. Lastly, the CD included a number of BrainShare presentationsexplaining new ways to access and build developersolutions for Novell's advanced networkingservices. For detailed developer interfacesplease refer to the Novell SDKVol 7. |
* Originally published in Novell AppNotes
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.