Поделиться через


CmSetPreferences (Compact 2013)

3/26/2014

This function associates connection preferences with a session.

Syntax

CM_RESULT CmSetPreferences(
    __in CM_SESSION_HANDLE hSession,
    __in_bcount(cbPreferences) const CM_PREFERENCES* pPreferences,
    __in DWORD cbPreferences
);

Parameters

  • cbPreferences
    [in] The number of CM_PREFERENCES structures in the pPreferences list.

Return Value

Value

Description

CMRE_SUCCESS

The operation completed successfully.

CMRE_INVALID_SESSION

The hSession is not valid.

CMRE_OUT_OF_MEMORY

Memory can not be allocated to complete the operation.

CMRE_INVALID_VERSION

The Connection Manager Common Constants of one or more of the pPreferences structures is not supported.

CMRE_INVALID_PREFERENCES

The cbPreferences parameter is invalid.

Remarks

The preferences that this function associates with a session influence the order of connection attempts.

Requirements

Header

cmnet.h

Library

cmnet.lib

See Also

Reference

Connection Manager Connectivity Functions
Connection Manager Common Constants
CM_PREFERENCES
CM_SESSION_HANDLE