IAppxPackageWriter2::Close method (appxpackaging.h)

Closes the package writer object's output stream.

Syntax

HRESULT Close(
  [in] IStream *manifest,
  [in] IStream *contentGroupMap
);

Parameters

[in] manifest

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

[in] contentGroupMap

The stream that provides the contents of the content group map for the package.

Return value

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.

Requirements

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

See also

IAppxPackageWriter2