Novell is now a part of Micro Focus

Sources information and help for Novell developers.

Articles and Tips: article

01 Sep 1994


In this issue

NetWare Telephony "Teletips"NetWare Telephony "Teletips"

Recently, Novell released the NetWare Telephony SDK, which allows developers to create software which controls telephone systems which have supported hardware installed, including a link between a Novell NetWare file server, and a telephone switchbox (PBX) with a supported driver for NetWare. The January and February issues of Novell Application Notes have articles describing the architecture and implementation of NetWare Telephony Services.

The "Teletips" below provide additional information on NetWare Telephony for administrators and developers. More Teletips can be downloaded from CompuServe's Novell Developer Support Forum.

TeleTip #1

"Why can't I just type INSTALL?"

When NetWare Telephony shipped, it had several "release notes" included in a text file on the diskettes which contained information which was not available at the time the manuals were printed. This information in many cases is crucial to the successful operation of Telephony. The release notes include several pages that replace full pages from the manuals regarding the installation and startup of the NetWare Telephony Server (TSERVER).

If you follow the directions in the manuals exactly as outlined, TSERV won't load, and you will get several error messages about symbols not being available. However, if you follow the directions in the release notes, the TSERVer will load and run correctly.

TIP: Release Notes (and readme files) contain crucial information. Print them out, read over them, and keep them with the printed manuals.

"Cross"Dressing diskettes?"

The Telephony Services SDK has two diskettes that are mislabeled, they contain correct information, but they have each others' labels. These diskettes are the TSRVDSK1 and TSRVDSK2 diskettes.

TIP: When you need the diskettes TSRVDSK1 and TSRVDSK2, insert the opposite diskette. They are mislabeled.

TeleTip #5

"Living in a World That Isn't Here"

When writing professional applications, especially applications that will be used in a network environment, many times developers need to write in a "clean environment" rather than putting the application out where people will use it. It may only be in the "pre"Beta" stage, and could cause problems with different workstation configurations. Or maybe there just isn't the hardware needed to run the software in our environment. Whatever the reason, it would be nice to be able to "simulate" that environment which our program needs in order to run.

The ideal simulator, or "fake world", so to speak, would not let our application know that it is not running in a production environment. The application would think it was running as it is supposed to, and process information along in its own naive way.

This idea of a simulator becomes particularly attractive when the hardware that is being simulated is very expensive, or hard to come by. Such can be the case when developing applications for NetWare Telephony. Maybe your manager hasn't approved the budget for a new PBX yet. Maybe it's been ordered, but hasn't come in yet. You still need to get to work on the application.

To get you up and running in your blissful simulated world, there is a DEFINITY System Simulator, which simulates a physical DEFINITY G3 switch, by AT&T. This simulator runs on the Telephony server, and appears to be a real PBX to any applications requiring PBX services. It does this by keeping PBX "configuration" information, which can be modified to the desired configuration, in a simulator configuration file, read into memory at load time.

The key pieces to using the simulator are the SIM.NLM file on the server, and the CLSIM.EXE utility on the Windows client machine. You use the CLSIM program to create the configuration files the SIM.NLM program will use. When you have created one, you can load the simulator on the NetWare Telephony Server.

You now are living in your own happy world, as far as your application is concerned a world totally customizable to your own needs. You can continue to use the CLSIM program to send test messages to the TServer. Or, you can use your application to make TSAPI calls to the TServer. Either way, the simulator is now running and will respond to the application as if it was a real, physical PBX.

TIP: Use the simulator (SIM.NLM) and CLSIM.EXE to test your applications in a non production environment.

Client Record Area Structure Definition

PRODUCT: NetWare Client SDK 1.0e DOCUMENT ID: TID100155

ABSTRACT:

Applications that submit print jobs directly to a queue must fill in the fields of the client record area themselves to set the number of copies, form feed, etc.

SYMPTOM

