Share via


CmGetToUpdatePolicyConfig (Compact 2013)

3/26/2014

This API retrieves policy data with the intention of changing it with a subsequent call to CmUpdatePolicyConfig using the returned change handle.

Syntax

CM_RESULT CmGetToUpdatePolicyConfig(
    __in_bcount(cbKey) CM_POLICY_CONFIG_KEY* pKey,
    __in DWORD cbKey,
    __out_bcount(*pcbData) CM_POLICY_CONFIG_DATA* pData,
    __inout DWORD* pcbData,
    __out CM_CONFIG_CHANGE_HANDLE* phConfig
);

Parameters

  • cbKey
    [in] Length of the pKey parameter.
  • pcbData
    [in] Length of the pData parameter.

    [out] Length of the pData parameter.

Return Value

Value

Description

CMRE_SUCCESS

The operation completed successfully.

CMRE_INVALID_PARAMETER

One of the parameters in NULL or invalid.

CMRE_INSUFFICIENT_BUFFER

An output buffer is too small to contain the results of the call.

CMRE_INVALID_VERSION

The Connection Manager Common Constants of one or more of the structure parameters is not supported.

Remarks

This API returns policy settings and a configuration change handle.

The configuration change handle is used as a parameter to CmUpdatePolicyConfig which then destroys the handle. Applications that fail to use the API in this way will leak memory.

Requirements

Header

cmnet.h

Library

cmnet.lib

See Also

Reference

Connection Manager Policy Functions
CmUpdatePolicyConfig