home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
rxhll.zip
/
HLLAPI.REX
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-04-22
|
1KB
|
63 lines
/* #include hllapi.rex */
/**
*** ┌──────────────────────────────────────────────────────────────────────┐
*** │ HLLAPI Routines │
*** └──────────────────────────────────────────────────────────────────────┘
**/
HapiLoadFunctions: procedure
/**
*** This will load the DLL used by REXX HLLAPI
**/
if RxFuncQuery('HLLAPI') then
call RxFuncAdd 'HLLAPI','SAAHLAPI','HLLAPISRV'
return
HapiError: procedure expose Host.
/**
***
**/
arg code verb .
say 'Return code' code 'from HLLAPI command:' verb'.'
call HapiDisconnect
exit
HapiDisconnect: procedure expose Host.
/**
*** This will disconnect the HLLAPI session from the host
**/
call hllapi 'disconnect'
call hllapi 'reset_system'
return
HapiConnect: procedure expose Host.
/**
*** This will connect to the host session and make sure the keyboard is
*** unlocked.
**/
rc = hllapi('Connect',Host.Session)
if rc <> 0 then
call HapiError rc 'Connect'
rc=hllapi('Wait')
if rc <> 0 then
call HapiError rc 'Wait'
return
HapiClear: procedure expose Host.
/**
*** This will clear the host screen
**/
rc=hllapi('Sendkey', '@C') /* Send a clear key */
rc=hllapi('Wait') /* Wait for clear key to complete */
return