CM_MapCrToWin32Err function (cfgmgr32.h)

Converts a specified CONFIGRET code to its equivalent system error code.

Syntax

CMAPI DWORD CM_MapCrToWin32Err(
  [in] CONFIGRET CmReturnCode,
  [in] DWORD     DefaultErr
);

Parameters

[in] CmReturnCode

The CONFIGRET code to be converted. CONFIGRET error codes are defined in CfgMgr32.h.

[in] DefaultErr

A default system error code to be returned when no system error code is mapped to the specified CONFIGRET code.

Return value

The system error code that corresponds to the CONFIGRET code. System error codes are defined in Winerror.h.

When there is no mapping from the specified CONFIGRET code to a system error code, CM_MapCrToWin32Err returns the value specified in the DefaultErr parameter.

Requirements

Requirement Value
Minimum supported client Available in Windows 7 and later versions of Windows.
Target Platform Universal
Header cfgmgr32.h
Library CfgMgr32.lib; OneCoreUAP.lib on Windows 10
DLL CfgMgr32.dll