Next Topic

Previous Topic

Book Contents

OpenFile

int OpenFile(string sFilename,bool bWrite,bool bText)

Return values

Non zero if the function is successful; otherwise 0, and a specific error code can be retrieved by calling global function GetLastError.

Parameters

  • sFilename - Name of file to open.
  • bWrite - If non zero the file is opened in write mode. If zero the file is opened for read only.
  • bText - If non zero the file is opened in text translation mode; otherwise it is opened in binary mode.

Remarks

The function opens a file on the FTP server, after the file is opened calls to Write and Read function can be made. The CloseFile function is used to close the file.