The IProfAdmin::CreateProfile method creates a new profile.
HRESULT CreateProfile(
LPTSTR lpszProfileName,
LPTSTR lpszPassword,
ULONG ulUIParam,
ULONG ulFlags
);
The IProfAdmin::CreateProfile method creates a new profile.
You can call CreateProfile at application installation time or at any time during a session. When called at installation time, many of the configuration settings come from the MAPISVC.INF configuration file. When called during an active session, the settings come from the user who is prompted through a series of property sheets.
If the MAPI_DEFAULT_SERVICES flag is set in the ulFlags parameter, CreateProfile calls the message service entry point function for each message service in the [Default Services] section in the MAPISVC.INF file. Each message service entry point function is called with the ulContext parameter set to MSG_SERVICE_CREATE.
If both the MAPI_DIALOG and MAPI_DEFAULT_SERVICES flags are set, then the values in the ulUIParam and ulFlags parameters are also passed to the message service entry point function. The message service entry point functions are only called after all available information from the MAPISVC.INF file has been added to the profile.
The name of the new profile and its password can be up to 64 characters in length and can include the following characters:
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, Windows NT Server and Windows 95 do not support passwords; Windows version 3.1 does.
IMsgServiceAdmin::ConfigureMsgService, IMsgServiceAdmin::CreateMsgService, MSGSERVICEENTRY