WinMSRegisterApplication()

This function registers the application as an NMVT-level application, an MDS-level application, or an alert handler. Such registrations determine which unsolicited indications the application receives.
  • An NMVT-level application receives NMVT_RECEIVED indications.
  • An MDS-level application receives MDS_MU_RECEIVED indications and also FP_NOTIFICATION indications when focal-point status changes.
  • An alert handler receives ALERT_INDICATION indications.
Note:
It is also possible to register to receive NMVTs with conversion to MDS MUs.

Applications that do not process these indications should not call WinMSRegisterApplication.

Syntax

    BOOL WINAPI WinMSRegisterApplication(unsigned short reg_type,
                                         unsigned char  *ms_appl_name,
                                         unsigned short vector_key,
                                         unsigned char  mds_conv_reqd,
                                         unsigned char  *ms_category,
                                         unsigned short max_rcv_size,
                                         unsigned char  alert_dest,
                                         unsigned short *primary_rc,
                                         unsigned long  *secondary_rc);
Parameters
reg_type
Registration type
WMSNMVTAPP          NMVT-level application
                    (or MDS-level application
                    registering to receive NMVTs)
WMSMDSAPP           MDS-level application
WMSALERTHANDLER     Alert handler
ms_appl_name
Management services application name. Valid names can be either an 8-byte alphanumeric type-1134 EBCDIC string, padded with trailing space (X'40') characters if necessary, or one of the management services discipline-specific application programs specified in SNA Management Services Reference padded with trailing space (X'40') characters.

This name is used when reg_type is WMSNMVTAPP or WMSMDSAPP. The name is not applicable when reg_type is WMSALERTHANDLER.

vector_key
Management services major vector keys accepted by the application Permitted values are:
X'YYYY'             specific major vector key
AP_SPCF_KEYS        major vector keys X'8061'
                    through X'8064'
AP_ALL_KEYS         all major vector keys

This key is used when reg_type is WMSNMVTAPP. The key is not applicable when reg_type is WMSMDSAPP or WMSALERTHANDLER.

mds_conv_reqd
Specifies whether the registering application is MDS-level and requires NMVTs sent to it to be converted to MDS MUs
(AP_YES or AP_NO)

This parameter is used when reg_type is WMSNMVTAPP. The parameter is not applicable when reg_type is WMSMDSAPP or WMSALERTHANDLER.

ms_category
Specifies a management services category when the application desires information pertaining to the focal point for that category. The management services category can be either one of the category codes specified in the management services discipline-specific application programs table provided in SNA Management Services Reference padded with trailing space (X'40') characters or a user-defined category. User-defined category names should be an 8-byte alphanumeric type-1134 EBCDIC string, padded with trailing space (X'40') characters if necessary.

This parameter is used when reg_type is WMSMDSAPP. The parameter is not applicable when reg_type is WMSNMVTAPP or WMSALERTHANDLER.

max_rcv_size
Maximum number of bytes the application is capable of receiving in one chunk. MDS MUs bigger that this size will be segmented, and each segment delivered in a separate MDS_MU_RECEIVED indication.

This parameter is used when reg_type is WMSMDSAPP. The parameter is not applicable when reg_type is WMSNMVTAPP or WMSALERTHANDLER.

alert_dest
Specifies whether the application wishes to be the only destination of all alerts. If this is set to AP_YES then all alerts will be routed to the application, and will not be routed anywhere else. If set to AP_NO, alerts will be routed to the application and over the SNA network in the usual way.

This parameter is used when reg_type is WMSALERTHANDLER. The parameter is not applicable when reg_type is WMSNMVTAPP or WMSMDSAPP.

primary_rc
Returned: primary return code
secondary_rc
Returned: secondary return code

Returns

The function returns a value indicating whether the registration was successful. If the value is not zero, the registration was successful. If the value is zero, the registration was not successful.

Remarks

Applications can make multiple calls to register more than one class of indications.

Applications that call WinMSRegisterApplication must call WinMSGetIndication to receive indications that are queued for them.
Note:
See also WinMSUnregisterApplication and WinMSGetIndication.