IAppxBundleReader::GetPayloadPackage method (appxpackaging.h)

Retrieves an appx file object for the payload package with the specified file name.

Syntax

HRESULT GetPayloadPackage(
  [in]          LPCWSTR   fileName,
  [out, retval] IAppxFile **payloadPackage
);

Parameters

[in] fileName

Type: LPCWSTR

The name of the payload file to be retrieved.

[out, retval] payloadPackage

Type: IAppxFile**

The payload file object the 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 code Description
HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)
There is no payload file with the specified file name.

Remarks

You can pass the file object’s stream into IAppxFactory::CreatePackageReader to get a package reader object over the appx file.

Requirements

Requirement Value
Minimum supported client Windows 8.1 [desktop apps only]
Minimum supported server Windows Server 2012 R2 [desktop apps only]
Target Platform Windows
Header appxpackaging.h

See also

IAppxBundleReader