Share via


CmCspInitialize (Compact 2013)

3/26/2014

This function is called by Connection Manager to initialize a Connection Service Provider.

Syntax

CM_RESULT CmCspInitialize(
    __in_bcount(cbHostInfo) const CM_CSP_HOST_INFO* pHostInfo,
    __in DWORD const cbHostInfo,
    __out_bcount(*pcbProviderInfo) CM_CSP_PROVIDER_INFO* pProviderInfo,
    __inout DWORD* pcbProviderInfo);

Parameters

  • [in] cbHostInfo
    [in] The number of bytes in the pHostInfo structure.
  • [in,out] pProviderInfo
    [in] A pointer to a storage area to place the output.

    [out] A pointer to a CM_CSP_PROVIDER_INFO structure.

  • [in,out] pcbProviderInfo
    [in] A pointer to the number of bytes allocated to the pProviderInfo structure.

    [out] A pointer to the number of bytes actually returned by the call.

Return Value

The following table shows the possible return values.

Value

Description

CMRE_SUCCESS

The call succeeded.

CMRE_INVALID_VERSION

The Connection Service Provider is not compatible with the Connection Manager version. This may happen when the Connection Service Provider requires Connection Manager functionality that is not available in the indicated Connection Manager version.

CMRE_INSUFFICIENT_BUFFER

The pcbProviderInfo parameter indicates the size of the pProviderInfo parameter is too small to hold a CM_CSP_PROVIDER_INFO structure.

CMRE_INVALID_PARAMETER

One of the input parameters is invalid.

CMRE_OUT_OF_MEMORY

Memory can not be allocated to complete the operation.

CMRE_UNEXPECTED

An unexpected failure occurred.

Remarks

This call performs the following functions:

  • Initializes the Connection Service Provider, such that it is ready to handle other API calls.
  • Registers connection types handled by the Connection Service Provider with the Connection Manager.
  • Registers an asynchronous method of message passing between CSP and Connection Manager.

If the call fails, the pcbProviderInfo parameter is unchanged.

Requirements

Header

cmcsp.h

See Also

Reference

Connection Service Provider Functions
CM_CSP_HOST_INFO
CM_CSP_PROVIDER_INFO