Export (0) Print
Expand All

IBackgroundCopyJob2::GetReplyFileName method

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

pReplyFileName [out]

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 codeDescription
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

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Redistributable

BITS 1.5 on Windows XP

Header

Bits1_5.h (include Bits.h)

IDL

Bits1_5.idl

Library

Bits.lib

DLL

BitsPrx2.dll

IID

IID_IBackgroundCopyJob2 is defined as 54B50739-686F-45EB-9DFF-D6A9A0FAA9AF

See also

IBackgroundCopyJob2::GetReplyData
IBackgroundCopyJob2::SetReplyFileName

 

 

Community Additions

ADD
Show:
© 2014 Microsoft