home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Direkt 1995 #6
/
CDD_6_95.ISO
/
cdd
/
winanw
/
hawin
/
zm_send.c
< prev
Wrap
C/C++ Source or Header
|
1994-12-07
|
1KB
|
41 lines
/* This program zm_send.c created by Hilgraeve, handles files that are drag and */
/* dropped from the file manager and sends them with zmodem protocol to the remote system. */
/* $Revision: 1.1 $ */
/* $Date: 1994/11/08 11:59:51 $ */
/* Use pre-defined constants stored in the file defines.h */
#include <defines.h>
/* 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;
/* Initialize variables */
ScriptHandle = 0;
ReturnValue = 0;
/* 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();
/* Set default sending protocol to zmodem */
ReturnValue = haGetXferProtocol(ScriptHandle, HA_XFER_SEND);
if (ReturnValue != HA_ZMODEM)
ReturnValue = haSetXferProtocol(ScriptHandle, HA_XFER_SEND, HA_ZMODEM);
/* Transfer the dropped file(s) */
if (ReturnValue >= 0)
haXferDropSend(ScriptHandle, 1);
/* Terminate link between HyperACCESS and script program */
haTerminate(ScriptHandle, 0);
}