EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.
Este tópico ainda não foi avaliado como - Avalie este tópico

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 [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Bits3_0.h (include Bits.h)

IDL

Bits3_0.idl

Library

Bits.lib

See also

IBackgroundCopyCallback2::FileTransferred
IBackgroundCopyFile3

 

 

Send comments about this topic to Microsoft

Build date: 11/12/2012

Isso foi útil para você?
(1500 caracteres restantes)

Contribuições da comunidade

ADICIONAR
© 2013 Microsoft. Todos os direitos reservados.