User`s guide

cxxiv Contents
Disconnect Structured Fields—Function 121
This function drops the connection between the Windows HLLAPI application and the specified
session.
Prerequisite Functions
Connect Structured Fields (function 120).
WinHLLAPI(DISCONSTRFLDS,lpbyString,lpwLength,lpwReturnnCode)
Parameter Description
Data String A 3-byte string with the following format:
Byte 1 Short name session ID.
Bytes 2-3 A 16-bit value which represents the
destination/origin ID returned to the
application by the Connect Structured
Fields (120) function.
Data Length Must be user-specified.
PS Position NA.
Code Description
WHLLOK The function was successful.
WHLLNOTCONNECTED An invalid presentation space was specified, or was not
connected for structured field access.
WHLLPARAMETERERROR An invalid parameter was specified.
WHLLSYSERROR The function failed due to a system error.
WHLLSFDPEND
The session was disconnected with asynchronous requests
pending.
When a Disconnect Structured Fields (121) is called, any active asynchronous Read Structured Fields
(126) or Write Structured Fields (127) function requests are returned if the application issues the Get
Request Completion (125) function call. Use the asynchronous form of this function when cleaning up
after issuing a Disconnect call.
Before exiting the application, you should request the Disconnect Structured Fields (121) function for
all emulation sessions that have been connected to using the Connect Structured Fields (120) function.
If the application exits with outstanding requests for structured field connections, the those outstanding
requests are cancelled. The Reset System (21) function also causes any outstanding requests to be
cancelled before disconnecting from structured fields.
Any outstanding asynchronous requests that have not been retrieved by the application using the Get
Request Completion (125) function are cleared by the Reset System (21) function, or when
WinHLLAPI is initialized again.
Structured fields are not supported by the COBOL programming language
due to memory access problems inherent to the language.
Function Call
Call Parameters
Return Codes
Remarks
Note