Description of FileCreate and FileOpen return value is outdated
Original Reporter info from Mantis: Gorelkin
-
Reporter name: Sergei Gorelkin
Original Reporter info from Mantis: Gorelkin
- Reporter name: Sergei Gorelkin
Description:
FileCreate and FileOpen functions return a THandle, which has been changed into PtrUInt for Windows platforms in due time. Therefore, return value of said functions on error is not literal -1, but THandle(-1).
Possibly this issue goes slightly beyond documentation and we need to declare a constant like InvalidHandleValue=THandle(-1) and recommend using it for comparing with FileCreate/FileOpen output value.
Mantis conversion info:
- Mantis ID: 23343
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 971 (#41d30a10)
- Target version: 2.6.2