Applications that submit print jobs to a queue directly using NWCreateQueueFile2() and do not send the jobs to a redirected port must set the values in the clientRecordArea element of the NWQueueJobStruc structure. If these values are not set, the print job parameters such as tab size, number of copies, etc. could become undefined and will produce unwanted results.

CAUSE

The NWCreateQueueFile2() requires that the address of the NWQueueJobStruct structure be passed as a parameter when submitting a queue job to a queue. An example of this structure is given below:

{

 DWORD clientStation;

 DWORD clientTask;

 DWORD clientID;

 DWORD targetServerID;

 BYTE  targetExecutionTime[6];

 BYTE  jobEntryTime[6];

 DWORD jobNumber;

 WORD  jobType;

 WORD  jobPosition;

 WORD  jobControlFlags;

 BYTE  jobFileName[14];

 DWORD jobFileHandle;

 DWORD servicingServerStation;

 DWORD servicingServerTask;

 DWORD servicingServerID;

 BYTE  jobDescription[50];

 BYTE  clientRecordArea[152];

} NWQueueJobStruct;

The last element of this structure "clientRecordArea" is used by the job server to acquire specific information about the print job. The structure of this 152 byte client record area is not documented.

SOLUTION

Following is the structure definition of the clientRecordArea as indicated in the NWPS_JOB.H file.

Note: Although this structure can be defined by the developer and passed as NWQueueJobStruct.clientRecordArea to the NWCreateQueueFile2 function, this structure was intended for use by Novell's NetWare Print Services only. Novell reserves the right to change this structure at any time.

BYTE                  versionNumber;

 BYTE                  tabSize;

 WORD                  numberOfCopies;

 WORD                  printControlFlags;

 WORD                  maxLinesPerPage;

 WORD                  maxCharsPerLine;

 BYTE                  formName[13];

 BYTE                  reserve[9];

 BYTE                  bannerNameField[13];

 BYTE                  bannerFileField[13];

 BYTE                  headerFileName[14];

 BYTE                  directoryPath[80];

} NWPS_ClientRecord;

This structure is overlayed on the QMS (Queue Management Systems) NWQueueJobStruct.clientRecordArea to define a print job. It is not used in any of the print services API's. The numberOfCopies field must be byte swapped in order for the print server to interpret this value properly. This can be accomplished by using NWWordSwap() function.

Get and Set Capture Flags Using VLMs

PRODUCT: NetWare System Calls 1.0 DOCUMENT ID: TID100149

ABSTRACT:

When using the VLMs, after ending a capture, the flags field information is no longer available. This information should be saved before ending the capture and then restored after completing the capture.

SYMPTOM

The user would capture one queue, then end the capture and expect to be able to access the flags field in the Flags1 and Flags2 structures for that queue. When using the VLMs, only the default information was stored the Flags field.

CAUSE

This problem is due to the NETX shell and VLM requester working differently. The NETX shell will keep the capture information intact so that after ending a capture the program could still see and access the capture flag information. The VLM requester does not keep the capture flags after an endcap is called.

SOLUTION

When using the VLMs, the programmer needs to save the flag information with a GetSpecificCaptureFlags, then endcap. After the endcap they can then restore the flags using SetSpecificCaptureFlags.

How To Determine Activity of Job in Queue

PRODUCT: NetWare Client SDK 1.0e DOCUMENT ID: TID100146

ABSTRACT:

In order to determine whether a job is active in a queue, or if it may become active, you must examine fields in QueueJobStruct, a structure that is returned from the call NWReadQueueJobEntry2().

ISSUE

To determine a job is active, a call must be made to NWReadQueueJobEntry2() to obtain the queue job information contained in QueueJobStruct. Once this call is made, you can test the servicingServerID field for a non zero value. Because this field is initialized to 0, a non zero value would indicate the job is currently being serviced by a queue server.

For a job to become active, the following conditions must apply:

  1. The job's target server ID number must match the queue server or be set to 1L.

  2. The target execution time must have expired or be set to FFh.

  3. The job type must match the type specified by the server.

  4. The operator hold, user hold, and entry open flags must all be clear, and the server ID number must be 0, indicating the job is not being serviced.

