WinMSCleanup()
This function terminates and unregisters an application from the management services API.
Syntax
BOOL WINAPI WinMSCleanup(void);
Returns
The return value specifies whether the unregistration was successful. If the value is not zero, the application was successfully unregistered. The application was not unregistered if a value of zero is returned.
Remarks
Use WinMSCleanup() to indicate unregistration of a management services application from the management services API.
WinMSCleanup unblocks any thread waiting in WinMSGetIndication. These return with WMSNOTREG (the application is not registered to receive indication). WinMSCleanup unregisters the application for all indications. WinMSCleanup returns any outstanding verb (synchronous or asynchronous) with the error AP_CANCELLED. However, the verb completes inside the node.
It is not a requirement to use WinMSStartup and WinMSCleanup. However, an application must be consistent in its use of these calls. You should use both of them or never use either of them.