CmGetToUpdatePolicyConfig (Compact 7)
3/12/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
- pKey
[in] Pointer to a CM_POLICY_CONFIG_KEY structure.
- cbKey
[in] Length of the pKey parameter.
pData
[in] Pointer to a Connection Manager Connectivity Structures structure. The Version must be initialized.[out] Pointer to a Connection Manager Connectivity Structures structure.
pcbData
[in] Length of the pData parameter.[out] Length of the pData parameter.
phConfig
[in] Pointer to a CM_CONFIG_CHANGE_HANDLE type.[out] Pointer to a CM_CONFIG_CHANGE_HANDLE type.
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 |