IBM® Enhanced 32-Bit Interface Presentation Space IDs
For IBM® Enhanced
EHLLAPI applications, the session ID is extended with three additional
bytes. These extended session bytes must be set to zero for future
compatibility. This is most easily accomplished by setting the contents
of EHLLAPI buffers to all binary zero before filling them in with
the required information. For example, the following might be used
to query the status of session B:
#include "hapi_c.h"
int HFunc, HLen, HRc; // Function parameters
struct HLDPMWindowStatus StatusData; // Function parameters
Func = HA_PM_WINDOW_STATUS;
HLen = sizeof(StatusData);
HRc = 0;
// Set data buffer to zeros and fill in request
memset(&StatusData, 0x00, sizeof(StatusData));
StatusData.cwin_shortname = 'B'; // Short session ID
StatusData.cwin_option = 0x02; // Query command
hllapi(&Func, (char *)&StatusData, &HLen, &HRc);