WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.



Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

ehllapiInit Problem with Distinct Intelliterm


I am attempting to establish an EHLLAPI connection using WinBatch's EHLLAPI Extender with a terminal emulator called Distinct Intelliterm. I can find no information regarding connection in Winbatch's help files, or on this website. I have also looked on Distinct's website and in their help files for more info an can't seem to find what I need. Here is the pertinent info, any help would be GREATLY appreciated.

Distinct Itelliterm 32 Ver. 7.0

WinBatch Ver. 2003F

Here is a snippet of the code:

;ehllapi extender
addextender("C:\Program Files\WinBatch\terminal_emulator_extender\WWHLL34I.DLL")
; Load the DISTINCT Mainframe HLLAPI Dll and uses the Enhanced interface specs.
ehllapiInit("C:\Program Files\Distinct\ehllap32.dll",'',1)
I get this error everytime I run it.
"WIL Extender Error: 102: Enhanced HLLAPI Extender: Error initializing the HLLAPI Dll.
On Line:
ehllapiinit("C:\Program Files\Distinct\ehllapi32.dll",'',1)
I have tried all the different combinations of the personality flags and get the same error.

I checked in the help files of Distinct and this is the correct dll to use for Enhanced HLLAPI. I have assigned a short session name to the session profile that I am loading and attempting to connect to. API settings are global in Distinct and I have it set to Attachtmate EHLLAPI compatibility mode, the other option is IRMA compatibility. Haven't tried anything with it yet.

If anyone has any ideas for me to try or has examples of working code I would certainly be interested. I am a beginner i n WinBatch(as I am sure you can see from my code), but am certainly willing to learn.


Well, well, well.... another heretofore unheard of 3270 emulator crawls out of the woodwork...

In looking through the the knowledgebase articles about Intelliterm. The documentation indicates that the EHLLAPI interface in Intelliterm is compatible with the Attachmate Extra! EHLLAPI implementation. The first thing I'd try is to set up the EHLLAPI extender to behave as if it is using Attachmate and see what happens. The personality flag bit value for Attachmate is 4. The choice for standard or enhanced HLLAPI data structures would be to bit-wise "OR" either zero [16-bit] or one [32-bit] with the flag value for Attachmate.

ehllapiInit("C:\Program Files\Distinct\ehllap32.dll","",1 | 4)
If that does not resolve it, dependency walker also has a "profile" mode where you run tour prgram from inside of dependency walker (getting the parameters correct may be "interesting") and it produces a log file of various DLL actions. Sometimes clues may be found in the log file.

User response:

HE SHOOTS HE SCORES!!!! Well I downloaded the dependency walker and pointed it at the file as you indicated and in window comes up the information. In the Function position it shows "HLLAPI32". Well I had been trying to call ehllapiInit using the default hllapi-function I changed the hllapi-function parameter to "HLLAPI32" So now the initiation looks like this:

;ehllapi extender
addextender("C:\Program Files\WinBatch\terminal_emulator_extender\WWHLL34I.DLL")
; Load the DISTINCT Mainframe HLLAPI Dll and uses the Enhanced interface specs.
DirChange("C:\Program Files\Distinct\")
ehllapiInit("C:\Program Files\Distinct\ehllap32.dll",'HLLAPI32',5)

And guess what..NO ERROR MESSAGE!!(please excuse my enthusiasm.) the ehllapiconnectPS also works with no error message.


That's great news.

See, you have experienced yet another one of the inconsistencies in how EHLLAPI is implemented by various terminal emulator vendors' products. IBM's own EHLLAPI specifications state that the function name will be "hllapi" in lower case. However, it looks like Distinct has chosen to deviate from that particular part of the specification.

For more basic testing, call ehllapiGetWindowStatus() after you call ehllapiConnectPS(). Verify that things like the size of the window in rows & columns matches up properly. If the values don't look correct, then a lot of other ehllapi*() functions will probably fail to function properly.

Article ID:   W15836
File Created: 2017:07:28:13:58:28
Last Updated: 2004:03:30:15:41:03