MailSwitchToAccount

Send Feedback

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 Values

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

Pocket PC: Windows Mobile Version 5.0 and later
Smartphone: Windows Mobile Version 5.0 and later
OS Versions: Windows CE 5.01 and later
Header: cemapi.h
Library: cemapi.lib

See Also

MAPI Functions | Messaging

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.