Receives a remote file directly into memory.
The remote filename specified by the sRemoteFilename parameter can be relative to the FTP server's current working folder , or can be absolute to the remote system.
Depending on the setting of the eReceiveMemOptions parameter, the data will be returned by either a single, or by multiple occurrences of the ReceivingMemoryFileData event. If you want to receive the data in a single chunk, use the fmoSingleBlock value, and make sure you have enough memory. To receive the file in small chunks as data is received by the library (streaming fashion), use the fmoMultipleBlocks value.
As a performance optimization, the FileTransferStatus event (listed below as one of the events triggered as a result of calling this method) is only triggered when the fmoSingleBlock value is specified in the sReceiveMemOptions parameter.
This method can only be used when the CurrentState property's value is fcsConnected.
Parameter | Description |
---|---|
sRemoteFilename | The remote filename of the file to receive. |
lRemoteOffset | The byte offset of the remote file to start receiving data from. |
eReceiveMemOptions | Either fmoSingleBlock or fmoMultipleBlocks. Details above. |
Declaration | |
---|---|
HRESULT ReceiveMemoryFile |
AccountName, LocalDataAddress, LocalDataPort, PassiveMode, RemoteDataAddress, RemoteDataPort, RepresentationType
FileTransferStatus, LoggingCommandLine, ProcessCompleted, ReceivingMemoryFileData