Share via


IMailSyncCallBack::RequestCredentials

4/8/2010

If the existing credentials are not valid, the RequestCredentials method allows the transports to request new credentials from the user. Messaging displays a dialog to the user for new credentials and returns the result of user interaction back to the transport.

Syntax

HRESULT RequestCredentials (
  LPCWSTR pszProfile,
  SYNCCREDENTIALS * ppcredsSource,
  SYNCCREDENTIALS ** ppcreds
);

Parameters

  • pszProfile
    [in] The profile string that is passed into the transport when it is initialized.
  • ppcredsSource
    [in] Reference to a SYNCCREDENTIALS structure that contains values to initialize the credentials dialog box.
  • ppcreds
    [out] Reference to a new SYNCCREDENTIALS structure that contains the updated set of credentials.

Return Value

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

  • S_OK
    Indicates if the user has entered new credentials and selected "OK."

Remarks

Transports must use IMailSyncCallBack::FreeMem to free this memory.

Requirements

Header cemapi.h
Library cemapi.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

IMailSyncCallBack
IMailSyncCallBack::FreeMem
SYNCCREDENTIALS

Other Resources

Messaging