Share via


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 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 DO 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.

Requirements

Minimum supported client

Windows 10, version 1709 [desktop apps only]

Minimum supported server

Windows Server 2016 [desktop apps only]

Header

Deliveryoptimization.h

IDL

DeliveryOptimization.idl

Library

Dosvc.lib

DLL

Dosvc.dll

IID

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

See also

IBackgroundCopyJob2

IBackgroundCopyJob2::GetReplyData

IBackgroundCopyJob2::SetReplyFileName