Terminal Emulation & Transformation Community
  • Home
  • Blogs
  • FORUM
  • About
  • Contact
  • Resources

Emulator High Level Language API (EHLLAPI) in IBM Personal Communications

3/6/2018

2 Comments

 
Picture
For an introduction to API’s and emulator programming in IBM Personal Communications, refer to the link below:-

https://www.tetcommunity.com/blogs/personal-communications-session-api-pcsapi-in-ibm-personal-communications
 
In this blog we will explore more about EHLLAPI APIs.

PCOMM provides functions to access emulator "presentation space" data (such as characters on the host screen), sending keystrokes to the host, intercepting user-entered keystrokes, querying the status of the host session, uploading and downloading files, etc. The different EHLLAPI programming interfaces are listed below:

  • IBM Standard HLLAPI Support (HLLAPI): This is a standard programming interface which allows programmatic access to a host emulator session.
  • IBM Enhanced HLLAPI Support (EHLLAPI): This interface is based on the IBM Standard HLLAPI interface. It provides all the existing functionality but uses modified data structures.
  • Windows High Level Language API (WinHLLAPI): This interface provides much of the same functionality of IBM Standard EHLLAPI and adds some extensions that take advantage of the Windows environment.

​The figure below showcases different EHLLAPI layers.
Picture
Picture
Languages

Any programming language which can invoke an entry point in a DLL with the "Pascal" calling convention can be used to execute EHLLAPI functions. However, the Personal Communications EHLLAPI toolkit provides header files and function prototypes only for the C++ languages. These are present under the ‘\Samples’ Directory. A clear understanding of data structure layout and calling conventions is required to use any other language. The EHLLAPI toolkit supports the following C/C++ compilers:
          •       C/C++
          •       Visual Basic for Automation
          •       Visual Basic Scripting
 
EHLLAPI C/C++ applications must include the Personal Communications EHLLAPI header file (HAPI_C.H).

EHLLAPI Call Format

The EHLLAPI entry point is always called with the following four parameters:

Function Name (EHLLAPI Function Number, Data Buffer, Buffer Length, Position/Return Code);
EHLLAPI Function Number
​Input
Data Buffer
Input/Output
​Buffer Length
Input/Output
Position/Return Code
Input/Output
Compiling and linking
Applications using EHLLAPI functions must include the appropriate header file to obtain the proper function prototypes, constants, and data structure definitions. These header files may be used with any of the supported C/C++ compilers.

Note
: If a different compiler or language is used, then you must provide your own equivalent definitions and structures. There are two possible ways to link the application program, depending on how the entry point is to be resolved.


​The following table shows which header files to use for which flavour of EHLLAPI.

Interface ​
Entry Point ​
Header File ​
LIB ​
​DLL
IBM Standard (32-bit) ​
hllapi ​
ehlapi32.h ​
​EHLAPI32.LIB
EHLAPI32.DLL
IBM Enhanced (32-bit) ​
hllapi ​
​hapi_c32.h
PCSCAL32.LIB ​
PCSHLL32.DLL
WinHLLAPI (32-bit) ​
winhllapi ​
whllapi.h ​
WHLAPI32.LIB ​
​WHLAPI32.DLL
Function Calling convention
PCOMM Session APIs follow a simple prototype for all functions to keep the programming straightforward. As mentioned above these API’s can be accessed and programmed using multiple programming languages (VBA, C/C++, C#, etc).
               Function Type Function Name (Arguments);
               Where:
Function Type
​The return type of the API
​Function Name
​The function to be called
Arguments
​Input argument to be passed to the function and can vary from 1 to 3
EHLLAPI Functions and their opcodes:

​Below figure shows different EHLLAPI functions and their Opcodes. Details about these functions, Operations, Data type, Length and Return values can be found here
Picture
A Simple EHLLAPI ‘C’ Sample Program
The following sample windows application enters the character string "Hello World!" in the first input field of host session 'A'.
​
A.      Includes

    
B.      Main Function body and reset connection (if any)
​

    
C.  Establish connection between program and emulator (Step A must be performed before any other steps)

    
D.      Write “HelloWorld” on the Emulator Screen

    
​E.    Disconnect from the PCOMM Engine (Clean disconnect)

    
Download the Sample code
ehllapi_sample.zip
File Size: 9 kb
File Type: zip
Download File

Contact:
For further information on automation, and services offerings please email zServices@hcl.com  or HCL-HI-LabServices@hcl.com.
Avinash Sable
Lead - Lab Services, IBM HACP & HATS
Avinash.sable@hcl.com
2 Comments
https://www.researchwritingkings.com/review-of-bid4papers-com/ link
1/23/2020 10:20:43 am

Communication is a huge part of what we need to socialize. If you think that you are great at it, then that is good, but we always need to improve. It is easy to feel confident about our communication skills, but it is not as easy as we believe it to be. I want to make a school that can focus on communication. I want to make a world that can communicate with one another in a great fashion, that is for sure.

Reply
Eva L link
1/10/2021 09:29:20 pm

Hello, nice post

Reply



Leave a Reply.

    Archives

    May 2020
    October 2019
    July 2019
    June 2019
    May 2019
    March 2019
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    October 2017
    September 2017

    Categories

    All
    HACP
    HACPEE
    HATS
    HOD
    PCOMM

    RSS Feed

Proudly powered by Weebly
  • Home
  • Blogs
  • FORUM
  • About
  • Contact
  • Resources