Partager via


ICcBootStrap::GetFile (Compact 2013)

3/26/2014

Deprecated.

This method copies a specified file from the device to the desktop.

Syntax

HRESULT GetFile(
  DWORD dwTimeout,
  LPCOLESTR wszSrcFullPath,
  LPCOLESTR wszDestFullPath,
  VARIANT_BOOL bOverwrite
);

Parameters

  • dwTimeout
    [in] Timeout (in milliseconds) to wait for GetFile to start.
  • wszSrcFullPath
    [in] Source file name, including full path.
  • wszDestFullPath
    [in] Destination file name, including full path.

    This can be NULL, indicating that the destination file name is the same as the source file name. In this case, the file is copied to the root folder on the desktop.

  • bOverwrite
    [in] Overwrite if the file exists on the desktop.

    Default is VARIANT_FALSE.

Return Value

The following table shows the return values for this method.

Value

Description

S_OK

Indicates success.

0x80070050 HRESULT

Indicates the file was not copied to the desktop because a file by the same name exists on the desktop, and because the bOverwrite parameter is set to VARIANT_FALSE. (This return value is derived from ERROR_FILE_EXISTS.)

E_INVALIDARG

Indicates that at least one input argument is NULL, or that bstrSrcFullPath is an empty string.

E_ACCESSDENIED

Indicates that the call failed because the file exists and cannot be overwritten; that is, the file or folder is write-protected.

0x80070002 HRESULT

Indicates that the file specified in wszDestFullPath cannot be found on the target device. (This return value is derived from ERROR_FILE_NOT_FOUND.)

E_FAIL

Indicates any other failure.

Requirements

Header

ccbootstrap.idl

See Also

Reference

ICcBootstrap
Core Connectivity Interfaces