Dart Tcp, Daemon, Udp Controls
Read Method
Uninitialized String or Byte Array. Where data is to be put.
Optional Long. Specifies how much data is to be read.
Description
Read one or more bytes from the stream. Reading starts at Position.
Syntax
Visual Basic
Public Function Read( _
   ByRef Buffer As Variant, _
   Optional ByVal Count As Long = 0 _
) As Long
Parameters
Buffer
Uninitialized String or Byte Array. Where data is to be put.
Count
Optional Long. Specifies how much data is to be read.
Return Value
Indicates how much data was read.
Remarks

If the Buffer parameter is omitted, then this method attempts to read all the data from the current position to the end of the stream. The position is advanced Count bytes upon completion.

Error Codes

This method may generate the following error code (refer to ErrorConstants for a complete list of error codes):

Example
Private Sub ReadAll(S As String)
	On Error Goto OnError ' use intrinsic error handling
	'Move the position to the beginning
	Stream1.Position = 0
	Stream1.Read S
	Exit Sub
OnError: ' Any error jumps here
	Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
See Also

DartStream Object  | DartStream Members


PowerTCP FTP for ActiveX Documentation Version 2.2
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic