home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Direkt 1995 #6
/
CDD_6_95.ISO
/
cdd
/
winanw
/
hawin
/
ssrecord.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-12-07
|
1KB
|
42 lines
/* This program, ssrecord.c, created by Hilgraeve and assigned to the Record */
/* button, connects to a session (if not connected), then records logon. */
/* $Revision: 1.1 $ */
/* $Date: 1994/11/08 11:59:44 $ */
/* 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();
/* Check to see is session is connected */
ReturnValue = haGetConnectionStatus(ScriptHandle);
/* If connected, same as selecting Automation from menu bar, the Record from Automation menu */
if (ReturnValue != 2)
ReturnValue = haMenuString(ScriptHandle, "AC");
else
/* If not connected, connect to session */
ReturnValue = haConnectSession(ScriptHandle, 1);
/* Terminate link between HyperACCESS and script program */
haTerminate(ScriptHandle, 0);
}