IProfAdmin::SetDefaultProfile

The IProfAdmin::SetDefaultProfile method sets or clears a client s default profile.

Quick Info

See IProfAdmin : IUnknownEHPDWT.

 

HRESULT SetDefaultProfile(

    LPTSTR lpszProfileName,

 

    ULONG ulFlags

 

   )

 

 

Parameters

lpszProfileName

[in] Pointer to the name of the profile to become the default or NUL. Setting lpszProfileName to NULL indicates that SetDefaultProfile should remove the existing default profile, leaving the client without a default.

ulFlags

[in] Bitmask of flags that controls the type of the string pointed to by lpszProfileName. The following flag can be set:

MAPI_UNICODE

The profile name is in the Unicode format. If the MAPI_UNICODE flag is not set, the profile name is in the ANSI format.

 

Return Values

S_OK

A default profile was successfully established or removed.

MAPI_E_NOT_FOUND

The specified profile does not exist.

 

Remarks

The IProfAdmin::SetDefaultProfile method either establishes a particular profile as the client s default profile or clears the current default profile. The default profile is the profile that is automatically used whenever the client begins a MAPI session. SetDefaultProfile also sets the new default profile s PR_DEFAULT_PROFILE32.9NBC property to TRUE.

Notes to Callers

To start a session with the default profile, pass the MAPI_USE_DEFAULT flag to the MAPILogonExXRIL3B function.

See Also

IProfAdmin::GetProfileTable, MAPILogonEx, PR_DEFAULT_PROFILE