Esempio n. 1
0
/***
*errno_t _get_doserrno() - get _doserrno
*
*Purpose:
*       Get the value of _doserrno
*
*Entry:
*       unsigned long *pValue - pointer where to store the value
*
*Exit:
*       The error code
*
*Exceptions:
*       Input parameters are validated. Refer to the validation section of the function.
*
*******************************************************************************/
errno_t _get_doserrno(unsigned long* pValue) {
    /* validation section */
    _VALIDATE_RETURN_NOERRNO(pValue != NULL, EINVAL);
    /* Unlike most of our globals, this one is guaranteed to give some answer */
    *pValue = _doserrno;
    return 0;
}
Esempio n. 2
0
extern "C" errno_t _get_doserrno(unsigned long* const result)
{
    _VALIDATE_RETURN_NOERRNO(result != nullptr, EINVAL);

    // Unlike most of our globals, this one is guaranteed to give some answer:
    *result = _doserrno;
    return 0;
}