Share via


MailSwitchToAccount (Compact 7)

3/12/2014

The MailSwitchToAccount function switches to the specified account.

Syntax

HRESULT MailSwitchToAccount(
  LPCTSTR pszAccount, 
  DWORD dwFlags
);

Parameters

  • pszAccount
    [in] The account to switch to, in listview. It can be specified either by its name or by the name of the transport, determined by the flag set in the dwFlags parameter.
  • dwFlags
    [in] Flag used to specify whether the pszAccount parameter contains the name of the account or the name of the transport. See MAPI Compose Field Flags for possible values.

Return Value

This function returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    The call succeeded.

Remarks

This function is synchronous. When this function returns, the specified account is shown in listview.

Requirements

Header

cemapi.h

Library

cemapi.lib

See Also

Reference

MAPI Functions