This information can be obtained by making a call to

NWReadQueueJobEntry2() and subsequently testing the contents of QueueJobStruct.

Return Values for BeginDiagnostics()

PRODUCT: NetWare Client SDK 1.0e DOCUMENT ID: TID100145

ABSTRACT:

Return codes for BeginDiagnostics() are incorrectly documented.

ISSUE

The possible return values for the BeginDiagnostics() function call should be documented as follows:

0x00 Successful 0xFC Could Not Establish Connection 0xFD Could Not Begin Connection 0xFE Could Not Open Socket

TLI t_open() Protocol Device Parameter

PRODUCT: NetWare Client SDK 1.0e DOCUMENT ID: TID100140

ABSTRACT:

A listing of TLI transport providers follows.

ISSUE

The path parameter of the t_open() call specifies which type of

transport endpoint should be opened. The following shows a list of supported options for this parameter.

"/dev/nipx" "" for transport provider IPX "/dev/nspx" "" for transport provider SPX "/dev/nspx2" "" for transport provider SPX2 "/dev/udp" "" for connectionless TCP/IP "/dev/tcp" "" for connection"oriented TCP/IP

Developer-Oriented Application Notes

Prices for reprints are US$15 per copy in the United States, US$20 per copy in all other locations. Price includes shipping and handling. To obtain an updated list of publications, call the Novell Research Order Desk at 800-377-4136. Outside the U.S. and Canada, call 303-297-2725.

Novell Application Notes (formerly NetWare Application Notes)


Date

Part Number

Titles

Mar 94

164-000036-003

An Introduction to AppWare and Visual AppBuilder

Jul 93

164-000032-007

A NetWare Interface for Visual Basic

Mar 93

164-000032-003

An Introduction to Developing Cross-Platform Client/Server GUI Applications

Oct 92

164-000031-010

Interfacing Visual Basic for Windows and NetWare

Mar 92

164-000031-003

LookUp: Implementing a Multiplatform, Multiprotocol Application

Jan 92

164-000031-001

A Workstation Inventory Program for NetWare

Oct 91

164-000030-010

Getting Started in NLM Development

Sep 91

164-000030-009

Using the Asynchronous Event Scheduler in an NLM

How NetWare Loadable Modules Operate in the NetWare Environment

Aug 91

164-000030-008

Detecting the Presence of IPX, the NetWare Shell, and NetBIOS from a DOS Application

Using the NetWare 3.x Internal Debugger

Jul 91

164-000030-007

NetWare 3.x Operating System Statistics Exposed!

May 91

164-000030-005

Code and Concept: How to Allocate IPX Resources and How to Listen for IPX Packets Using CLIB

Mar 91

164-000030-003

Code and Concept: How to Gracefully Load and Unload a Multi-Threaded NLM

Code and Concept: Creating and Controlling a Thread That Polls a Queue or Some Other Entity

Feb 91

164-000030-002

The NetWare DOS Client Environment

Novell Professional Developer Bullets

Articles of technical interest are released in the monthly Professional Development Series BULLETS publication. They can be:

  • Downloaded from NetWire, Novell Forum NOVLIB, on CompuServe

  • Obtained by those who have registered Professional Development Series products with Novell Austin (to register a product with Novell, call Developer Support at 1 800-REDWORD)

How To Download Source Code and Executables

Source code listings and executables referenced in the Application Notes are available through Novell's NetWire service on CompuServe. The following instructions outline the method used to access these code listings.

Downloading Files from NetWire

To participate on NetWire, you must have an account on CompuServe. The Novell NetWire forums provide utilities and programs from Novell and from members of the Novell forums. This service is free to CompuServe users.

If you don't have a CompuServe account and would like to get one, call one of the phone numbers listed below and ask for Representative #200.


Country

Toll-Free

Direct

