The CPL_EXIT message is sent once to the CPlApplet function of a Control Panel application before the controlling application releases the DLL containing the application.
CPL_EXIT
This function has no parameters.
If the CPlApplet function processes this message successfully, it should return zero.
This message is sent after the last CPL_STOP message is sent.
In response to this message, a Control Panel application must free any memory that it has allocated and perform global-level cleanup.