OSI/MHS P7 Application Programmatic Interface (P7 API) Manual

Procedure Calls
OSI/MHS P7 Application Programmatic Interface (P7 API) Manual424825-001
3-5
LOS_DT_FINISH_RESULT_
status returned value
long int
indicates the outcome of the call. A value of 0 indicates a successful call. For
additional values, see Appendix B, “Return Codes.
sendFileNum input
int
specifies the file number of the currently open send file that is to be closed. This file
number is returned from the call to LOS_OPEN_ .
resultFileNum input
int
specifies the file number of the currently open result file that is to be closed. This
file number is returned from the call to LOS_OPEN_ .
Considerations
sendFileNum and resultFileNum become invalid after a call to
LOS_CLOSE_ , even if a error occurs while the procedure is executing.
If errors occur while the LOS_CLOSE_ procedure is executing and you want to
establish a new session, call LOS_OPEN_ .
You should call LOS_CLOSE_ under the following conditions:
After a successful MSUNBIND operation. (See the LOS_DT_SEND_
procedure call in this section for details.)
Whenever the status parameter of another P7 API procedure call indicates that
an application association has been aborted; in this case, you should call
LOS_OPEN_ before attempting to bind again.
Example
This example shows how to call LOS_CLOSE_ to close a session with an LO group.
long int status; /* Check status of LOS_CLOSE_ */
int sendFile; /* File number of send file */
int resultFile; /* File number of result file */
status = LOS_CLOSE_(sendFile, resultFile);
LOS_DT_FINISH_RESULT_
Use the LOS_DT_FINISH_RESULT_ data-transfer procedure to receive data from
OSI/MHS and pass it to the client application. The LOS_DT_FINISH_RESULT_
procedure takes a supplied buffer as input and returns the data sent from OSI/MHS, the
length of the data, a data descriptor, and a continuation indicator to the client