CM_CONNECTION_CONFIG (Compact 2013)

3/26/2014

This structure specifies the parameters for making and maintaining a connection.

Syntax

typedef struct CM_CONNECTION_CONFIG
{
    DWORD Version;
    WCHAR szDescription[CM_CONNECTION_DESCRIPTION_LENGTH];
    CM_CONNECTION_TYPE Type;

    DWORD Characteristic[CMCH_LAST];

    CM_CONNECTION_CONNECT_BEHAVIOR ConnectBehavior;
    union
    {
        DWORD IdleDisconnectTimeoutSec;
        struct
        {
            CM_TIME_BASED_AUTO_RECONNECT_ALGORITHM ReconnectAlg;
            DWORD DelaySec;
            DWORD Attempts;
            DWORD AttemptsExceededDelaySec;

        } AutoReconnect;
        };

    BOOL fEnabled;
    DWORD cbTypeSpecificInfo;
    BYTE TypeSpecificInfo[1];

} CM_CONNECTION_CONFIG;

Members

  • szDescription
    Description for this connection.
  • IdleDisconnectTimeoutSec
    Number of seconds to wait before disconnecting a connection that is idle and has ConnectBehavior == CMCB_ON_DEMAND. The recommended default is 60 seconds.

    An idle connection occurs when no CmAcquireConnection calls have been made, or all CmAcquireConnection calls have been matched by CmReleaseConnection calls.

    The context and priority of the idle connection is the same as that of the last application to use the connection.

    The system will disconnect the connection before the timeout expires when there is another request of higher priority that requires some of the resources of the idle connection.

  • AttemptsExceededDelaySec
    Number of seconds between each connection attempt after the Attempts parameter has been exceeded. See: CM_TIME_BASED_AUTO_RECONNECT_ALGORITHM for the detailed explanation of the algorithm.
  • AutoReconnect
    Name of this sub structure.
  • fEnabled
    TRUE: Attempt to connect and reconnect.

    FALSE: No connections will be attempted.

  • cbTypeSpecificInfo
    Byte length of the TypeSpecificInfo member.
  • TypeSpecificInfo[1]
    Pointer to the information specific to a connection type. For more information, refer to the specific header files, for example CmCspRas.h or CmCspWiFi.h.

Requirements

Header

cmnet.h

Library

cmnet.lib

See Also

Reference

Connection Manager Connection Configuration Structures
CmAcquireConnection
CM_TIME_BASED_AUTO_RECONNECT_ALGORITHM
CM_CHARACTERISTIC
CM_CONNECTION_CONNECT_BEHAVIOR
CM_CONNECTION_TYPE
Connection Manager Common Constants