Click or drag to resize

CFtp.OpenFile Method

X#
Open a remote file for writing or reading.

Namespace:  VO
Assembly:  VOInternetClasses (in VOInternetClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD OpenFile(
	cRemoteFile,
	nAccess,
	nFlags
) AS USUAL CLIPPER
Request Example View Source

Parameters

cRemoteFile (Optional)
Type: Usual
String containing the name of the file that has to be accessed on the remote system.
nAccess (Optional)
Type: Usual
Numeric value determining the type of file access (GENERIC_READ or GENERIC_WRITE — not both). The default is GENERIC_READ.
nFlags (Optional)
Type: Usual
Conditions for operation with the specified file. The application should select one transfer type and any of the flags that control how the caching of the file will be controlled. The transfer type can be any one of the following values: The application can use one or more of the following values to control the caching of the file:

Return Value

Type: Usual
File handle, if successful; otherwise, NULL_PTR.
Remarks
The OpenFile() method initializes a remote file handle for subsequent file operations. The handle remains open until calling the CloseFile() method, and it can be used to call functions like InternetReadFile() or InternetWriteFile(), InternetCloseHandle(), or FtpFindFirstFile().
See Also