U.S. and Canada

800-524-3388

614-457-0802

Argentina

(+54) 1-322-1864

Australia

008-025-240

(+61) 2-410-4555

Chile

(+56) 2-696-8807

Germany

0130-3732

(+49) 89-66-55-0-111

Japan

0120-22-1200

(+81) 3-5471-5806

Korea

080-022-7400

(+82) 2-569-5400

New Zealand

0800-446-113

Switzerland

155-31-79

Taiwan

(+886) 2-515-0330

United Kingdom

0800-289-378

(+44) 272-255111

Venezuela

(+58) 2-793-2984

Elsewhere

(+1) 614-457-0802

Files referenced in the Application Notes are available on NetWire Forum NOVLIB. To get to NOVLIB, type "GO NOVLIB" from any of the CompuServe (!) prompts. This places you in the Novell Forum index, which includes various libraries.

Next choose Library (option 2), or type "LIB". An index of libraries will be listed. Using this index, select the Library you want from the list in Table 1, and obtain the directory of filenames. From this point, you can select to browse through the files or download a file.

Note: Although the information given here is accurate at press time, files on NetWire are periodically renamed or moved. If you cannot locate a file, check NOVCHG.TXT, a text file on NetWire that lists new or changed files. You can also post a message for a NetWire sysop.

Zipped Files

Note that most files have been compressed into ZIP files. To download an executable file that will unZIP these files, select Forum 11 from the Novell Libraries and download the PKZIP.EXE file. Documentation is included in this self-extracting file.

More recent files are available as self-extracting EXE files. You do not need a separate program to unZIP these files. Simply type the filename (without the extension). Table 1: Libraries and file names for downloading files referenced in the AppNotes.


Issue

AppNote Title

NOVLIB

Forum Library

ZIP

File Name

File Names

Feb 91

The NetWare DOS Client Environment

11

AN102X.ZIP

SAVE.C, COMPARE.C, FIND.ASM, ADDRESS.C, GETCONN.ASM

Mar 91

Code and Concept: How to Gracefully Load and Unload a Multi-Threaded NLM

11

AN103X.ZIP

GRACE.C

Mar 91

Code and Concept: Creating and Controlling a Thread That Polls a Queue or Some Other Entity

11

AN103X.ZIP

WAKEUP.C

May 91

Code and Concept: How to Allocate IPX Resources and How to Listen for IPX Packets...

11

AN105X.ZIP

LISTEN.C, IPX.C, IPX.H

July 91

NetWare v3.x Operating System Statistics Exposed!

11

AN107X.ZIP

SS.NLM, SS.H, TOTAL.C, TOTAL.NLM, MAKEFILE

Aug 91

Detecting the Presence of IPX, the NetWare Shell, and NetBIOS from a DOS Application

11

AN108X.ZIP

EXIST.C

Aug 91

Using the NetWare 3.x Internal Debugger

11

AN108X.ZIP

LISTNLMS.C

Sept 91

Using the Asynchronous Event Scheduler in an NLM

11

AN109X.ZIP

MAKEFILE, DOWNSERV.C, DOWNSERV.NLM

Oct 91

Getting Started in NLM Development

11

AN110X.ZIP

HELLOU.C, MAKEFILE

Dec 91

Using NetWare Accounting to

Track User Logons

11

AN112X.ZIP

ACCTRECS.C, ACCT.H, LOGGRAPH.C

Jan 92

A Workstation Inventory Program for NetWare

Browsing the NetWare Bindery

with the BSEARCH Utility

11

11

AN201X.ZIP

AN201X.ZIP

BTRIEVE.H, CPUTYPE.ASM, DATAFILE.C, DATAFILE.H, INVENTRY.C, INVENTRY.EXE, RECDECL.H, TURCBTRV.C, VIEWINVN.C, VIEWINVN.EXE

BSEARCH.EXE

Feb 92

Automating Office Procedures

with MHS

11

AN202X.ZIP

HYPERMHS.SIT

