MailSyncMessages

Send Feedback

The MailSyncMessages function synchronizes the messages for the specified account.

Syntax

HRESULT MailSyncMessages(
  LPCTSTR pszAccount, 
  DWORD dwFlags
);

Parameters

  • pszAccount
    [in] The account to synchronize. It can be specified either by its name or by the name of the transport, determined by the flag set in the dwFlags parameter. If this parameter in NULL, the current account is sychronized.
  • dwFlags
    [in] Flags used to specify whether the pszAccount parameter contains the name of the account or the name of the transport. Also allows the synchronization to run in the background. 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 asynchronous. It may return before the synchronization actually happens. No error is returned to this function if there was an error during synchronization.

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.