- edited description
Range check error in dwsComConnector.RaiseOleError()
Issue #86
resolved
If a negative HResult value (bit 0x80000000 is set) is passed to RaiseOleError() then the call to SysErrorMessage() within RaiseOleError fails with an ERangeCheck exception.
RaiseOleError and SysErrorMessage are declared as:
procedure RaiseOleError(err : HResult; const excepInfo : TExcepInfo);
function SysErrorMessage(ErrorCode: Cardinal): string;
A HResult is a signed 32-bit integer with the range -2147483648..2147483647.
The solution is to hard cast the HResult to an unsigned value as it's done in DwsOleCheck and the EOleSysError constructor.
Environment: Delphi XE, Range checking enabled.
Comments (2)
-
reporter -
repo owner - changed status to resolved
Fixed Issue
#86→ <<cset 40ac95aeb1bf>>
- Log in to comment