IAppxPackageWriter::Close method (appxpackaging.h)

Writes footprint files at the end of the app package, and closes the package writer object's output stream.

Syntax

HRESULT Close(
  [in] IStream *manifest
);

Parameters

[in] manifest

Type: IStream*

The stream that provides the contents of the manifest for the package. The stream must support Read, Seek, and Stat.

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
E_NOT_VALID_STATE
The writer is closed.
APPX_E_INVALID_MANIFEST
The input stream contains a manifest that is not valid.

Remarks

The Close method should be called only after all payload files have been added to the package.

Examples

For an example, see How to create an app package.

Requirements

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

See also

IAppxPackageWriter