home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Direkt 1995 #6
/
CDD_6_95.ISO
/
cdd
/
winanw
/
hawin
/
srecord.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-12-07
|
1KB
|
43 lines
/* This program, srecord.c, created by Hilgraeve and assigned to the Record */
/* button, connect to a session, then records logon. */
/* $Revision: 1.1 $ */
/* $Date: 1994/11/08 11:59:53 $ */
/* Define main function, which is always the starting point of C programs. */
/* (The term "void" indicates that the function returns no value.) */
void main()
{
/* Declare variables */
long ScriptHandle;
int ReturnValue;
char Buffer[256];
/* Initialize variables */
ReturnValue = 0;
ScriptHandle = 0;
memset(Buffer, 0, 256);
/* Establish a link between this script program and HyperACCESS */
ScriptHandle = haInitialize(0,0,0,0);
/* Exit if intialization of link with HyperACCESS failed */
if (ScriptHandle == 0) exit();
/* Get the selected phonebook session */
ReturnValue = haGetSelectedPhonebookEntry(ScriptHandle, 0, 255, Buffer);
/* Open the session */
if (ReturnValue >= 0)
ReturnValue = haOpenSession(ScriptHandle, Buffer);
/* Connect to session */
if (ReturnValue >= 0)
ReturnValue = haConnectSession(ScriptHandle, 1);
/* Terminate link between HyperACCESS and script program */
haTerminate(ScriptHandle, 0);
}