Exporteren (0) Afdrukken
Alles uitvouwen
EN
Deze inhoud is niet beschikbaar in uw taal, maar wel in het Engels.

IBackgroundCopyFile3::GetTemporaryName method

Gets the full path of the temporary file that contains the content of the download.

Syntax


HRESULT GetTemporaryName(
  [out]  LPWSTR *ppFileName
);

Parameters

ppFileName [out]

Null-terminated string that contains the full path of the temporary file. Call the CoTaskMemFree function to free ppFileName when done.

Return value

The method returns the following return values.

Return codeDescription
S_OK

Success

 

Remarks

Applications can use this method to gain access to the data before the job is complete. Open the file for shared write access (FILE_SHARE_WRITE). To determine how many bytes have been transferred and are available for reading, call the IBackgroundCopyFile::GetProgress method. Note that the progress information will be set back to zero if the time stamp of the URL changes.

Do not open the file for reading until BITS begins transferring the file; otherwise, the job will go into the transient error state.

The temporary file is available until the application calls the IBackgroundCopyJob::Complete or IBackgroundCopyJob::Cancel method, or the JobInactivityTimeout group policy expires. You must release your handle to the temporary file before calling the Complete or Cancel method.

The ACL for the temporary file is the same as that of the final file when Complete is called (the ACL is inherited from the folder).

To determine if BITS finished transferring the file, you can:

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Bits3_0.h (include Bits.h)

IDL

Bits3_0.idl

Library

Bits.lib

See also

IBackgroundCopyCallback2::FileTransferred
IBackgroundCopyFile3

 

 

Community-inhoud

Toevoegen
Weergeven:
© 2014 Microsoft