|
Transfers data from a file on the server and store it in a local
buffer.
Syntax
object.GetData( RemoteFile, Buffer,
[Length], [Reserved] )
Parameters
- RemoteFile
- A string that specifies the file on the server that will
be transferred to the local system. The file pathing and name
conventions must be that of the server.
- Buffer
- This parameter specifies the local buffer that the data will be
stored in. If the variable is a String type, then the data will be
returned as a string of characters. This is the most appropriate
data type to use if the file on the server is a text file. If the
remote file contains binary data, it is recommended that a Byte
array variable be specified as the argument to this method.
- Length
- An optional integer argument that will contain the number of
bytes copied into the buffer when the method returns.
- Reserved
- An argument reserved for future expansion. This argument should
always be omitted or specified as a numeric value of zero.
Return Value
A value of zero is returned if the operation was successful,
otherwise a non-zero error code is returned which indicates the cause
of the failure.
Remarks
The GetData method transfers data from a file on the server
to the local system, storing it in the specified buffer . This method
will cause the current thread to block until the file transfer
completes, a timeout occurs or the transfer is canceled. During the
transfer, the OnProgress event will fire periodically,
enabling the application to update any user interface objects such as
a progress bar.
See Also
Priority Property,
GetFile Method,
PutData Method,
PutFile Method,
OnProgress Event
|
|