Dart Tcp, Daemon, Udp Controls
ReadBytes Method
Optional. Specifies how much data is to be read.
Description
Return data from the current position as a Byte Array. Reading starts at Position.
Syntax
Visual Basic
Public Function ReadBytes( _
   Optional ByVal Count As Long = 0 _
) As Variant
Parameters
Count
Optional. Specifies how much data is to be read.
Return Value
Byte Array.
Remarks

Some environments, such as JavaScript, do not support the passing of parameters by reference. Consequently, such methods as Receive cannot be used by passing in a String. You can use the DartStream Object to circumvent this limitation (see the ReadString method Remarks section for a Java sample).

Error Codes

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

Example
Private Function ReadAll(Stream1 As DartStream) As Byte
	'Move the position to the beginning
	Stream1.Position = 0
	ReadAll = Stream1.ReadBytes
End Function
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