IProfAdmin::AdminServices

The IProfAdmin::AdminServices method provides access to a message service administration object for making changes to the message services in a profile.

Quick Info

See IProfAdmin : IUnknownEHPDWT.

 

HRESULT AdminServices(

    LPTSTR lpszProfileName,

 

    LPTSTR lpszPassword,

 

    ULONG ulUIParam,

 

    ULONG ulFlags,

 

    LPSERVICEADMIN FAR * lppServiceAdmin

 

   )

 

 

Parameters

lpszProfileName

[in] Pointer to the name of the profile to be modified. The lpszProfileName parameter must not be NULL.

lpszPassword

[in] Pointer to the profile s password or NULL, if the profile does not require a password. If lpszPassword is NULL, the profile requires a password, and the MAPI_DIALOG flag is set in the ulFlags parameter, a dialog box is displayed to prompt the user for the password.

ulUIParam

[in] Handle of the parent window for any dialog boxes or windows this method displays.

ulFlags

[in] Bitmask of flags that controls the retrieval of the message service administration object. The following flags can be set:

MAPI_DIALOG

Allows the display of a user interface.

MAPI_UNICODE

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

lppServiceAdmin

[out] Pointer to a pointer to a message service administration object.

 

Return Values

S_OK

The message service administration object was successfully returned.

MAPI_E_LOGON_FAILED

The specified profile doesn t exist, or the password was wrong and a dialog box could not be displayed to the user requesting the correct password because MAPI_DIALOG was not set in ulFlags.

MAPI_E_USER_CANCEL

The user canceled the operation, typically by clicking the Cancel button in a dialog box.

 

Remarks

The IProfAdmin::AdminServices method provides access to a message service administration object for making configuration changes to the message services within a profile.

Profile passwords are not supported on all operating system platforms. On platforms that do not support profile passwords, lpszPassword can be NULL or a pointer to a zero-length string. Currently, Microsoft Windows NT and Microsoft Windows 95 do not support passwords; Microsoft Windows version 3.1 does.

Notes to Callers

Although you retrieve an IMsgServiceAdmin pointer by calling either this method or IMAPISession::AdminServices7JTQZG to retrieve an IMsgServiceAdmin pointer, call this method if you are a strictly a configuration client and offer no messaging features. The IProfAdmin method does not create a session object and does not load any service providers, enhancing performance.

IProfAdmin::AdminServices cannot be used to create a profile. Therefore, you must specify an existing valid profile in lpszProfileName. If the specified profile does not exist, AdminServices returns MAPI_E_LOGON_FAILED.

The name of the profile and its password can be up to 64 characters in length and can include the following characters:

    All alphanumeric characters, including accent characters and the underscore character.

    Embedded spaces, but not leading or trailing spaces.

 

See Also

IMAPISession::AdminServices