IMsgServiceAdmin::DeleteMsgService

The IMsgServiceAdmin::DeleteMsgService method deletes a message service from a profile.

Quick Info

See IMsgServiceAdmin : IUnknown.

HRESULT DeleteMsgService(
  LPMAPIUID lpuid  
);
 

Parameters

lpuid
[in] Pointer to the MAPIUID structure holding the unique identifier for the message service to delete.

Return Values

S_OK
The message service was deleted.
MAPI_E_NOT_FOUND
The MAPIUID pointed to by lpuid does not match an existing message service.

Remarks

The IMsgServiceAdmin::DeleteMsgService method deletes a message service from a profile. DeleteMsgService removes all profile sections related to the message service.

DeleteMsgService performs the following steps to delete the message service:

  1. Calls the message service's entry point function with the ulContext parameter set to MSG_SERVICE_DELETE before the profile sections are removed. This allows the service to perform any service-specific tasks.
  2. Deletes the message service.
  3. Deletes the message service's profile section.

The message service's entry point function is not called again after the service has been deleted.

Notes to Callers

To retrieve the MAPIUID for the message service to delete, retrieve the PR_SERVICE_UID column from the message service's row in the message service table. See the procedure outlined in IMsgServiceAdmin::CreateMsgService for more information.

See Also

MAPIUID