User`s guide
xxxvi Contents
Copy String to Field—Function 33
This function copies a string into the specified field in the Host session presentation space.
Prerequisite Functions
Connect Presentation Space (function 1).
WinHLLAPI(COPYSTRINGTOFIELD,lpbyString,lpwLength,
lpwReturnnCode)
Parameter Description
Data String String to copy to the specified field.
Data Length Number of characters. NA if session option EOT is
specified.
PS Position The position in the Host session presentation space of the
field to copy Data String to. This value can be any byte
within the field, since the copy always starts at the
beginning of the field.
Code Description
WHLLOK The string was copied successfully.
WHLLNOTCONNECTED Your Windows HLLAPI application is not currently
connected to a Host session.
WHLLPARAMETERERROR Data Length invalid (set to zero).
WHLLINHIBITED The specified field is protected, or attempted to copy
invalid data (such as a field attribute).
WHLLTRUNCATED The string was copied successfully, but one or more
characters were truncated.
WHLLPOSITIONERROR PS Position is invalid.
WHLLSYSERROR The function failed due to a system error.
WHLLNOFIELD The Host session presentation space is unformatted.
Position in the Host session presentation space is determined by starting in the upper left corner of the
screen display (row 1, column 1). At the end of each screen display row, the next Host session
presentation space position is column 1 of the following screen display row. This process continues
until the end of the Host session presentation space (screen display) is reached.
This function is affected by the session options STRLEN/STREOT, EOT=c and EAB/NOEAB. See Set
Session Parameters (function 9) for details on these session options.
Data String is copied to the specified field, starting with the first position of the field, until one of the
following occurs:
u The end of the field is encountered.
u If the EOT session option is set and an EOT is encountered.
u If the EOT session option is not set and the number of characters specified by
Data Length have been copied.
Function Call
Call Parameters
Return Codes
Remarks