From Xojo Documentation

Revision as of 13:00, 16 May 2019 by PLefebvre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Read-Only Property (As Integer )
IntegerValue = aBinaryStream.LastErrorCode

Supported for all project types and targets.

Reports the last file I/O error. Error numbers are given as original file system error codes.


For BinaryStream objects created with a String, all errors return 100. This happens if you try to write to or set the length of the BinaryStream.

Sample Code

This code gets the last error code. If there is no error code, LastErrorCode returns 0.

Dim i As Integer
Dim readStream As BinaryStream = BinaryStream.Open(readFile, False)
i = readStream.LastErrorCode