Share via


IOlkAccountManager::EnumerateAccounts

IOlkAccountManager::EnumerateAccounts

Gets an enumerator for the accounts of the specific category and/or type.

Quick Info

See IOlkAccountManager.

  HRESULT IOlkAccountManager::EnumerateAccounts ( 
	const CLSID *pclsidCategory,
	const CLSID *pclsidType,
	DWORD dwFlags,
	IOlkEnum **ppEnum
);

Parameters

pclsidCategory

[in] The class identifier of the category to enumerate.

CLSID_OlkMail

CLSID_OlkAddressBook

CLSID_OlkStore

pclsidType

[in] The class identifier of the account type to enumerate.

CLSID_OlkPOP3Account

CLSID_OlkIMAP4Account

CLSID_OlkMAPIAccount

CLSID_OlkHotmailAccount

CLSID_OlkLDAPAccount

dwFlags

[in] Flags to modify behavior. The only supported value is OLK_ACCOUNT_NO_FLAGS.

ppEnum

[out] An enumerator that supports the IOlkEnum interface.

Return Values

E_OLK_NOT_INITIALIZED

The account manager has not been initialized for use.

Remarks

Specifying NULL for category returns an enumerator of all accounts of the specified type. Similarly, specifying NULL for type returns an enumerator of all accounts of the specified category.

IOlkAccountManager::EnumerateAccounts does not support the address book category for an Exchange account. If the account is an Exchange account (pclsidType is CLSID_OlkMAPIAccount), and you are trying to enumerate accounts that implement the address book (prgclsidCategory is CLSID_OlkAddressBook), calling IOlkAccountManager::EnumerateAccounts will not return the Exchange account in the accounts enumerator ppEnum.

See Also

Constants for the Account Management API

IOlkEnum