Change PS Window Name – Function 106
This function allows an application to reset or change the presentation space window name.
Prerequisite function
Connect Window Services (101)
Function call
WORD WinHLLAPI(LPWORD CHANGEPSNAME, // Pointer to function number
LPSTR lpbyString, // Pointer to data string
LPWORD lpwLength, // Pointer to length
LPWORD lpwReturnCode) ; // Pointer to return code
Call parameters
Parameter Description
Data String One of the following:
Byte 1 letter A-Z, which indicates presentation short name. a " " (space) which indicates for the currently connected presentation.
Byte 2 A change request value:
X'01' Change the Reflection for IBM presentation space window name.
X'02' Reset the Reflection for IBM presentation space window name.
Bytes 3-63 An ASCII string that specify the new name. This string must end with a null character. Length A length between 3 and 63.
Data Length 3-63
PS Position NA
Return code
Code Description
WHLLOK The function was successful.
WHLLNOTCONNECTED An invalid presentation space was specified, or was not connected for window services.
WHLLPARAMETERERROR An invalid option was specified.
WHLLSYSERROR The function failed due to a system error.
Remarks
A string is ended at the first NULL character found. The NULL character overrides the specified string length. If the NULL character is not at the end of the specified length, the last byte at the specified length is replaced by a NULL character, and the remainder of the data string is lost. If the NULL character is found before the specified length, the string is truncated at that point, and the remainder of the data string is lost.
If the application fails to reset the presentation space name before exiting, the exit list processing resets the name.