PCLink! HLLAPI FAQ

Conklin Systems develops a number of components for Virtual Soft's family of Unisys T-27 emulation products, including the WinHLLAPI interfaces to PCLink! Ultralite. This FAQ is for WinHLLAPI API developers only, so we can help you directly, programmer-to-programmer. For all your Unisys environment needs, you should contact the Virtual Group here

The HLLAPI F.A.Q.

Status

Virtual HLLAPI is currently shipping.

Virtual HLLAPI support includes support for 32-bit native applications. Load the WHLAPI32.DLL for 32-bit Hllapi, and WHLLAPI.DLL for 16-bit HLLAPI. Note that both DLL's must be present for 32-bit HLLAPI functionality.

Version

The current release of Virtual HLLAPI is 1.00.01. For a history of changes, click here.

Virtual HLLAPI requires PCLink version 2.60.10 or later, for Virtual HLLAPI version 0.90.08 or later.

Virtual HLLAPI is compliant with the Windows HLLAPI Specification 1.1.

Functions not yet implemented

Virtual 32-bit HLLAPI does not support the WinHLLAPI calls to install a user-written 'wait' routine, WinHLLAPISetBlockingHook() and WinHLLAPIUnhookBlockingHook(), in this release. These calls work as expected in 16-bit HLLAPI.

WINDOWSTATUS EXTQUERY and CHANGEPSNAME do not support the Virtual extended option WINCTRLMDI.

WINDOWSTATUS does not return a valid Zorder at this time.

Functions not Supported

The following WinHLLAPI/EHLLAPI calls are not supported:
  • Storage Manager(17)
  • LockPSAPI(60)
  • LockWSapi(61)
  • Send File (90)
  • Receive File (91)
  • Connect Structured Fields (120)
  • Disconnect Structured Fields (121)
  • Query Communications Buffer Size (122)
  • Allocate Communications Buffer (123)
  • Free Communications Buffer (124)
  • Get Request Completion (125)
  • Read Structured Fields (126)
  • Write Structured Fields (127)
 

Keystroke Mappings

Since the keyboard on a 3270 and T-27 do not map 1-to-1, we have made a "best guess" mapping. We're more than happy to change these key mappings based on feedback from users.

T-27s have 2 'enter' keys, and distinguish between a FORM XMIT and a LINE XMIT. The standard @E maps to FORM XMIT. @G has been mapped to LINE XMIT. @G is also returned by GetKey to indicate LINE XMIT. By default, FORM XMIT is keypad + and LINE XMIT is keypad -

The keys that are mapped are "obvious," so only the keycodes left unmapped are listed here. The following keys have not been mapped:

@x PA1
@y PA2
@z PA3
@$ Alternate Cursor
@H Help
@J Jump
@R Reset

The following double-byte 3270 commands keys are not implemented, because of lack of good T27 equivalents:
@A@C Test
@A@D Word Delete
@A@E Field Exit
@A@F Erase Input
@A@H System Req
@A@I Insert Toggle
@A@J Cursor Select
@A@L Cursor Left Fast
@A@R Device Cancel
@A@T Print Presentation Space
@A@U Cursor Up Fast
@A@V Cursor Down Fast
@A@Z Cursor Right Fast
@A@9 Reverse Video
@A@n Jump to Session 1 -- T-27 pages could be mapped into these
@A@o Jump to Session 2
@A@p Jump to Session 3
@A@q Jump to Session 4
@A@r Jump to Session 5
@A@t Print (personal computer) -- print what?
@A@y Forward Word Tab
@A@z Backward Word Tab
@S@E Print Presentation Space on Host
@S@x Dup
@S@y Field Mark
@X@1 Display SO/SI
@X@5 Generate SO/SI
@X@6 Display Attribute
@X@7 Forward Character
@X@c Split vertical bar

Extra functionality has been added as well for the Windows environment. @A Alt @S Shift and @r Control key modifiers can be aggregated, as in:

@r@AS for Control-Alt-S.

We are also looking to type Alt keystrokes into the low level Windows event stream, such that HLLAPI applications can also control Ultralite menus.

Session Parameters

Options not supported
  • AUTORESET/NORESET - We're not really sure what this does?
  • ATTRB/NOATTRB - Doesn't map to T-27 space. No effect.
  • NOQUIET/QUIET - Doesn't map to T-27 space. No effect.
  • WRITE_SUPER/WRITE_WRITE/WRITE_READ/ WRITE_NONE/SUPER_WRITE/READ_WRITE
    The HLLAPI spec doesn't even cover necessary details on how these modes should work. If anyone wants these, let us know.

Non-standard behavior:

TRACE CONTROL

You can call WinHLLAPI with function SETSESSIONPARAMETERS to set Trace mode on and off ("TRON"/"TROFF") -EVEN BEFORE YOU HAVE CALLED WinHLLAPIStartup()-. This gives you programmatic control over tracing the entire session. Note that attempting to set any other SETSESSIONPARAMETER option without being connected to a session will fail.

Extra options added:

RAWIO/STDIO

The RAWIO switch affects the behavior of COPYPS. In raw mode, the last message received from the mainframe will be copied up to its full length. On return, Datalen = the number of bytes copied. In theory messages can be as large as 10K, in practice messages are typically <2K. Caller is responsible for ensuring a large enough destination buffer. Message data is always the last message received. Be warned that consecutive messages will overwrite each other if not picked up in time.

WINCTRLMDI/WINCTRLCHILD

The HLLAPI spec is single-window centric. Ultralite is an Multiple Document Interface (MDI) based standard Windows application. This switch affects all windowing functions: CONNECTWINDOWSERVICES, DISCONNETWINDOWSERVICES, QUERYWINDOWCOORDINATES, WINDOWSTATUS, and CHANGEPSNAME. When WINCTRLMDI is set, calls affect the entire Ultralite window, with WINCTRLCHILD, only the actual session window within the emulator window is affected.

FLDNATIVE/FLDSTD

The T-27 has a rich set of field & character attributes lost in 3270 translation. When FLDNATIVE is set the attribute byte returned by QUERYFIELDATTRIBUE returns the following:

struct T27FieldAttribs {
        BYTE underline:1; // underline 
	BYTE bold:1; // bold 
	BYTE blink:1; // blinking 
	BYTE inverse:1; // inverse video
        BYTE secured:1; // field is a secured (password) field
        BYTE rjustify:1; // right justified 
	BYTE readonly:1; // read only? 
	BYTE isfield:1; // is it a field?
	};

Note that the 'isfield' bit is the highest bit in the byte (0x80), and underline is the lowest (0x01).

AUTOSTART/NOAUTOSTART

AUTOSTART, like TRON/TROFF, can be called even before you are connected to a session. AUTOSTART alters the behavior of CONNECTPS. When CONNECTPS is called with AUTOSTART, the HLLAPI DLL checks to see if PCLink is running. If not, it locates and launches the emulator. Then it waits for a session with the requested session short name to start. The effect is such that if the session is automatically loaded (using PCLink's Save Workspace feature), the call to CONNECTPS will succeed and be connected to an open, ready to use session.