IBackgroundCopyJob2::GetReplyFileName method (bits1_5.h)

Retrieves the name of the file that contains the reply data from the server application. Call this method only if the job type is BG_JOB_TYPE_UPLOAD_REPLY.

Syntax

HRESULT GetReplyFileName(
  [out] LPWSTR *pReplyFileName
);

Parameters

[out] pReplyFileName

Null-terminated string that contains the full path to the reply file. Call the CoTaskMemFree function to free pReplyFileName when done.

Return value

This method returns the following HRESULT values, as well as others.

Return code Description
S_OK
Successfully retrieved the name of the file that contains the reply data.
E_NOTIMPL
This method is not implemented for jobs of type BG_JOB_TYPE_DOWNLOAD or BG_JOB_TYPE_UPLOAD.

Remarks

To specify a reply file name, call the IBackgroundCopyJob2::SetReplyFileName method. If you did not specify a name, the GetReplyFileName method returns the name that BITS generated for you. If you did not specify a name and you called this method before adding a file to the job, pReplyFileName is set to NULL.

You must call the IBackgroundCopyJob::Complete method before opening and reading the reply file; the reply file is not available to the client until you call the Complete method.

The file is empty if the server application did not provide a reply.

Examples

For an example that uses the GetReplyFileName method, see Retrieving the Reply From an Upload-Reply Job.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2003
Target Platform Windows
Header bits1_5.h (include Bits.h)
Library Bits.lib
DLL BitsPrx2.dll
Redistributable BITS 1.5 on Windows XP

See also

IBackgroundCopyJob2::GetReplyData

IBackgroundCopyJob2::SetReplyFileName