Partager via


CmSetRequirements (Compact 2013)

3/26/2014

This function associates connection requirements with a session.

Syntax

CM_RESULT CmSetRequirements(
    __in CM_SESSION_HANDLE hSession,
    __in_bcount(cbRequirements) const CM_REQUIREMENTS* pRequirements,
    __in DWORD cbRequirements);

Parameters

  • cbRequirements
    [in] The number of CM_REQUIREMENTS structures in the pRequirements 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 pRequirements structures is not supported.

CMRE_INVALID_REQUIREMENTS

The cbRequirements parameter is invalid.

Remarks

The connection requirements associated with the session are used to select a connection.

Requirements

Header

cmnet.h

Library

cmnet.lib

See Also

Reference

Connection Manager Connectivity Functions
Connection Manager Common Constants
CM_REQUIREMENTS
CM_SESSION_HANDLE