OSI/MHS P7 Application Programmatic Interface (P7 API) Manual
Procedure Calls
OSI/MHS P7 Application Programmatic Interface (P7 API) Manual—424825-001
3-17
LOS_OPEN_
Example
This example shows a call to LOS_OPEN_ that opens communication with the process 
$ZMHS, allocates two buffers, buf1 and buf2, and returns send and result file numbers 
to an array.
/* GLOBALs */
#define MAX_CONNECTIONS ZMHS_VAL_LOUAPI_MAX_NUM_SESS
static int sendFileNum[MAX_CONNECTIONS],
 resultFileNum[MAX_CONNECTIONS];
/* Local */
int connection; /* Logical connection to */
 /* perform operation on */
mhsMgrName.name = (‘$’ ,‘z’, ‘m’, ‘h’, ‘s’);
mhsMgrName.len = 5;
int *buf1;
int *buf2;
buf1 = (int *) calloc (1, sizeof 
(zmhs_ddl_uapi_request_def));
buf2 = (int *) calloc (1, sizeof 
(zmhs_ddl_uapi_request_def));
status = LOS_OPEN_((int *) &mhsMgrName,
 (int) ZMHS_VAL_EM_NO_WAIT,
 buf1,
 buf2,
 &sendFileNum[connection],
 &resultFileNum[connection]);










