WinMSUnregisterApplication()

This function unregisters the application, reversing the effect of an earlier WinMSRegisterApplication call, and stopping further indications from being queued for the application.

Syntax

BOOL WINAPI WinMSUnregisterApplication(unsigned short reg_type,
                                       unsigned char  *ms_appl_name,
                                       unsigned short *primary_rc,
                                       unsigned long  *secondary_rc);
Parameters
reg_type
Registration type. It can have one of the following values:
WMSNMVTAPP
NMVT-level application
WMSMDSAPP
MDS-level application
WMSALERTHANDLER
Alert handler
ms_appl_name
MS 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 parameter is used when reg_type is WMSNMVTAPP or WMSMDSAPP. The parameter is not applicable when reg_type is WMSALERTHANDLER.

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

Returns

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

Remarks

Each call to WinMSUnregisterApplication terminates a registration made by an earlier call to WinMSRegisterApplication. An application that has made multiple calls to WinMSRegisterApplication needs to make multiple calls to WinMSUnregisterApplication in order to terminate all its registrations.

WinMSUnregisterApplication and WinMSCleanup differ as follows:
  • WinMSUnregisterApplication terminates an earlier registration to receive indications, but does not prevent the application from making other management services API calls (for example, WinMS).
  • WinMSCleanup terminates use of the management services API.
Indications might already be queued for an application when the application calls WinMSUnregisterApplication. Any such indications remain queued, and the application should call WinMSGetIndication to receive and process them. Once they have been unregistered, no new indications will be queued for the application.
Note:
See also WinMSRegisterApplication and WinMSGetIndication.