CWebStorage::GetFile Method  
 
BOOL GetFile(
  LPCTSTR lpszLocalFile,  
  LPCTSTR lpszObjectLabel,  
  LPWEB_STORAGE_OBJECT lpObject  
);

The GetFile method downloads the contents of a storage object and copies it to a local file.

Parameters

lpszLocalFile
A pointer to a null terminated string that specifies the name of the local file that will be created or overwritten with the contents of the storage object. If a path is not specified, the file will be created in the current working directory.
lpszObjectLabel
A pointer to a null terminated string that specifies the label of the object that should be retrieved from the server.
lpObject
A pointer to a WEB_STORAGE_OBJECT structure that will contain additional information about the object. This parameter may be omitted or NULL if the information is not required.

Return Value

If the method succeeds, the return value is a non-zero. If the method fails, the return value is zero. To get extended error information, call the GetLastError method.

Remarks

If you are downloading a large object and want your application to receive progress updates during the data transfer, use the RegisterEvent method and provide a pointer to a static callback function that will receive event notifications.

Requirements

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

See Also

DownloadFile, GetData, PutFile, PutData, RegisterEvent, UploadFile