Call Parameters

  Standard Interface Enhanced Interface
Function Number Must be 50
Data String See the following table
Length Keystroke buffer size EHLLAPI allocates 32 bytes minimum for this buffer.
PS Position NA

The calling data string contains:

Byte Definition
Standard Enhanced  
1 1 One of the following values:
  • A specific host presentation space short name (PSID)
  • A blank or null indicating a request for the host-connected host presentation space
2–4 Reserved.
2 5 An option code character:
  • D for AID keystrokes only.
  • L for all keystrokes.
  • E for edit keys and all keystrokes (Available in Enhanced mode only)
  • M for requesting the asynchronous message mode of the notification (Windows only).

    When M is specified, a code character D, or L, or E (Enhanced Monde) must be placed in position 13 (7 for 16-bit).

Prerequisite: keyboard keys must be mapped to edit functions, e.g. Ctrl+C mapped to edit copy function. See Table 6 for edit functions supported.

6–8 Reserved.
3–4 9–12 When M is specified in position 5 (2 for 16-bit), the window handle of the window that receives the message should be set. The message is a return value of RegisterWindowMessage (PCSHLL) (not equal 0).
7 13 One of the following values if position 5 (2 for 16-bit) is M:
  • D for AID keystrokes only.
  • L for all keystrokes.
  • E for edit keys and all keystrokes. (Available in Enhanced mode only.)
14–16 Reserved.
Data String:
If M (asynchronous message mode) is specified in position 5 (2 for standard interface) and the function is completed successfully, the following data string is returned:
Byte Definition
Standard Enhanced  
1 1 A 1-character presentation space short name (PSID)
2–8 Reserved
3–4 9–10 Task ID of asynchronous message mode
Note: If a user sends keystrokes to a session, an application window receives a message. The message is a return value of RegisterWindowMessge (PCSHLL). The wParam parameter contains the Task ID returned by the function call. HIWORD of lParam parameter contains return code 0, which shows that the function was successful, and LOWORD of lParam parameter contains function number 50.