OpenTP1 Version 7 Programming Reference C Language

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

dc_mcf_ap_info_uoc - Report the application information to user exit routines

Format

ANSI, C++

#include<dcmcf.h>
int dc_mcf_ap_info_uoc(DCLONG flags, char *apname,
                       struct DC_MCFAPINFO_UOC *apinfo)

K&R C

#include<dcmcf.h>
int dc_mcf_ap_info_uoc(flags, apname, apinfo)
DCLONG flags;
char *apname;
struct DC_MCFAPINFO_UOC *apinfo;

Description

The function dc_mcf_ap_info_uoc() returns information about the application specified by the argument apname (application information) to the struct DC_MCFAPINFO_UOC data area specified by the argument apinfo. This application information includes application definitions (application attribute definitions) and application status (status when the function dc_mcf_ap_info_uoc() is called). The application information becomes effective only when the function dc_mcf_ap_info_uoc() is normally terminated.

This function can only be used to report application information about user applications that can be activated from the communication service on which the user exit routine is running. Furthermore, it does not report the application information about SPPs (application definition mcfaalcap -g type=SPP) or system events (application definition mcfaalcap -n kind=mcf).

If a user application that cannot be activated from the communication service on which the user exit routine is running, an SPP, or a system event is specified, it is interpreted as invalid and the function returns with an error, and the return value DCMCFRTN_72001 is reported.

This function can be used only from user exit routines that edit input messages (user exit routines that determine application names). It cannot be used from user exit routines other than the above. If you attempt to use it from any other user exit routines, system operation is unpredictable.

Arguments whose values are set in the UAP

flags

Specify DCNOFLAGS.

apname

Specify the name of the application about which you want to acquire the application information.

apinfo

Specify the address of the area DC_MCFAPINFO_UOC that receives the application information.

Arguments whose values are returned from OpenTP1

apinfo

The application information is returned with the structure DC_MCFAPINFO.

The structure has the following format:

     struct  DC_MCFAPINFO_UOC  {
                                   char mcf_apinfo[4];
                                   DCLONG mcf_resv00;
                                   char mcf_ap_name[9];
                                   char mcf_ap_mcfid[3];
                                   char mcf_resv01[4];
                                   DCLONG mcf_ap_stat;
                                   DCLONG mcf_ap_type;
                                   DCLONG mcf_ap_msgcnt;
                                   char mcf_sg_name[32];
                                   DCLONG mcf_sg_stat;
                                   DCLONG mcf_sg_hold;
                                   DCLONG mcf_sg_msgcnt;
                                   char mcf_sv_name[32];
                                   DCLONG mcf_sv_stat;
                                   DCLONG mcf_ap_ntmetim;
                                   DCLONG mcf_ap_tempsize;
                                   DCLONG mcf_ap_max_msgcnt;
                                   DCLONG mcf_ap_trnmode;
                                   DCLONG mcf_ap_quekind;
                                   char mcf_resv02[64];
                                  };

Return values

Return value Return value (numeric) Explanation
DCMCFRTN_00000 0 Normal termination.
DCMCFRTN_72000 -13000 The function dc_mcf_ap_info_uoc() was called from a service other than the MHP service.
DCMCFRTN_72001 -13001 The specified application name is invalid.
No information about the specified application could be acquired.
DCMCFRTN_72016 -13016 The value specified in a parameter is invalid.
Other than the above An unprecedented error (e.g., program damage) occurred.

Note

  1. The function dc_mcf_ap_info_uoc() can only be used from user exit routines that edit input messages (user exit routines that determine application names), even though no check is performed if this function is called from user exit routines other than the above. If you attempt to use it from any other user exit routines, system operation is unpredictable. For details about user exit routines, see the applicable OpenTP1 Protocol manual.
  2. This function can only be used to acquire application information about user applications that can be activated from the communication service on which the user exit routine is running. Furthermore, it does not report application information about SPPs (MCF application definition mcfaalcap -g type=SPP) or system events (MCF application definition mcfaalcap -n kind=mcf).
  3. No UAP trace can be acquired.