Deleting a Message Service
Applies to: Outlook 2013 | Outlook 2016
To delete a message service from a profile
Call IMAPISession::GetMsgServiceTable to access the message service table.
Locate the row for the message service and pass its PR_SERVICE_UID (PidTagServiceUid) column in the lpuid parameter to IMsgServiceAdmin::DeleteMsgService.
DeleteMsgService calls the message service's entry point function with the ulContext parameter set to MSG_SERVICE_DELETE. Message services perform any clean up tasks at this time before they are removed from the profile.