Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IAppxPackageReader::GetPayloadFile method

Retrieves a payload file from the package.

Syntax


HRESULT GetPayloadFile(
  [in]          LPCWSTR   fileName,
  [out, retval] IAppxFile **file
);

Parameters

fileName [in]

Type: LPCWSTR

The name of the payload file to be retrieved.

file [out, retval]

Type: IAppxFile**

The file object that corresponds to fileName.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. Otherwise, it returns an error code that includes, but is not limited to, those in the following table.

Return codeDescription
HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)

There is no payload file with the specified file name.

 

Remarks

The specified fileName must include the path relative to the package root directory.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

AppxPackaging.h

IDL

AppxPackaging.idl

IID

IID_IAppxPackageReader is defined as b5c49650-99bc-481c-9a34-3d53a4106708

See also

IAppxFile
IAppxPackageReader
IAppxPackageReader::GetFootprintFile
IAppxPackageReader::GetPayloadFiles

 

 

Show:
© 2017 Microsoft