IOlkAccountManager::Init

Initializes the account manager for use.

Quick info

See IOlkAccountManager.

HRESULT IOlkAccountManager::Init (  
    IOlkAccountHelper *pAcctHelper, 
    DWORD dwFlags 
);

Parameters

pAcctHelper

[in] An IOlkAccountHelper interface that provides account helper functionality.

dwFlags

[in] Flags to modify behavior.

  • ACCT_INIT_NO_STORES_CHECK —Prevents an account (such as an IMAP account) from synchronizing with an associated store.

  • ACCT_INIT_NOSYNCH_MAPI_ACCTS —Prevents MAPI services from synchronizing with accounts.

  • ACCT_INIT_NO_NOTIFICATIONS —Prevents the Account Manager from intercepting broadcast messages intended for other applications.

  • OLK_ACCOUNT_NO_FLAGS —Synchronizes MAPI services with accounts.

Return values

HRESULT Description
S_OK
The call succeeded.
E_OLK_ALREADY_INITIALIZED
Init has already been called.
E_OLK_REGISTRY
The account manager could not access the required registry settings.

Remarks

The client must call IOlkAccountManager::Init to initialize the account manager before using the account manager to access accounts or set up notifications. Because Outlook automatically synchronizes MAPI services with accounts on startup, use ACCT_INIT_NOSYNCH_MAPI_ACCTS unless there is a specific cause to synchronize.

See also