ZOC Terminal HLLAPI Overview

Overview of the HLLAPI implementation with ZOC Terminal.
 

Table of Contents

 

DLL NAMES:

  • EHLAPI32.DLL for a 32-bit client app and for use with the 32-bit version of ZOC
  • EHLAPI64.DLL for a 64-bit client app and for use with the 64-bit version of ZOC
  • DLL-export function name 'hllapi' (lowercase):
  • Prototype: long WINAPI hllapi(LPINT pfunc, LPSTR pmem, LPINT plen, LPINT prc);
  • HLLAPI-Version: the DLL uses the non-enhanced version of the structs from "hllstr16.h", e.g., 2-byte input for HA_CONVERT_POS_ROW_COL or a 12-byte structure to return data on HA_QUERY_SESSIONS.
  • The 64-bit DLL uses the same non-enhanced structures from "hllstr16.h", but in a 64-bit binary (i.e., passing and expecting 64-bit pointers as arguments to the HA_QUERY_SESSIONS function, which will return 12-byte structs)

INSTALLATION/USE:

Copy the EHLAPI*.DLL files into the ZOC Terminal installation folder.

Either copy your interface application into the ZOC program folder, or set the current directory to "C:\Program Files\ZOC9\" and load the DLL via LoadLibrary or similar mechanism or link your program with the associated ehlapixx.lib.

To see the HLLAPI session's short id in the ZOC window title, add the placeholder %HLLAPIPSID% to ZOC's window title string (via Options-menu > Window settings).

Note: If you copy the ZOC EHLAPIxx.DLL elsewhere (e.g. into your existing HLLAPI client program), it will need to be able to load the zaphod8dllxx.dll and the vcruntime140.dll that come with ZOC. Either copy those also or add ZOC's program folder to your PATH environment variable.


CLIENT SAMPLE PROGRAM

Please see the hllsmp folder containing a Visual Studio C/C++ solution with source code for a sample.

Usage: Add your computer name and relevant paths in main.c line 90.

Start ZOC, set the session profile > emulation to TN3270 emulation, but no connection (empty screen with blue status bar)

Call (or debug): Release64\hllsample.exe zoctest


SUPPORTED HLLAPI FUNCTIONS:

  • HA_RESET_SYSTEM
  • HA_QUERY_SESSIONS
  • HA_CONNECT_PS
  • HA_DISCONNECT_PS
  • HA_SET_SESSION_PARMS
  • HA_QUERY_CURSOR_LOC
  • HA_COPY_PS
  • HA_COPY_PS_TO_STR
  • HA_COPY_STR_TO_PS
  • HA_SEARCH_PS
  • HA_SENDKEY
  • HA_WAIT
  • HA_COPY_STR_TO_FIELD
  • HA_SET_CURSOR
  • HA_CONVERT_POS_ROW_COL

The HLLAPI implementation is a work in progress. Functions so far are implemented to a reasonable common extent, but they do not support the entire specification (e.g. HA_COPY_PS will not adhere to all possible HA_SET_SESSION_PARMS combinations, or HA_COPY_STR_TO_FIELD will probably not handle all edge cases (length vs. field length)).

We are very interested in your feedback. Please let us know if you need something that is not yet implemented.

IBM Reference: Personal Communications for Windows, Version 12.0, Emulator Programming


CLOSING NOTE AND QUESTIONS

In case of problems, please contact EmTec support. You will get a quick and qualified response from a programmer.