Partager via


CmCspGetConnectionInfo (Compact 7)

3/12/2014

This function queries a Connection Service Provider to obtain information about a connection that has an adaptor type that is managed by the Connection Service Provider.

Syntax

CM_RESULT CmCspGetConnectionInfo(
    __in_bcount(CM_CONNECTION_NAME_LENGTH) WCHAR* szConnection,
    __inout_bcount(*pcbInfo) CM_CSP_CONNECTION_INFO* pInfo,
    __inout DWORD* pcbInfo);

Parameters

  • szConnection
    [in] The connection name.
  • pInfo
    [in, out] A pointer to a CM_CSP_CONNECTION_INFO structure that contains connection information that is available to the Connection Service Provider.
  • pcbInfo
    [in, out] A pointer to the number of bytes required to hold the pInfo structure, if the input parameter was not big enough.

Return Value

The following table shows the possible return values.

Value Description

CMRE_SUCCEEDED

The call succeeded.

CMRE_INVALID_CONNECTION

The connection does not exist.

CMRE_INSUFFICIENT_BUFFER

The structure pInfo is not large enough to contain the connection information. The required buffer size is returned in *pcbInfo.

CMRE_UNEXPECTED

Indicates any other failure to get connection information.

Remarks

The structure pInfo contains information that Connection Manager has about the connection. The Connection Service Provider can update this information with more accurate values. For example, if the value of one of the characteristics is unknown (CM_UNKNOWN_CHARACTERISTIC_VALUE), the Connection Service Provider can update this value with an actual value. If the Connection Service Provider doesn't have a value for one or more of the attributes, it must leave it unchanged.

Requirements

Header

cmcsp.h

See Also

Reference

Connection Service Provider Functions
CM_CSP_CONNECTION_INFO
Connection Manager Connection Configuration Constants

Other Resources

Connection Service Provider Reference