Notes on Using This Function
- If a return code of 31 occurs for the Get Key (51)
function, either:
- Increase the value of the calling length parameter for this function, or
- Execute the Get Key (51) function more frequently.
An intercepted keystroke occupies 3 bytes in the buffer. The next intercepted keystroke is placed in the adjacent 3 bytes. When the Get Key (51) function retrieves a keystroke (first-in first-out, or FIFO), the 3 bytes that it occupied are made available for another keystroke. By increasing the size of the buffer or the rate at which keystrokes are retrieved from the buffer, you can eliminate buffer overflow.
In the PC/3270, another way to eliminate return code 31 is to operate the PC/3270 emulator in the resume mode.
- If option code D is provided, EHLLAPI writes intercepted non-AID keys to the presentation space to which they were originally intended, and returns only AID keys to the application.
- Call the Stop Keystroke Intercept (53) function before exiting your EHLLAPI application. Otherwise, keystroke interception remains enabled with unpredictable results.