- Timestamp:
- Jun 29, 2009, 12:27:18 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/System/Console.ab
r687 r707 691 691 Protected 692 692 Override Function Underflow() As Boolean 693 Dim b = Buffer 694 Dim currentBufLength = b.Length 695 b.Length = currentBufLength + 256 696 Dim p = StrPtr(b) 697 Dim read As DWord 698 If ReadConsole(h, VarPtr(p[currentBufLength]), 256 * SizeOf (TCHAR), read, 0) = 0 Then 699 IO.Detail.ThrowWinLastErrorIOException() 700 End If 701 b.Length = currentBufLength + read 702 Underflow = read <> 0 693 If eofReached Then 694 Underflow = 0 695 Else 696 Dim b = Buffer 697 Dim currentBufLength = b.Length 698 b.Length = currentBufLength + 256 699 Dim p = StrPtr(b) 700 Dim read As DWord 701 If ReadConsole(h, VarPtr(p[currentBufLength]), 256 * SizeOf (TCHAR), read, 0) = 0 Then 702 IO.Detail.ThrowWinLastErrorIOException() 703 End If 704 Dim eofPos = ActiveBasic.Strings.ChrFind(VarPtr(p[currentBufLength]) As PCTSTR, read As SIZE_T, &h1A As TCHAR) 705 If eofPos <> -1 Then 706 eofReached = True 707 read = eofPos 708 End If 709 b.Length = currentBufLength + read 710 Underflow = read <> 0 711 End If 703 712 End Function 704 713 705 714 Private 706 715 h As HANDLE 716 eofReached As Boolean 707 717 End Class 708 718
Note:
See TracChangeset
for help on using the changeset viewer.