Skip to content

Latest commit

 

History

History
76 lines (44 loc) · 2.03 KB

iprofadmin-setdefaultprofile.md

File metadata and controls

76 lines (44 loc) · 2.03 KB
title manager ms.date ms.audience ms.topic ms.service ms.localizationpriority api_name api_type ms.assetid
IProfAdminSetDefaultProfile
lindalu
11/16/2014
Developer
reference
office-online-server
medium
IProfAdmin.SetDefaultProfile
COM
58f50535-b0ed-4097-bda8-fd3ccc2d4b49

IProfAdmin::SetDefaultProfile

Applies to: Outlook 2013 | Outlook 2016

Sets or clears a client's default profile.

HRESULT SetDefaultProfile(
  LPSTR lpszProfileName,
  ULONG ulFlags
);

Parameters

lpszProfileName

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

ulFlags

[in] A 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 Unicode format. If the MAPI_UNICODE flag is not set, the profile name is in ANSI format.

Return value

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_PROFILE (PidTagDefaultProfile) property to TRUE.

Notes to callers

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

See also

IProfAdmin::GetProfileTable

MAPILogonEx

PidTagDefaultProfile Canonical Property

IProfAdmin : IUnknown