result = strtol( str, &endptr, 10 );
if (!endptr || (endptr == str)) /* Conversion was unsuccessful */
return 0;
- if (((result == LONG_MIN) || (result == LONG_MAX)) && (errno == ERANGE) )
+ if (((result == LONG_MIN) || (result == LONG_MAX)))
return 0;
}
else
result = strtoul( str, &endptr, 10 );
if (!endptr || (endptr == str)) /* Conversion was unsuccessful */
return 0;
- if ((result == ULONG_MAX) && (errno == ERANGE) ) return 0;
+ if (result == ULONG_MAX) return 0;
}
if (lpTranslated) *lpTranslated = TRUE;
return (UINT)result;