(HyperCard stack for Macintosh users)

Mar 92

Detecting Viruses in the NetWare Environment

LookUp: Implementing a Multiplatform, Multiprotocol Application

STAT.NLM: A Tool for Measuring NetWare v3.11 Server Resource Utilization

11

11

11

PINCH.ZIP

LOOKUP.ZIP

STAT.ZIP

LOG.C, SCANFILE.C, SCREEN.C, DATAFILE.C, CRC.C, PINCH.C, BTRIEVE.H, CRC.H, DATAFILE.H, SCANFILE.H, LOG.H, RECDECL.H, PINCH.H, MAKEFILE, PINCH.NLM

DOS.EXE, OS2.EXE, WIN.EXE, MAC.EXE, SUN.EXE, SERVER.EXE, COMMON.EXE

STAT.NLM

DUMPSTAT.EXE

PATCHMAN.NLM

June 92

Patch for NetWare v3.11 that enables STAT.NLM to collect disk statistics (not needed with latest STAT.ZIP files)

11

AN206X.ZIP

DPATCH.NLM, DPATCH.MAP, PATCHMAN.NLM, DUMPSTAT.EXE

Oct 92

Interfacing Visual Basic for Windows and NetWare

11

AN210X.ZIP

Source and executable code for BINDERY.EXE, a bindery object lister for Microsoft Windows. BINDERY.EXE is written in Microsoft Visual Basic for Windows.

Mar 93

An Introduction to Developing Cross-Platform Client/Server GUI Applications

11

AN303X.ZIP

Source and executable code for NetWare 21, a sample client/server application.

Apr 93

Utilities to assist in migrating from bindery-based Netware to directory-based NetWare (4.0)

11

AN304X.ZIP

PRINTGRP.EXE

PRINTUSR.EXE

DUPBIND.EXE

README.EXE

Jul 93

A NetWare Interface for Visual Basic

11

NIVB.ZIP

NIVB declaration files, plus

source and executable code for NWTEST, a sample Visual Basic for Windows application.

Sep 93

Multilingual PC Setup with DR DOS

11

AN309X.ZIP

Sample CONFIG.SYS, AUTOEXEC.BAT, and WHEREAMI.BAT files, plus source and executable code for the CARMEN utility.

Nov 93

Developer Notes "Server Design: Providing a Network Service Using NetWare's QMS"

11

AN311X.EXE

Source code for job server (DOIT.H, DOIT.C, INSTALL.C, JOBSERV.C)

Dec 93

Developer Notes "Adding NetWare Accounting to a Server Application"

11

AN312X.EXE

Source code for accounting-enabled job server (JOBSERV.C)

Jan 94

Novell's Corporate-Wide Upgrade to NetWare 4

Developer Notes "A Custom Accounting System for Distributed Applications"

11

11

NOVLUP.EXE

AN401X.EXE

Interactive multimedia presentation on NetWare 4 upgrade

Source code for custom accounting server using bindery information (DOITACCT.H, DOITACCT.C, DOIT.C, JOBSERV.C, DOITMGT.C, DOITAUDT.C)

Contacting Novell

Developer Hotline: Information on

the Developer's Program,

Service and Support,

Software Development Kits,

or Education and Training 800-REDWORD

800-733-9673

801-429-5281

SDK Orders (U.S. and Canada) 800-733-9673

801-429-5281

303-894-4135

303-894-4160 (fax)

SDK Orders (International) 31-5-538-4279

31-5-543-4455 (fax)

Yes Program 801-429-5544

Developer Pre-sales SDK

or Technical Support 801-429-5281

801-429-5157 (fax)

Unixware Developer Information 408-577-6318

WordPerfect Developer Relations 801-228-7267

AppWare and NetWare

Business Development 408-973-8081 x337

Telephony Developer Information 908-522-6189

Program Feedback 801-429-3340

801-429-7207 (fax)

* 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.

© Copyright Micro Focus or one of its affiliates