Personal Communications for Windows, Version 5...Start Host Notification (23) . . . . . . . . 159...
Transcript of Personal Communications for Windows, Version 5...Start Host Notification (23) . . . . . . . . 159...
-
Personal
Communications
for
Windows,
Version
5.8
Emulator
Programming
SC31-8478-08
���
-
Personal
Communications
for
Windows,
Version
5.8
Emulator
Programming
SC31-8478-08
���
-
Note
Before
using
this
information
and
the
product
it
supports,
read
the
information
in
Appendix
G,
“Notices,”
on
page
485.
Ninth
Edition
(September
2004)
This
edition
applies
to
Version
5.8
of
IBM
Personal
Communications
for
Windows
(program
number:
5639–I70)
and
to
all
subsequent
releases
and
modifications
until
otherwise
indicated
in
new
editions.
©
Copyright
International
Business
Machines
Corporation
1989,
2004.
All
rights
reserved.
US
Government
Users
Restricted
Rights
–
Use,
duplication
or
disclosure
restricted
by
GSA
ADP
Schedule
Contract
with
IBM
Corp.
-
Contents
Figures
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. ix
Tables
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. xi
About
This
Book
.
.
.
.
.
.
.
.
.
. xiii
Who
Should
Read
This
Book
.
.
.
.
.
.
.
. xiii
Where
To
Find
More
Information
.
.
.
.
.
.
. xiii
Notation
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. xiv
Chapter
1.
Introduction
to
Emulator
APIs
1
Using
API
Header
Files
.
.
.
.
.
.
.
.
.
.
. 2
Critical
Sections
.
.
.
.
.
.
.
.
.
.
.
.
. 2
Stack
Size
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 2
Running
16-bit
Windows
EHLLAPI
programs
in
Windows
NT,
2000,
or
XP
.
.
.
.
.
.
.
.
.
. 2
Sample
Programs
.
.
.
.
.
.
.
.
.
.
.
.
. 3
Chapter
2.
Introduction
to
IBM
Standard
EHLLAPI,
IBM
Enhanced
EHLLAPI
and
WinHLLAPI
Programming
.
.
.
.
.
.
. 5
EHLLAPI
Overviews
.
.
.
.
.
.
.
.
.
.
. 5
IBM
Standard
EHLLAPI
.
.
.
.
.
.
.
.
. 5
WinHLLAPI
.
.
.
.
.
.
.
.
.
.
.
.
. 5
WinHLLAPI
and
IBM
Standard
EHLLAPI
.
.
. 5
IBM
Enhanced
EHLLAPI
and
IBM
Standard
EHLLAPI
.
.
.
.
.
.
.
.
.
.
.
.
.
. 6
Languages
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 6
EHLLAPI
Call
Format
.
.
.
.
.
.
.
.
.
.
. 6
Data
Structures
.
.
.
.
.
.
.
.
.
.
.
.
. 7
Memory
Allocation
.
.
.
.
.
.
.
.
.
.
.
. 8
EHLLAPI
Return
Codes
.
.
.
.
.
.
.
.
.
. 8
Compiling
and
Linking
.
.
.
.
.
.
.
.
.
.
. 9
Static
Link
Method
.
.
.
.
.
.
.
.
.
.
. 10
Dynamic
Link
Method
.
.
.
.
.
.
.
.
.
. 10
Multithreading
.
.
.
.
.
.
.
.
.
.
.
. 11
Presentation
Spaces
.
.
.
.
.
.
.
.
.
.
.
. 11
IBM
Enhanced
32-Bit
Interface
Presentation
Space
IDs
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 11
Types
of
Presentation
Spaces
.
.
.
.
.
.
.
. 11
Size
of
Presentation
Spaces
.
.
.
.
.
.
.
. 11
Presentation
Space
IDs
.
.
.
.
.
.
.
.
. 12
Host-Connected
Presentation
Space
.
.
.
.
. 12
Presentation
Space
ID
Handling
.
.
.
.
.
. 12
Sharing
EHLLAPI
Presentation
Space
between
Processes
.
.
.
.
.
.
.
.
.
.
.
.
.
. 14
ASCII
Mnemonics
.
.
.
.
.
.
.
.
.
.
. 16
Debugging
.
.
.
.
.
.
.
.
.
.
.
.
. 19
A
Simple
EHLLAPI
Sample
Program
.
.
.
.
. 19
Standard
and
Enhanced
Interface
Considerations
21
Host
Automation
Scenarios
.
.
.
.
.
.
.
. 22
Chapter
3.
EHLLAPI
Functions
.
.
.
. 27
Unicode
Support
for
Code
Pages
1390/1399
and
1137
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 27
Page
Layout
Conventions
.
.
.
.
.
.
.
.
.
. 27
Prerequisite
Calls
.
.
.
.
.
.
.
.
.
.
. 28
Call
Parameters
.
.
.
.
.
.
.
.
.
.
.
. 28
Return
Parameters
.
.
.
.
.
.
.
.
.
.
. 28
Notes
on
Using
This
Function
.
.
.
.
.
.
. 28
Summary
of
EHLLAPI
Functions
.
.
.
.
.
.
. 28
Allocate
Communications
Buffer
(123)
.
.
.
. 30
Cancel
File
Transfer
(92)
.
.
.
.
.
.
.
.
. 31
Change
PS
Window
Name
(106)
.
.
.
.
.
. 32
Change
Switch
List
LT
Name
(105)
.
.
.
.
. 33
Connect
for
Structured
Fields
(120)
.
.
.
.
. 34
Connect
Presentation
Space
(1)
.
.
.
.
.
.
. 36
Connect
Window
Services
(101)
.
.
.
.
.
.
. 37
Convert
Position
or
Convert
RowCol
(99)
.
.
. 38
Copy
Field
to
String
(34)
.
.
.
.
.
.
.
.
. 40
Copy
OIA
(13)
.
.
.
.
.
.
.
.
.
.
.
. 48
Copy
Presentation
Space
(5)
.
.
.
.
.
.
.
. 57
Copy
Presentation
Space
to
String
(8)
.
.
.
.
. 64
Copy
String
to
Field
(33)
.
.
.
.
.
.
.
.
. 72
Copy
String
to
Presentation
Space
(15)
.
.
.
. 76
Disconnect
from
Structured
Fields
(121)
.
.
.
. 80
Disconnect
Presentation
Space
(2)
.
.
.
.
.
. 82
Disconnect
Window
Service
(102)
.
.
.
.
.
. 82
Find
Field
Length
(32)
.
.
.
.
.
.
.
.
.
. 83
Find
Field
Position
(31)
.
.
.
.
.
.
.
.
. 85
Free
Communications
Buffer
(124)
.
.
.
.
.
. 86
Get
Key
(51)
.
.
.
.
.
.
.
.
.
.
.
.
. 87
Get
Request
Completion
(125)
.
.
.
.
.
.
. 93
Lock
Presentation
Space
API
(60)
.
.
.
.
.
. 95
Lock
Window
Services
API
(61)
.
.
.
.
.
.
. 97
Pause
(18)
.
.
.
.
.
.
.
.
.
.
.
.
.
. 99
Post
Intercept
Status
(52)
.
.
.
.
.
.
.
. 100
Query
Additional
Field
Attribute
(45)
.
.
.
. 101
Query
Close
Intercept
(42)
.
.
.
.
.
.
.
. 102
Query
Communications
Buffer
Size
(122)
.
.
. 103
Query
Communication
Event
(81)
.
.
.
.
. 104
Query
Cursor
Location
(7)
.
.
.
.
.
.
.
. 105
Query
Field
Attribute
(14)
.
.
.
.
.
.
.
. 106
Query
Host
Update
(24)
.
.
.
.
.
.
.
.
. 108
Query
Session
Status
(22)
.
.
.
.
.
.
.
. 109
Query
Sessions
(10)
.
.
.
.
.
.
.
.
.
. 110
Query
System
(20)
.
.
.
.
.
.
.
.
.
.
. 112
Query
Window
Coordinates
(103)
.
.
.
.
. 113
Read
Structured
Fields
(126)
.
.
.
.
.
.
. 115
Receive
File
(91)
.
.
.
.
.
.
.
.
.
.
. 119
Release
(12)
.
.
.
.
.
.
.
.
.
.
.
.
. 121
Reserve
(11)
.
.
.
.
.
.
.
.
.
.
.
.
. 122
Reset
System
(21)
.
.
.
.
.
.
.
.
.
.
. 123
Search
Field
(30)
.
.
.
.
.
.
.
.
.
.
. 124
Search
Presentation
Space
(6)
.
.
.
.
.
.
. 128
Send
File
(90)
.
.
.
.
.
.
.
.
.
.
.
. 132
Send
Key
(3)
.
.
.
.
.
.
.
.
.
.
.
. 134
Set
Cursor
(40)
.
.
.
.
.
.
.
.
.
.
.
. 145
Set
Session
Parameters
(9)
.
.
.
.
.
.
.
. 146
Start
Close
Intercept
(41)
.
.
.
.
.
.
.
. 155
Start
Communication
Notification
(80)
.
.
.
. 157
©
Copyright
IBM
Corp.
1989,
2004
iii
-
Start
Host
Notification
(23)
.
.
.
.
.
.
.
. 159
Start
Keystroke
Intercept
(50)
.
.
.
.
.
.
. 161
Start
Playing
Macro
(110)
.
.
.
.
.
.
.
. 164
Stop
Close
Intercept
(43)
.
.
.
.
.
.
.
.
. 164
Stop
Communication
Notification
(82)
.
.
.
. 165
Stop
Host
Notification
(25)
.
.
.
.
.
.
.
. 166
Stop
Keystroke
Intercept
(53)
.
.
.
.
.
.
. 167
Wait
(4)
.
.
.
.
.
.
.
.
.
.
.
.
.
. 167
Window
Status
(104)
.
.
.
.
.
.
.
.
.
. 168
Write
Structured
Fields
(127)
.
.
.
.
.
.
. 172
Chapter
4.
WinHLLAPI
Extension
Functions
.
.
.
.
.
.
.
.
.
.
.
.
. 177
Summary
of
WinHLLAPI
Functions
.
.
.
.
.
. 177
WinHLLAPI
Asynchronous
Functions
.
.
.
.
. 177
WinHLLAPIAsync
.
.
.
.
.
.
.
.
.
.
. 177
WinHLLAPICancelAsyncRequest
.
.
.
.
.
. 183
Initialization
and
Termination
Functions
.
.
.
. 184
WinHLLAPI
Startup
.
.
.
.
.
.
.
.
.
. 184
WinHLLAPI
Cleanup
.
.
.
.
.
.
.
.
.
. 185
Blocking
Routines
.
.
.
.
.
.
.
.
.
.
.
. 185
WinHLLAPIIsBlocking
.
.
.
.
.
.
.
.
. 185
WinHLLAPISetBlockingHook
.
.
.
.
.
.
. 185
WinHLLAPIUnhookBlockingHook
.
.
.
.
. 186
WinHLLAPICancelBlockingCall
.
.
.
.
.
. 186
Chapter
5.
PCSAPI
Functions
.
.
.
. 189
How
to
Use
PCSAPI
.
.
.
.
.
.
.
.
.
.
. 189
Page
Layout
Conventions
.
.
.
.
.
.
.
.
. 189
Function
Type
.
.
.
.
.
.
.
.
.
.
.
. 189
Parameter
Type
and
Description
.
.
.
.
.
. 189
Return
Code
.
.
.
.
.
.
.
.
.
.
.
.
. 189
pcsConnectSession
.
.
.
.
.
.
.
.
.
.
.
. 189
Function
Type
.
.
.
.
.
.
.
.
.
.
.
. 190
Parameter
Type
and
Description
.
.
.
.
.
. 190
Return
Code
.
.
.
.
.
.
.
.
.
.
.
.
. 190
pcsDisconnectSession
.
.
.
.
.
.
.
.
.
.
. 190
Function
Type
.
.
.
.
.
.
.
.
.
.
.
. 190
Parameter
Type
and
Description
.
.
.
.
.
. 190
Return
Code
.
.
.
.
.
.
.
.
.
.
.
.
. 190
pcsQueryConnectionInfo
.
.
.
.
.
.
.
.
. 191
Function
Type
.
.
.
.
.
.
.
.
.
.
.
. 191
Parameter
Type
and
Description
.
.
.
.
.
. 191
Return
Code
.
.
.
.
.
.
.
.
.
.
.
.
. 191
ConnectionInfo
.
.
.
.
.
.
.
.
.
.
.
. 191
Example
.
.
.
.
.
.
.
.
.
.
.
.
.
. 191
pcsQueryEmulatorStatus
.
.
.
.
.
.
.
.
. 192
Function
Type
.
.
.
.
.
.
.
.
.
.
.
. 192
Parameter
Type
and
Description
.
.
.
.
.
. 192
Return
Code
.
.
.
.
.
.
.
.
.
.
.
.
. 192
pcsQuerySessionList
.
.
.
.
.
.
.
.
.
.
. 192
Function
Type
.
.
.
.
.
.
.
.
.
.
.
. 193
Parameter
Type
and
Description
.
.
.
.
.
. 193
Return
Parameters
.
.
.
.
.
.
.
.
.
.
. 193
Example
.
.
.
.
.
.
.
.
.
.
.
.
.
. 194
pcsQueryWorkstationProfile
.
.
.
.
.
.
.
. 194
Function
Type
.
.
.
.
.
.
.
.
.
.
.
. 194
Parameter
Type
and
Description
.
.
.
.
.
. 194
Return
Code
.
.
.
.
.
.
.
.
.
.
.
.
. 194
pcsSetLinkTimeout
.
.
.
.
.
.
.
.
.
.
. 195
Function
Prototype
.
.
.
.
.
.
.
.
.
. 195
Parameter
Type
and
Description
.
.
.
.
.
. 195
Return
Code
.
.
.
.
.
.
.
.
.
.
.
.
. 195
pcsStartSession
.
.
.
.
.
.
.
.
.
.
.
.
. 195
Function
Type
.
.
.
.
.
.
.
.
.
.
.
. 195
Parameter
Type
and
Description
.
.
.
.
.
. 195
Return
Code
.
.
.
.
.
.
.
.
.
.
.
.
. 196
pcsStopSession
.
.
.
.
.
.
.
.
.
.
.
.
. 196
Function
Type
.
.
.
.
.
.
.
.
.
.
.
. 196
Parameter
Type
and
Description
.
.
.
.
.
. 196
Return
Code
.
.
.
.
.
.
.
.
.
.
.
.
. 196
Page
Setup
Functions
.
.
.
.
.
.
.
.
.
.
. 197
Restrictions
.
.
.
.
.
.
.
.
.
.
.
.
. 197
pcsGetPageSettings
.
.
.
.
.
.
.
.
.
. 197
pcsRestorePageDefaults
.
.
.
.
.
.
.
.
. 199
pcsSetPageSettings
.
.
.
.
.
.
.
.
.
. 200
Printer
Setup
Functions
.
.
.
.
.
.
.
.
.
. 203
Restrictions
.
.
.
.
.
.
.
.
.
.
.
.
. 203
pcsGetPrinterSettings
.
.
.
.
.
.
.
.
.
. 203
pcsSetPrinterSettings
.
.
.
.
.
.
.
.
.
. 208
Chapter
6.
DDE
Functions
in
a
32–bit
Environment
.
.
.
.
.
.
.
.
.
.
.
. 213
Personal
Communications
DDE
Data
Items
.
.
. 213
Using
System
Topic
Data
Items
.
.
.
.
.
. 214
Using
Session
Topic
Data
Items
.
.
.
.
.
. 214
Using
LU
Topic
Data
Items
(3270
Only)
.
.
. 214
DDE
Functions
.
.
.
.
.
.
.
.
.
.
.
.
. 214
Naming
Conventions
for
Parameters
.
.
.
. 215
Code
Conversion
.
.
.
.
.
.
.
.
.
.
.
. 216
Conversion
Types
.
.
.
.
.
.
.
.
.
.
. 216
Personal
Communications
Response
.
.
.
.
. 217
Find
Field
.
.
.
.
.
.
.
.
.
.
.
.
.
. 218
CF_DSPTEXT
.
.
.
.
.
.
.
.
.
.
.
. 218
CF_TEXT
.
.
.
.
.
.
.
.
.
.
.
.
.
. 218
Personal
Communications
Response
.
.
.
.
. 219
Structure
of
the
Field
Information
.
.
.
.
. 219
Get
Keystrokes
.
.
.
.
.
.
.
.
.
.
.
.
. 220
Personal
Communications
Response
.
.
.
.
. 221
Structure
of
the
Keystroke
Information
.
.
.
. 221
Get
Mouse
Input
.
.
.
.
.
.
.
.
.
.
.
. 221
Personal
Communications
Response
.
.
.
.
. 222
Structure
of
the
Mouse
Input
Information
.
.
. 222
Get
Number
of
Close
Requests
.
.
.
.
.
.
. 224
Personal
Communications
Response
.
.
.
.
. 224
Structure
of
the
Number
of
the
Close
Requests
Information
.
.
.
.
.
.
.
.
.
.
.
.
. 225
Get
Operator
Information
Area
.
.
.
.
.
.
. 225
Personal
Communications
Response
.
.
.
.
. 225
Structure
of
the
Operator
Information
Area
.
. 226
Get
Partial
Presentation
Space
.
.
.
.
.
.
.
. 226
Personal
Communications
Response
.
.
.
.
. 226
Structure
of
the
Presentation
Space
.
.
.
.
. 227
Get
Presentation
Space
.
.
.
.
.
.
.
.
.
. 228
Personal
Communications
Response
.
.
.
.
. 229
Structure
of
the
Presentation
Space
.
.
.
.
. 229
Get
Session
Status
.
.
.
.
.
.
.
.
.
.
.
. 230
Personal
Communications
Response
.
.
.
.
. 231
Format
of
Status
Information
.
.
.
.
.
.
. 231
Get
System
Configuration
.
.
.
.
.
.
.
.
. 232
Personal
Communications
Response
.
.
.
.
. 232
iv
Emulator
Programming
-
Format
of
System
Configuration
Information
233
Get
System
Formats
.
.
.
.
.
.
.
.
.
.
. 233
Personal
Communications
Response
.
.
.
.
. 233
Get
System
Status
.
.
.
.
.
.
.
.
.
.
.
. 234
Personal
Communications
Response
.
.
.
.
. 234
Get
System
SysItems
.
.
.
.
.
.
.
.
.
.
. 235
Personal
Communications
Response
.
.
.
.
. 235
Get
System
Topics
.
.
.
.
.
.
.
.
.
.
.
. 236
Personal
Communications
Response
.
.
.
.
. 236
Get
Trim
Rectangle
.
.
.
.
.
.
.
.
.
.
. 236
Personal
Communications
Response
.
.
.
.
. 237
Initiate
Session
Conversation
.
.
.
.
.
.
.
. 237
Personal
Communications
Response
.
.
.
.
. 238
Initiate
Structured
Field
Conversation
.
.
.
.
. 238
PC/3270
Response
.
.
.
.
.
.
.
.
.
. 238
Initiate
System
Conversation
.
.
.
.
.
.
.
. 238
Personal
Communications
Response
.
.
.
.
. 239
Put
Data
to
Presentation
Space
.
.
.
.
.
.
. 239
Personal
Communications
Response
.
.
.
.
. 240
Search
for
String
.
.
.
.
.
.
.
.
.
.
.
. 240
Personal
Communications
Response
.
.
.
.
. 241
Structure
of
the
Search
Information
.
.
.
.
. 241
Send
Keystrokes
.
.
.
.
.
.
.
.
.
.
.
. 241
Personal
Communications
Response
.
.
.
.
. 242
Session
Execute
Macro
.
.
.
.
.
.
.
.
.
. 242
Personal
Communications
Response
.
.
.
.
. 243
Issuing
Commands
with
the
Session
Execute
Macro
Function
.
.
.
.
.
.
.
.
.
.
.
. 243
WINDOW
Command
.
.
.
.
.
.
.
.
. 243
KEYBOARD
Command
.
.
.
.
.
.
.
.
. 243
SEND
Command
.
.
.
.
.
.
.
.
.
.
. 244
RECEIVE
Command
.
.
.
.
.
.
.
.
.
. 244
SENDKEY
Command
.
.
.
.
.
.
.
.
. 244
WAIT
Command
.
.
.
.
.
.
.
.
.
.
. 248
Set
Cursor
Position
.
.
.
.
.
.
.
.
.
.
. 249
Personal
Communications
Response
.
.
.
.
. 250
Set
Mouse
Intercept
Condition
.
.
.
.
.
.
. 251
Personal
Communications
Response
.
.
.
.
. 253
Set
Presentation
Space
Service
Condition
.
.
.
. 254
Personal
Communications
Response
.
.
.
.
. 255
Set
Session
Advise
Condition
.
.
.
.
.
.
.
. 255
Personal
Communications
Response
.
.
.
.
. 256
Set
Structured
Field
Service
Condition
.
.
.
.
. 256
PC/3270
Response
.
.
.
.
.
.
.
.
.
. 257
Start
Close
Intercept
.
.
.
.
.
.
.
.
.
.
. 257
Personal
Communications
Response
.
.
.
.
. 258
Start
Keystroke
Intercept
.
.
.
.
.
.
.
.
. 258
Personal
Communications
Response
.
.
.
.
. 259
Start
Mouse
Input
Intercept
.
.
.
.
.
.
.
. 259
Personal
Communications
Response
.
.
.
.
. 260
Start
Read
SF
.
.
.
.
.
.
.
.
.
.
.
.
. 262
PC/3270
Response
.
.
.
.
.
.
.
.
.
. 263
Start
Session
Advise
.
.
.
.
.
.
.
.
.
.
. 264
Personal
Communications
Response
.
.
.
.
. 265
Stop
Close
Intercept
.
.
.
.
.
.
.
.
.
.
. 265
Personal
Communications
Response
.
.
.
.
. 266
Stop
Keystroke
Intercept
.
.
.
.
.
.
.
.
.
. 266
Personal
Communications
Response
.
.
.
.
. 266
Stop
Mouse
Input
Intercept
.
.
.
.
.
.
.
.
. 267
Personal
Communications
Response
.
.
.
.
. 267
Stop
Read
SF
.
.
.
.
.
.
.
.
.
.
.
.
. 267
PC/3270
response
.
.
.
.
.
.
.
.
.
.
. 268
Stop
Session
Advise
.
.
.
.
.
.
.
.
.
.
. 268
Personal
Communications
Response
.
.
.
.
. 268
Terminate
Session
Conversation
.
.
.
.
.
.
. 269
Personal
Communications
Response
.
.
.
.
. 269
Terminate
Structured
Field
Conversation
.
.
.
. 269
PC/3270
Response
.
.
.
.
.
.
.
.
.
. 269
Terminate
System
Conversation
.
.
.
.
.
.
. 269
Personal
Communications
Response
.
.
.
.
. 270
Write
SF
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 270
PC/3270
Response
.
.
.
.
.
.
.
.
.
. 270
DDE
Menu
Item
API
in
a
Windows
32-Bit
Environment
.
.
.
.
.
.
.
.
.
.
.
.
. 271
DDE
Menu
Client
.
.
.
.
.
.
.
.
.
.
. 271
DDE
Menu
Server
.
.
.
.
.
.
.
.
.
.
. 272
DDE
Menu
Functions
.
.
.
.
.
.
.
.
.
. 273
Change
Menu
Item
.
.
.
.
.
.
.
.
.
. 273
Create
Menu
Item
.
.
.
.
.
.
.
.
.
.
. 279
Initiate
Menu
Conversation
.
.
.
.
.
.
.
. 280
Start
Menu
Advise
.
.
.
.
.
.
.
.
.
. 281
Stop
Menu
Advise
.
.
.
.
.
.
.
.
.
.
. 282
Terminate
Menu
Conversation
.
.
.
.
.
.
. 283
Summary
of
DDE
Functions
in
a
Windows
32-Bit
Environment
.
.
.
.
.
.
.
.
.
. 283
Chapter
7.
Using
DDE
Functions
with
a
DDE
Client
Application
.
.
.
.
.
. 289
Using
the
Personal
Communications
DDE
Interface
289
System
Conversation
.
.
.
.
.
.
.
.
.
. 290
Session
Conversation
.
.
.
.
.
.
.
.
.
. 290
Session
Conversation
(Hot
Link)
.
.
.
.
.
. 292
Personal
Communications
DDE
Interface
.
.
.
. 293
DDE
Functions
for
System
Conversation
.
.
.
. 293
Get
System
Configuration
.
.
.
.
.
.
.
. 293
Get
System
Formats
.
.
.
.
.
.
.
.
.
. 294
Get
System
Status
.
.
.
.
.
.
.
.
.
.
. 294
Get
System
SysItems
.
.
.
.
.
.
.
.
.
. 295
Get
System
Topics
.
.
.
.
.
.
.
.
.
.
. 295
Initiate
System
Conversation
.
.
.
.
.
.
. 295
Terminate
System
Conversation
.
.
.
.
.
. 296
DDE
Functions
for
Session
Conversation
.
.
.
. 296
Find
Field
.
.
.
.
.
.
.
.
.
.
.
.
. 296
Get
Operator
Information
Area
.
.
.
.
.
. 297
Get
Partial
Presentation
Space
.
.
.
.
.
.
. 298
Get
Presentation
Space
.
.
.
.
.
.
.
.
. 299
Get
Session
Status
.
.
.
.
.
.
.
.
.
.
. 300
Get
Trim
Rectangle
.
.
.
.
.
.
.
.
.
. 300
Initiate
Session
Conversation
.
.
.
.
.
.
. 301
Put
Data
to
Presentation
Space
.
.
.
.
.
. 301
Search
for
String
.
.
.
.
.
.
.
.
.
.
. 302
Session
Execute
Macro
.
.
.
.
.
.
.
.
. 303
Set
Cursor
Position
.
.
.
.
.
.
.
.
.
. 303
Terminate
Session
Conversation
.
.
.
.
.
. 304
DDE
Functions
for
Session
Conversation
(Hot
Link)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 304
Initiate
Session
Conversation
.
.
.
.
.
.
. 304
Start
Close
Intercept
.
.
.
.
.
.
.
.
.
. 304
Start
Keystroke
Intercept
.
.
.
.
.
.
.
. 305
Start
Session
Advise
.
.
.
.
.
.
.
.
.
. 305
Stop
Close
Intercept
.
.
.
.
.
.
.
.
.
. 307
Stop
Keystroke
Intercept
.
.
.
.
.
.
.
.
. 307
Contents
v
-
Stop
Session
Advise
.
.
.
.
.
.
.
.
.
. 307
Terminate
Session
Conversation
.
.
.
.
.
. 308
Visual
Basic
Sample
Program
.
.
.
.
.
.
.
. 308
Chapter
8.
Server-Requester
Programming
Interface
(SRPI)
Support
321
How
to
Use
SRPI
.
.
.
.
.
.
.
.
.
.
.
. 321
SRPI
Compatibility
.
.
.
.
.
.
.
.
.
.
. 321
Using
the
Server-Requester
Programming
Interface
322
SEND_REQUEST
Parameters
.
.
.
.
.
.
.
. 324
Supplied
Parameters
.
.
.
.
.
.
.
.
.
. 324
Returned
Parameters
.
.
.
.
.
.
.
.
.
. 326
How
PC/3270
Applications
Use
SRPI
.
.
.
.
. 326
Invoking
SEND_REQUEST
.
.
.
.
.
.
.
.
. 327
Performance
Considerations
.
.
.
.
.
.
.
. 327
Handling
the
Interrupt
(Ctrl+Break)
Key
.
.
.
. 327
C
Requesters
.
.
.
.
.
.
.
.
.
.
.
.
. 327
C
send_request
Function
.
.
.
.
.
.
.
. 328
SRPI
Record
Definition
.
.
.
.
.
.
.
.
. 328
SRPI
Return
Codes
.
.
.
.
.
.
.
.
.
. 328
Appendix
A.
Query
Reply
Data
Structures
Supported
by
EHLLAPI
.
. 329
The
DDM
Query
Reply
.
.
.
.
.
.
.
.
.
. 329
DDM
Application
Name
Self-Defining
Parameter
.
.
.
.
.
.
.
.
.
.
.
.
. 330
PCLK
Protocol
Controls
Self-Defining
Parameter
330
Base
DDM
Query
Reply
Formats
.
.
.
.
.
. 330
The
IBM
Auxiliary
Device
Query
Reply
.
.
.
. 332
Optional
Parameters
.
.
.
.
.
.
.
.
.
. 332
Direct
Access
Self-Defining
Parameter
.
.
.
. 333
PCLK
Protocol
Controls
Self-Defining
Parameter
334
The
OEM
Auxiliary
Device
Query
Reply
.
.
.
. 334
Direct
Access
Self-Defining
Parameter
.
.
.
. 335
PCLK
Protocol
Controls
Self-Defining
Parameter
335
The
Cooperative
Processing
Requester
Query
Reply
336
The
Product-Defined
Query
Reply
.
.
.
.
.
. 336
Optional
Parameters
.
.
.
.
.
.
.
.
.
. 336
Direct
Access
Self-Defining
Parameter
.
.
.
. 337
The
Document
Interchange
Architecture
Query
Reply
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 338
Appendix
B.
Differences
from
Communication
Manager/2
EHLLAPI
. 341
Set
Session
Parameter
(9)
.
.
.
.
.
.
.
.
. 341
Set
Options
.
.
.
.
.
.
.
.
.
.
.
.
. 341
Return
Parameters
.
.
.
.
.
.
.
.
.
.
. 341
EAB
Option
.
.
.
.
.
.
.
.
.
.
.
.
. 341
Copy
OIA
(13)
.
.
.
.
.
.
.
.
.
.
.
.
. 342
Copy
String
to
PS
(15)
.
.
.
.
.
.
.
.
.
. 342
Storage
Manager
(17)
.
.
.
.
.
.
.
.
.
.
. 343
Copy
String
to
Field
(33)
.
.
.
.
.
.
.
.
. 343
Get
Key
(51)
.
.
.
.
.
.
.
.
.
.
.
.
.
. 343
Window
Status
(104)
.
.
.
.
.
.
.
.
.
.
. 343
Query
Sessions
(10)
.
.
.
.
.
.
.
.
.
.
. 343
Connect
for
Structured
Fields
(120)
.
.
.
.
.
. 343
Allocate
Communications
Buffer
(123)
.
.
.
.
. 343
ASCII
Mnemonics
.
.
.
.
.
.
.
.
.
.
.
. 344
Get
Request
Completion
(125)
.
.
.
.
.
.
.
. 344
Appendix
C.
DOS-Mode
EHLLAPI
for
Windows
.
.
.
.
.
.
.
.
.
.
.
.
. 345
Installation
.
.
.
.
.
.
.
.
.
.
.
.
.
. 345
Appendix
D.
SRPI
Return
Codes
.
.
. 347
Error
Handling
.
.
.
.
.
.
.
.
.
.
.
.
. 347
Transport
Layer
Errors
.
.
.
.
.
.
.
.
. 347
Application
Errors
.
.
.
.
.
.
.
.
.
.
. 347
SEND_REQUEST
Processing
Errors
.
.
.
.
. 347
Types
of
SRPI
Return
Codes
.
.
.
.
.
.
.
. 347
Type
0
Return
Code
Definitions
.
.
.
.
.
. 348
Type
1
Return
Code
Definitions
.
.
.
.
.
. 348
Type
2
Return
Code
Definitions
.
.
.
.
.
. 350
Type
3
Return
Code
Definitions
.
.
.
.
.
. 351
Class
Definitions
for
Type
2
and
Type
3
.
.
.
. 351
Exception
Code
Values
for
Type
2
and
Type
3
.
. 352
Exception
Object
Values
for
Type
2
and
Type
3
.
. 352
Server
Return
Codes
.
.
.
.
.
.
.
.
.
.
. 353
Appendix
E.
DDE
Functions
in
a
16-Bit
Environment
.
.
.
.
.
.
.
.
. 355
Personal
Communications
DDE
Data
Items
in
a
16-Bit
Environment
.
.
.
.
.
.
.
.
.
.
. 355
Using
System
Topic
Data
Items
.
.
.
.
.
. 356
Using
Session
Topic
Data
Items
.
.
.
.
.
. 356
Using
LU
Topic
Data
Items
(PC/3270
Only)
.
. 356
DDE
Functions
in
a
16-Bit
Environment
.
.
.
. 356
Naming
Conventions
for
Parameters
.
.
.
. 357
Find
Field
.
.
.
.
.
.
.
.
.
.
.
.
. 358
Get
Keystrokes
.
.
.
.
.
.
.
.
.
.
.
. 359
Get
Mouse
Input
.
.
.
.
.
.
.
.
.
.
. 360
Get
Number
of
Close
Requests
.
.
.
.
.
. 363
Get
Operator
Information
Area
.
.
.
.
.
. 364
Get
Partial
Presentation
Space
.
.
.
.
.
.
. 365
Get
Presentation
Space
.
.
.
.
.
.
.
.
. 367
Get
Session
Status
.
.
.
.
.
.
.
.
.
.
. 369
Get
System
Configuration
.
.
.
.
.
.
.
. 370
Get
System
Formats
.
.
.
.
.
.
.
.
.
. 371
Get
System
Status
.
.
.
.
.
.
.
.
.
.
. 372
Get
System
SysItems
.
.
.
.
.
.
.
.
.
. 373
Get
System
Topics
.
.
.
.
.
.
.
.
.
.
. 374
Get
Trim
Rectangle
.
.
.
.
.
.
.
.
.
. 375
Initiate
Session
Conversation
.
.
.
.
.
.
. 375
Initiate
Structured
Field
Conversation
.
.
.
. 376
Initiate
System
Conversation
.
.
.
.
.
.
. 377
Put
Data
to
Presentation
Space
.
.
.
.
.
. 377
Search
for
String
.
.
.
.
.
.
.
.
.
.
. 378
Send
Keystrokes
.
.
.
.
.
.
.
.
.
.
. 379
Session
Execute
Macro
.
.
.
.
.
.
.
.
. 380
Set
Cursor
Position
.
.
.
.
.
.
.
.
.
. 387
Set
Mouse
Intercept
Condition
.
.
.
.
.
. 388
Set
Presentation
Space
Service
Condition
.
.
. 390
Set
Session
Advise
Condition
.
.
.
.
.
.
. 392
Set
Structured
Field
Service
Condition
.
.
.
. 393
Start
Close
Intercept
.
.
.
.
.
.
.
.
.
. 394
Start
Keystroke
Intercept
.
.
.
.
.
.
.
. 395
Start
Mouse
Input
Intercept
.
.
.
.
.
.
. 396
Start
Read
SF
.
.
.
.
.
.
.
.
.
.
.
. 399
Start
Session
Advise
.
.
.
.
.
.
.
.
.
. 401
Stop
Close
Intercept
.
.
.
.
.
.
.
.
.
. 402
vi
Emulator
Programming
-
Stop
Keystroke
Intercept
.
.
.
.
.
.
.
.
. 403
Stop
Mouse
Input
Intercept
.
.
.
.
.
.
.
. 403
Stop
Read
SF
.
.
.
.
.
.
.
.
.
.
.
. 404
Stop
Session
Advise
.
.
.
.
.
.
.
.
.
. 405
Terminate
Session
Conversation
.
.
.
.
.
. 405
Terminate
Structured
Field
Conversation
.
.
. 406
Terminate
System
Conversation
.
.
.
.
.
. 406
Write
SF
.
.
.
.
.
.
.
.
.
.
.
.
.
. 407
DDE
Menu
Item
API
in
a
16-Bit
Environment
.
. 407
DDE
Menu
Client
in
a
16-Bit
Environment
.
. 408
DDE
Menu
Server,
32-Bit
.
.
.
.
.
.
.
. 408
DDE
Menu
Functions
in
a
16-Bit
Environment
.
. 409
Change
Menu
Item
.
.
.
.
.
.
.
.
.
. 409
Create
Menu
Item
.
.
.
.
.
.
.
.
.
.
. 415
Initiate
Menu
Conversation
.
.
.
.
.
.
.
. 416
Start
Menu
Advise
.
.
.
.
.
.
.
.
.
. 417
Stop
Menu
Advise
.
.
.
.
.
.
.
.
.
.
. 418
Terminate
Menu
Conversation
.
.
.
.
.
.
. 419
Summary
of
DDE
Functions
in
a
16-Bit
Environment
.
.
.
.
.
.
.
.
.
.
.
.
. 419
Appendix
F.
REXX
EHLLAPI
Functions
425
Overview
of
REXX
EHLLAPI
Function
Calls
and
Return
Values
.
.
.
.
.
.
.
.
.
.
.
.
. 425
Installation
.
.
.
.
.
.
.
.
.
.
.
.
. 425
Conventions
.
.
.
.
.
.
.
.
.
.
.
.
. 425
Summary
of
Prerequisite
Calls
for
Functions
.
.
. 426
Summary
of
EHLLAPI
and
REXX
EHLLAPI
Functions
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 427
Change_Switch_Name
.
.
.
.
.
.
.
.
. 430
Change_Window_Name
.
.
.
.
.
.
.
.
. 431
Connect
.
.
.
.
.
.
.
.
.
.
.
.
.
. 432
Connect_PM
.
.
.
.
.
.
.
.
.
.
.
.
. 433
Convert_Pos
.
.
.
.
.
.
.
.
.
.
.
.
. 434
Copy_Field_To_Str
.
.
.
.
.
.
.
.
.
. 435
Copy_OIA
.
.
.
.
.
.
.
.
.
.
.
.
. 436
Copy_PS
.
.
.
.
.
.
.
.
.
.
.
.
.
. 437
Copy_PS_To_Str
.
.
.
.
.
.
.
.
.
.
. 438
Copy_Str_To_Field
.
.
.
.
.
.
.
.
.
. 439
Copy_Str_To_PS
.
.
.
.
.
.
.
.
.
.
. 440
Disconnect
.
.
.
.
.
.
.
.
.
.
.
.
. 441
Disconnect_PM
.
.
.
.
.
.
.
.
.
.
.
. 442
Find_Field_Len
.
.
.
.
.
.
.
.
.
.
.
. 443
Find_Field_Pos
.
.
.
.
.
.
.
.
.
.
.
. 444
Get_Key
.
.
.
.
.
.
.
.
.
.
.
.
.
. 445
Get_Window_Status
.
.
.
.
.
.
.
.
.
. 446
Intercept_Status
.
.
.
.
.
.
.
.
.
.
. 447
Lock_PMSVC
.
.
.
.
.
.
.
.
.
.
.
. 448
Lock_PS
.
.
.
.
.
.
.
.
.
.
.
.
.
. 449
Pause
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 450
Query_Close_Intercept
.
.
.
.
.
.
.
.
. 451
Query_Cursor_Pos
.
.
.
.
.
.
.
.
.
. 452
Query_Emulator_Status
.
.
.
.
.
.
.
.
. 453
Query_Field_Attr
.
.
.
.
.
.
.
.
.
.
. 454
Query_Host_Update
.
.
.
.
.
.
.
.
.
. 455
Query_Session_List
.
.
.
.
.
.
.
.
.
. 456
Query_Session_Status
.
.
.
.
.
.
.
.
. 457
Query_Sessions
.
.
.
.
.
.
.
.
.
.
.
. 458
Query_System
.
.
.
.
.
.
.
.
.
.
.
. 459
Query_Window_Coord
.
.
.
.
.
.
.
.
. 460
Query_Workstation_Profile
.
.
.
.
.
.
.
. 461
Receive_File
.
.
.
.
.
.
.
.
.
.
.
.
. 462
Release
.
.
.
.
.
.
.
.
.
.
.
.
.
. 463
Reserve
.
.
.
.
.
.
.
.
.
.
.
.
.
. 464
Reset_System
.
.
.
.
.
.
.
.
.
.
.
. 465
Search_Field
.
.
.
.
.
.
.
.
.
.
.
.
. 466
Search_PS
.
.
.
.
.
.
.
.
.
.
.
.
. 467
Send_File
.
.
.
.
.
.
.
.
.
.
.
.
.
. 468
Sendkey
.
.
.
.
.
.
.
.
.
.
.
.
.
. 469
Set_Cursor_Pos
.
.
.
.
.
.
.
.
.
.
.
. 470
Set_Session_Parms
.
.
.
.
.
.
.
.
.
.
. 471
Set_Window_Status
.
.
.
.
.
.
.
.
.
. 472
Start_Close_Intercept
.
.
.
.
.
.
.
.
.
. 473
Start_Communication
.
.
.
.
.
.
.
.
. 474
Start_Host_Notify
.
.
.
.
.
.
.
.
.
.
. 475
Start_Keystroke_Intercept
.
.
.
.
.
.
.
. 476
Start_Session
.
.
.
.
.
.
.
.
.
.
.
. 477
Stop_Close_Intercept
.
.
.
.
.
.
.
.
.
. 478
Stop_Communication
.
.
.
.
.
.
.
.
.
. 479
Stop_Host_Notify
.
.
.
.
.
.
.
.
.
.
. 480
Stop_Keystroke_Intercept
.
.
.
.
.
.
.
. 481
Stop_Session
.
.
.
.
.
.
.
.
.
.
.
. 482
Wait
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 483
Programming
Notes
.
.
.
.
.
.
.
.
.
.
. 484
Sample
Programs
.
.
.
.
.
.
.
.
.
.
.
. 484
Appendix
G.
Notices
.
.
.
.
.
.
.
. 485
Trademarks
.
.
.
.
.
.
.
.
.
.
.
.
.
. 486
Index
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 489
Contents
vii
-
viii
Emulator
Programming
-
Figures
1.
Keystroke
Flow
.
.
.
.
.
.
.
.
.
.
. 25
2.
Host
Presentation
Space
Characters
.
.
.
. 50
3.
DDE
Menu
Server
Conversation
.
.
.
.
. 271
4.
DDE
Menu
Client
Conversation
.
.
.
.
. 272
5.
Example
of
PC/3270
SRPI
Requester
and
Server
.
.
.
.
.
.
.
.
.
.
.
.
.
. 322
6.
IBM
Workstation
Requester
and
IBM
Host
Computer
Server
Relationship
.
.
.
.
.
. 323
7.
Example
of
an
SRPI
Requester
and
Server
Flow
.
.
.
.
.
.
.
.
.
.
.
.
.
. 324
8.
DDE
Menu
Server
Conversation
.
.
.
.
. 408
9.
DDE
Menu
Client
Conversation
.
.
.
.
. 409
©
Copyright
IBM
Corp.
1989,
2004
ix
-
x
Emulator
Programming
-
Tables
1.
Sample
Program
Files
.
.
.
.
.
.
.
.
. 3
2.
Sample
Program
Subdirectories
.
.
.
.
.
. 3
3.
EHLLAPI
Return
Codes
.
.
.
.
.
.
.
.
. 8
4.
EHLLAPI
Read
and
Write
Sharing
Option
Combinations
.
.
.
.
.
.
.
.
.
.
.
. 15
5.
Prerequisite
Functions
and
Associated
Dependent
Functions
.
.
.
.
.
.
.
.
. 15
6.
EHLLAPI
Functions
Summary
.
.
.
.
.
. 28
7.
Mnemonics
with
Uppercase
Alphabetic
Characters
.
.
.
.
.
.
.
.
.
.
.
. 136
8.
Mnemonics
with
Numbers
or
Lowercase
Characters
.
.
.
.
.
.
.
.
.
.
.
. 136
9.
Mnemonics
with
@A
and
@
Uppercase
Alphabetic
Characters
.
.
.
.
.
.
.
.
. 137
10.
Mnemonics
with
@A
and
@
Lowercase
Alphabetic
Characters
.
.
.
.
.
.
.
.
. 138
11.
Mnemonics
with
@A
and
@
Alphanumeric
(Special)
Characters
.
.
.
.
.
.
.
.
. 138
12.
Mnemonics
with
@S
(Shift)
and
@
Alphabetic
Characters
.
.
.
.
.
.
.
.
.
.
.
. 139
13.
Mnemonics
Using
@X
and
@Alphabetic
Lowercase
(For
DBCS
Only)
.
.
.
.
.
. 139
14.
Mnemonics
Using
@M,
@Q
and
@Alphabetic
Lowercase
(For
VT
Only)
.
.
.
.
.
.
. 139
15.
Mnemonics
with
Special
Character
Keys
142
16.
BIDI
Key
Mnemonics
.
.
.
.
.
.
.
.
. 142
17.
Naming
Scheme
for
Data
Items
.
.
.
.
. 213
18.
DDE
Functions
Available
for
Personal
Communications
.
.
.
.
.
.
.
.
.
. 215
19.
SENDKEY
Command
List
.
.
.
.
.
.
. 245
20.
DDE
Function
Summary
.
.
.
.
.
.
.
. 283
21.
Naming
Scheme
for
Data
Items
.
.
.
.
. 289
22.
Topics
for
Personal
Communications
289
23.
Parameters
Supplied
by
the
SRPI
Requester
324
24.
Parameters
Returned
to
the
SRPI
Requester
326
25.
DDM
Query
Reply
Base
Format
.
.
.
.
. 329
26.
DDM
Application
Name
Self-Defining
Parameter
.
.
.
.
.
.
.
.
.
.
.
.
. 330
27.
DDM
PCLK
Auxiliary
Device
Self-Defining
Parameter
.
.
.
.
.
.
.
.
.
.
.
.
. 330
28.
Base
DDM
Query
Reply
Format
with
Name
and
Direct
Access
Self-Defining
Parameters
. 331
29.
Base
DDM
Query
Reply
Format
with
Direct
Access
and
Name
Self-Defining
Parameters
. 331
30.
IBM
Auxiliary
Device
Base
Format
with
Direct
Access
Self-Defining
Parameter
.
.
. 333
31.
IBM
Auxiliary
Device
Direct
Access
Self-Defining
Parameter
.
.
.
.
.
.
.
. 334
32.
IBM
Auxiliary
Device
PCLK
Self-Defining
Parameter
.
.
.
.
.
.
.
.
.
.
.
.
. 334
33.
OEM
Auxiliary
Device
Base
Format
with
Direct
Access
Self-Defining
Parameter
.
.
. 334
34.
OEM
Auxiliary
Device
Direct
Access
Self-Defining
Parameter
.
.
.
.
.
.
.
. 335
35.
IBM
Auxiliary
Device
PCLK
Self-Defining
Parameter
.
.
.
.
.
.
.
.
.
.
.
.
. 335
36.
CPR
Query
Reply
Buffer
Format
.
.
.
.
. 336
37.
IBM
Product-Defined
Query
Reply
Base
Format
.
.
.
.
.
.
.
.
.
.
.
.
.
. 337
38.
Valid
REFID
and
SSID
Values
for
the
IBM
Product-Defined
Query
Reply
.
.
.
.
.
. 337
39.
IBM
Product-Defined
Direct
Access
Self-Defining
Parameter
.
.
.
.
.
.
.
. 338
40.
IBM
DIA
Base
Format
.
.
.
.
.
.
.
.
. 338
41.
IBM
Product-Defined
Direct
Access
Self-Defining
Parameter
.
.
.
.
.
.
.
. 339
42.
Type
1
Return
Code
Definitions
and
Descriptions
.
.
.
.
.
.
.
.
.
.
.
. 348
43.
Type
3
Return
Code
Definitions
and
Descriptions
.
.
.
.
.
.
.
.
.
.
.
. 351
44.
Class
Definitions
for
Type
2
and
Type
3
351
45.
Exception
Code
Values
for
Type
2
and
Type
3
352
46.
Exception
Object
Values
for
Type
2
and
Type
3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 352
47.
Naming
Scheme
for
Data
Items
.
.
.
.
. 355
48.
DDE
Functions
in
a
16–Bit
Environment
356
49.
SENDKEY
Command
List
.
.
.
.
.
.
. 383
50.
Summary
of
DDE
Functions
in
a
16-Bit
Environment
.
.
.
.
.
.
.
.
.
.
.
. 419
51.
Prerequisite
Calls
for
Functions
.
.
.
.
. 426
52.
EHLLAPI
and
REXX
EHLLAPI
Functions
427
©
Copyright
IBM
Corp.
1989,
2004
xi
-
xii
Emulator
Programming
-
About
This
Book
This
book
provides
necessary
programming
information
for
you
to
use
the
IBM®
Personal
Communications
for
Windows®
Emulator
High-Level
Language
Application
Program
Interface
(EHLLAPI),
Dynamic
Data
Exchange
(DDE),
Personal
Communications
Session
API
(PCSAPI),
and
Server-Requester
Programming
Interface
(SRPI).
The
Host
Access
Class
Library
is
described
in
Host
Access
Class
Library.
EHLLAPI/DDE/PCSAPI
is
used
with
Personal
Communications
to
provide
a
way
for
users
and
programmers
to
access
the
host
presentation
space
with
a
set
of
functions
that
can
be
called
from
an
application
program
running
in
a
workstation
session.
In
this
book,
Windows
refers
to
Windows
98,
Windows
NT®,
Windows
Me,
Windows
2000,
and
Windows
XP.
When
information
is
relevant
only
to
a
specific
operating
system,
this
will
be
indicated
in
the
text.
Who
Should
Read
This
Book
This
book
is
intended
for
programmers
who
write
application
programs
that
use
the
APIs
documented
in
this
book.
A
working
knowledge
of
Windows
is
assumed.
For
information
about
Windows,
refer
to
the
list
of
publications
under
“Where
To
Find
More
Information.”
The
programmer
must
also
be
familiar
with
connecting
to
a
host
system
from
a
terminal
or
from
a
workstation
with
terminal
emulation
software.
This
book
assumes
you
are
familiar
with
the
language
and
the
compiler
that
you
are
using.
For
information
on
how
to
write,
compile,
or
link-edit
programs,
refer
to
Where
To
Find
More
Information
for
the
appropriate
references
for
the
specific
language
you
are
using.
Where
To
Find
More
Information
The
Personal
Communications
library
includes
the
following
publications:
v
CD-ROM
Guide
to
Installation
v
Quick
Beginnings
v
Emulator
User’s
Reference
v
Administrator’s
Guide
and
Reference
v
Emulator
Programming
v
Client/Server
Communications
Programming
v
System
Management
Programming
v
CM
Mouse
Support
User’s
Guide
and
Reference
v
Host
Access
Class
Library
v
Configuration
File
Reference
In
addition
to
the
printed
books,
there
are
Hypertext
Markup
Language
(HTML)
documents
provided
with
Personal
Communications:
©
Copyright
IBM
Corp.
1989,
2004
xiii
-
Host
Access
Class
Library
This
HTML
document
describes
how
to
write
an
ActiveX/OLE
2.0–compliant
application
to
use
Personal
Communications
as
an
embedded
object.
Host
Access
Beans
for
Java™
This
HTML
document
describes
Personal
Communications
emulator
functions
delivered
as
a
set
of
JavaBeans™.
Open
Host
Interface
Objects
(OHIO)
for
Java
This
HTML
document
describes
how
to
write
an
OHIO-compliant
application
to
use
Personal
Communications
as
an
embedded
object.
Following
is
a
list
of
related
publications:
v
IBM
3270
Information
Display
System
Data
Stream
Programmer’s
Reference,
GA23-0059
v
IBM
5250
Information
Display
System
Functions
Reference
Manual,
SA21-9247
Refer
to
the
IBM
Glossary
of
Computing
Terms
at
http://www.networking.ibm.com/nsg/nsgmain.htm
for
definitions
of
technical
terms
used
throughout
this
book.
Notation
A
table
at
the
beginning
of
each
section
explains
API
or
DDE
functions
in
Chapter
3,
“EHLLAPI
Functions,”
on
page
27,
Chapter
5,
“PCSAPI
Functions,”
on
page
189,
Chapter
6,
“DDE
Functions
in
a
32–bit
Environment,”
on
page
213,
and
Appendix
E,
“DDE
Functions
in
a
16-Bit
Environment,”
on
page
355.
It
shows
whether
a
function
is
supported
for
the
products
that
provide
the
function
described
in
the
section.
Yes
means
it
is
supported
for
a
host
type,
and
No
means
not
supported.
For
example,
the
following
table
indicates
that
a
function
is
available
for
3270
and
VT
sessions
but
not
for
5250
sessions.
3270
5250
VT
Yes
No
Yes
xiv
Emulator
Programming
-
Chapter
1.
Introduction
to
Emulator
APIs
The
IBM
Personal
Communications
product
supplies
several
application
programming
interfaces
(APIs).
Each
interface
has
a
specific
set
of
functions
and
may
be
used
for
different
purposes.
Choose
the
programming
interface
that
best
matches
the
functional
requirements
of
your
application.
Some
applications
may
use
more
than
one
interface
to
achieve
the
desired
results.
The
programming
interfaces
are:
v
Emulator
High
Level
Language
API
(EHLLAPI):
This
interface
provides
functions
to
access
emulator
″presentation
space″
data
such
as
characters
on
the
host
screen.
It
also
provides
functions
for
sending
keystrokes
to
the
host,
intercepting
user-entered
keystrokes,
querying
the
status
of
the
host
session,
uploading
and
downloading
files,
and
other
functions.
This
interface
is
often
used
for
automated
operator
applications
which
read
host
screens
and
enter
keystrokes
without
direct
user
intervention.
See
Chapter
3,
“EHLLAPI
Functions,”
on
page
27.
–
IBM
Standard
HLLAPI
Support:
This
is
a
standard
programming
interface
which
allows
programmatic
access
to
a
host
emulator
session.
See
Chapter
2,
“Introduction
to
IBM
Standard
EHLLAPI,
IBM
Enhanced
EHLLAPI
and
WinHLLAPI
Programming,”
on
page
5.
–
IBM
Enhanced
HLLAPI
Support:
This
interface
is
based
on
the
IBM
Standard
HLLAPI
interface.
It
provides
all
of
the
existing
functionality
but
uses
modified
data
structures.
See
Chapter
2,
“Introduction
to
IBM
Standard
EHLLAPI,
IBM
Enhanced
EHLLAPI
and
WinHLLAPI
Programming,”
on
page
5.
–
Windows
High
Level
Language
API
(WinHLLAPI):
This
interface
provides
much
of
the
same
functionality
of
IBM
Standard
EHLLAPI
and
adds
some
extensions
that
take
advantage
of
the
Windows
environment.
See
Chapter
2,
“Introduction
to
IBM
Standard
EHLLAPI,
IBM
Enhanced
EHLLAPI
and
WinHLLAPI
Programming,”
on
page
5.
–
REXX
EHLLAPI:
This
allows
programmers
who
are
using
EHLLAPI
to
write
REXX
language
application
programs.v
Dynamic
Data
Exchange
(DDE):
This
interface
is
similar
to
the
EHLLAPI
interface
in
that
it
provides
a
programmable
means
to
read
the
host
screen,
send
keystrokes,
and
perform
related
functions.
It
has
some
additional
functions
for
access
to
the
emulator
clipping
rectangle,
intercepting
mouse
events,
and
adding/removing
commands
on
the
emulator
menu
bar.
See
Chapter
6,
“DDE
Functions
in
a
32–bit
Environment,”
on
page
213.
v
Personal
Communications
Session
API
(PCSAPI):
This
interface
is
used
to
start,
stop,
and
control
emulator
sessions
and
settings.
See
Chapter
5,
“PCSAPI
Functions,”
on
page
189.
For
Personal
Communications
Version
5.8,
functions
have
been
added
to
allow
control
and
retrieval
of
page
and
printer
settings.
See
“Page
Setup
Functions”
on
page
197
and
“Printer
Setup
Functions”
on
page
203.
v
Server-Requestor
Programming
Interface
(SRPI):
This
interface
is
used
in
cooperation
with
an
IBM
Enhanced
Connectivity
Facility
(ECF)
application
running
on
a
host
system.
This
API
provides
functions
for
writing
synchronous
call-return
interfaces
to
remote
server
programs.
See
Chapter
8,
“Server-Requester
Programming
Interface
(SRPI)
Support,”
on
page
321.
©
Copyright
IBM
Corp.
1989,
2004
1
-
v
IBM
Personal
Communications
Host
Access
Class
Library
(ECL):
ECL
is
a
set
of
objects
that
allow
application
programmers
and
scripting
language
writers
to
access
host
applications
easily
and
quickly.
Personal
Communications
supports
three
different
ECL
layers
(C++
objects,
ActiveAutomation
(OLE),
and
LotusScript
Extension
(LSX)).
Refer
to
Personal
Communications
Version
5.8
Host
Access
Class
Library
(HACL)
for
more
details.
Using
API
Header
Files
The
application
program
should
include
operating
system
header
files
before
including
API
header
files.
For
example:
#include
//
Windows
main
header
#include
"pcsapi.h"
//
PComm
PCSAPI
header
...
Critical
Sections
Use
critical
sections
(EnterCriticalSection
function)
carefully
when
your
program
calls
emulator
APIs.
Do
not
make
emulator
API
calls
within
a
critical
section.
If
one
thread
of
an
application
establishes
a
critical
section
and
another
thread
is
within
an
emulator
API
call,
the
call
is
suspended
until
you
exit
from
the
critical
section.
During
processing
of
an
API
call,
all
signals
(except
numeric
coprocessor
signals)
are
delayed
until
the
call
completes
or
until
the
call
needs
to
wait
for
incoming
data.
Also,
TerminateProcess
issued
from
another
process
is
held
until
the
application
completes
an
API
call
it
might
be
processing.
Stack
Size
Emulator
APIs
use
the
calling
program’s
stack
when
they
are
executed.
The
operating
system,
the
application,
and
the
API
all
require
stack
space
for
dynamic
variables
and
function
parameters.
At
least
8196
bytes
(8K)
of
stack
space
should
be
available
at
the
time
of
an
API
call.
It
is
the
responsibility
of
the
application
program
to
ensure
sufficient
stack
space
is
available
for
the
API.
Running
16-bit
Windows
EHLLAPI
programs
in
Windows
NT,
2000,
or
XP
In
Windows
NT,
2000,
or
XP
(any
NT-based
operating
system),
if
you
are
running
multipl