Share via


OneStopFactory

The OneStopFactory function is implemented as the DLL entry point for creating custom transports. It is called by Messaging to create an instance of a custom transport and get the IMailSyncHandler interface for the transport. The ONESTOPFACTORYFUNC type defines a pointer to this function. OneStopFactory is a placeholder for the application-defined function name.

Syntax

HRESULT OneStopFactory (
  LPCWSTR pszType, 
  IMailSyncHandler ** ppObj
);

Parameters

  • pszType
    [in] String identifying the name of the transport. This allows multiple transports to reside in a single DLL.
  • ppObj
    [out] Reference to the IMailSyncHandler interface for the requested transport.

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 transport correctly initialized, and the function successfully returned a reference to the IMailSyncHandler interface.

Requirements

Smartphone: Windows Mobile 2002 and later
OS Versions: Windows CE 3.0 and later
Header: Declared in cemapi.h
Library: Use cemapi.lib

See Also

How to: Register Customized Messaging Transports

MAPI Functions

Messaging

Last updated on Friday, April 22, 2005

© 2005 Microsoft Corporation. All rights reserved.

Send feedback on this topic to the authors.