HP-UX SNAplus2 R7 APPC Programmer's Guide

Writing Transaction Programs
APPC Entry Points: Windows Systems
A system error occurred.
If the application is using the alternative method to indicate completion, APPC sets the asynchronous return
code to one of the return codes in the list for the
lParam argument (in the Windows message) when the call
completes.
The application can test for success or failure by testing the expressions RetCode & APPC_CFG_SUCCESS
or RetCode & APPC_CFG_FAILURE, where RetCode is the lParam argument in the Windows message or the
AsyncRetCode parameter returned to the application. If RetCode & APPC_CFG_SUCCESS is
TRUE, the call was
successful; if RetCode & APPC_CFG_FAILURE is
TRUE, the call failed.
If the call was successful, the application can then check the values of the NumRemLU and RemLU parameters:
NumRemLU contains the total number of remote LUs congured. If this number is greater than the supplied
MaxRemLU parameter, the supplied buffer was not large enough to contain all the remote LU aliases. The
application can use the returned aliases, or can reissue
GetAppcConfig with a large enough buffer to contain
all the aliases.
RemLU contains the aliases of the remote LUs. Each alias is a string of up to eight characters followed by
a null character, and occupies 9 bytes of the buffer. The number of LU aliases returned is the smaller of the
supplied parameter MaxRemLU and the returned parameter NumRemLU.
To determine the information required by this call, SNAplus2 checks the user name congured for the Windows
client against the 5250 user records dened in the conguration (or, if the user name is not explicitly dened, checks
for a <DEFAULT> record). In the appropriate user record, it matches the local LU alias and mode name supplied
on this call against the session denitions, and returns the remote LU alias for each matching session.
2.4.13 GetAppcReturnCode
This call returns a printable character string interpreting the return codes from a supplied VCB. The string can be
used to generate application error messages for return codes other than
AP_OK.
This call provides strings for display to the end user of an APPC application. For return codes indicating cong-
uration problems or user errors (for example if a required component is not congured or not started), the string
should provide sufcient information to help the user correct the problem. For return codes indicating application
errors (for example if the application has issued a verb that is not valid or failed to supply a required parameter),
the user is not generally able to correct the problem; in these cases, the string is meaningful only to an application
developer.
Function Call
int WINAPI GetAppcReturnCode (
long vcbptr,
unsigned int buffer_length,
unsigned char far * buffer_addr
);
Supplied Parameters
The supplied parameters are:
vcbptr
A pointer to the VCB structure for the verb. This parameter is dened as a long integer, and so needs to be
cast from a pointer to a long integer. For more information about the VCB structure and on its usage for
individual verbs, see Chapter 3, APPC Control Verbs or Chapter 4, APPC Conversation Verbs.
buffer_length
The length (in bytes) of the buffer supplied by the application to hold the returned data string. The
recommended length is 256 bytes.
buffer_addr
66