OpenTP1 Version 7 Programming Reference C Language

[Contents][Index][Back][Next]

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 value Return value (numeric) Explanation
DC_OK 0 The 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 -11900 The specified argument is invalid.
DCMCFER_PROTO -11901 The function dc_rpc_open() was not called before the function dc_mcf_mainloop().
DCMCFER_FATAL -11902 The service could not be started.
DCMCFER_NOMEM -11903 The memory became insufficient.