dc_mcf_mainloop - Start an MHP service

Format

ANSI C, C++

#include <dcmcf.h>
int  dc_mcf_mainloop(DCLONG flags)

K&R C

#include <dcmcf.h>
int  dc_mcf_mainloop (flags)
DCLONG      flags;

Description

The function dc_mcf_mainloop() starts accepting service requests to service functions which are included in the service group being executed in the process that called this function. The function dc_mcf_mainloop() does not return until it receives a termination request from OpenTP1.

Argument whose value is set in the UAP

flags

Specify DCNOFLAGS.

Return values

Return valueReturn value (numeric)Explanation
DC_OK0The function dc_mcf_mainloop() received a termination request from OpenTP1. The UAP that called the function dc_mcf_mainloop() must immediately execute termination processing for its process. Then, the UAP must call the function dc_mcf_close() and the function dc_rpc_close() to enable exit().
DCMCFER_INVALID_ARGS-11900The specified argument is invalid.
DCMCFER_PROTO-11901The function dc_rpc_open() was not called before the function dc_mcf_mainloop().
DCMCFER_FATAL-11902The service could not be started.
DCMCFER_NOMEM-11903The memory became insufficient.