IProfAdmin::DeleteProfile

The IProfAdmin::DeleteProfile method deletes a profile.

Quick Info

See IProfAdmin : IUnknown.

HRESULT DeleteProfile(
  LPTSTR lpszProfileName,   
  ULONG ulFlags             
);
 

Parameters

lpszProfileName
[in] Pointer to the name of the profile to be deleted.
ulFlags
[in] Bitmask of flags that controls the type of the profile name. The following flag can be set:
MAPI_UNICODE
The profile name is in Unicode format. If the MAPI_UNICODE flag is not set, the profile name is in ANSI format.

Return Values

S_OK
The profile was successfully deleted.
MAPI_E_NOT_FOUND
The specified profile does not exist.

Remarks

The IProfAdmin::DeleteProfile method deletes a profile. If the profile to delete is in use when DeleteProfile is called, DeleteProfile returns S_OK but does not delete the profile immediately. Instead, DeleteProfile marks the profile for deletion and deletes it after it is no longer being used, when all of its active sessions have ended.

The entry point function for each message service in the profile is called with the MSG_SERVICE_DELETE value set in the ulContext parameter. First, the function deletes the service, and then it deletes the service's profile section. The message service entry point function is not called again after the service has been deleted.

No password is required to delete a profile.

See Also

IMsgServiceAdmin::DeleteMsgService, MSGSERVICEENTRY