Return Parameters

This function returns a data string and a return code.
Data String:
See the following table for 32–bit interface:
Byte Definition
1 One of the following values:
  • A 1-character presentation space short name (PSID)
  • A blank or null indicating a function call for the host-connected presentation
2–4 Reserved
5 U is the option code character for a Unicode session.
6–11 The definition of these bytes is similar to the SBCS session, the only difference is that the Unicode character value is stored in bytes 6 and 7 when the option code character is U. In a DBCS session, the ASCII character value is stored in byte 3 and byte 4 contains 0X'00' when the option code character is A.
Return Code:
The following codes are valid:
Return Code Explanation
0 The Get Key function was successful.
1 An incorrect presentation space was specified.
5 You specified the AID only option under the Start Keystroke Intercept (50) function, and non-AID keys are inhibited by this session type when EHLLAPI tries to write incorrect keys to the presentation space.
8 No prior Start Keystroke Intercept (50) function was called for this presentation space.
9 A system error was encountered.
20 An undefined key combination was typed.
25 The requested keystrokes are not available on the input queue.
31 Keystroke queue overflowed and keystrokes were lost.