CHttpClient::OpenFile Method  
 
INT OpenFile(
  LPCTSTR lpszFileName  
);

The OpenFile method opens the specified file on the server.

Parameters

lpszFileName
Points to a string that specifies the name of the remote file to open.

Return Value

If the method succeeds, the return value is the server result code. If the method fails, the return value is HTTP_ERROR. To get extended error information, call GetLastError.

Remarks

Only one file may be opened at a time for each client session. Use the CloseFile method to close the file on the server.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cshtpv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also