home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Encyclopedia 96-1
/
novell-nsepro-1996-1-cd2.iso
/
download
/
netware
/
tservs.exe
/
TSERVERS.C
next >
Wrap
C/C++ Source or Header
|
1994-09-22
|
3KB
|
104 lines
/****************************************************************************
** File: TSERVERS.C
**
** Desc: Sample telephony program
**
** This NetWare Telephony Services program lists the names of the
** available TServers.
**
** This program is written for Borland C 4.0 for Windows 3.1. It
** is compiled as an EASYWIN program, so that I didn't have to
** include all the Windows "overhead" code but can just get to
** the good stuff.
**
**
** DISCLAIMER
**
** Novell, Inc. makes no representations or warranties with respect to
** any NetWare software, and specifically disclaims any express or
** implied warranties of merchantability, title, or fitness for a
** particular purpose.
**
** Distribution of any NetWare software is forbidden without the
** express written consent of Novell, Inc. Further, Novell reserves
** the right to discontinue distribution of any NetWare software.
**
** Novell is not responsible for lost profits or revenue, loss of use
** of the software, loss of data, costs of re-creating lost data, the
** cost of any substitute equipment or program, or claims by any party
** other than you. Novell strongly recommends a backup be made before
** any software is installed. Technical support for this software
** may be provided at the discretion of Novell.
**
** Programmers:
**
** Ini Who Firm
** -----------------------------------------------------------------------
** KVW Kevin V White Novell Developer Support.
**
** History:
**
** When Who What
** -----------------------------------------------------------------------
** 9/22/94 kvw initial Windows program
*/
/****************************************************************************
** Include headers, macros, function prototypes, etc.
*/
/*------------------------------------------------------------------------
** ANSI
*/
#include <stdio.h>
#include <string.h>
#include <conio.h>
/*------------------------------------------------------------------------
** Windows
*/
#include <windows.h>
/*------------------------------------------------------------------------
** Telephony
*/
#include <acs.h>
#include <csta.h>
/****************************************************************************
** This is the callback function that we need to have acsEnumServerNames()
** call. It will be called once for each Telephony Server that is found, or
** until a FALSE value is returned, instructing TServer to halt enumerating
** the available TServers.
*/
Boolean FAR PASCAL _export ListTServers(char *serverName,unsigned long lParam)
{
printf("\nServer Name: %48s lParam: %lu",serverName,lParam);
return TRUE;
}
void main(void)
{
/*------------------------------------------------------------------
** Variables necessary for the acsEnumServerNames() call.
*/
EnumServerNamesCB listTServers;
StreamType_t streamType=ST_CSTA;
unsigned long paramToPass=1234L;
/*------------------------------------------------------------------
** First, get the "proc instance" of the function pointer and type cast
** it to the EnumServerNamesCB type
*/
listTServers=(EnumServerNamesCB) MakeProcInstance ((FARPROC)ListTServers,NULL);
/*------------------------------------------------------------------
** Then make the function call to start the EnumServers going
*/
acsEnumServerNames(streamType,listTServers,paramToPass);
return;
}