This macro is used to validate parameters passed to a function.
Specifies a boolean expression to be tested.
Specifies an error code to return.
These macros provide a mechanism to detect and notify the user of incorrect parameter usage.
The macro calls ATLASSERT and if the condition fails calls AtlThrow.
In the ATLENSURE case, AtlThrow is called with E_FAIL.
In the ATLENSURE_THROW case, AtlThrow is called with the specified HRESULT.
The difference between ATLENSURE and ATLASSERT is that ATLENSURE throws an exception in Release builds as well as in Debug builds.
Si vous souhaitez y participer,