IAppxBundleFactory::CreateBundleWriter method (appxpackaging.h)

Creates a write-only bundle object to which app packages can be added.

Syntax

HRESULT CreateBundleWriter(
  [in]          IStream           *outputStream,
  [in]          UINT64            bundleVersion,
  [out, retval] IAppxBundleWriter **bundleWriter
);

Parameters

[in] outputStream

Type: IStream*

The output stream that receives the serialized package data. The stream must support at least the Write method.

[in] bundleVersion

Type: UINT64

The version number of the bundle.

If set to 0, CreateBundleWriter sets the version number of the bundle to a value derived from the current system time. We recommend passing 0 so version numbers are automatically generated and each successive call generates a higher version number.

For example, if you call CreateBundleWriter on 2013/12/23 3:45:00 AM UTC with bundleVersion set to 0, the version number of the bundle becomes 2013.1223.0345.0000.

[out, retval] bundleWriter

Type: IAppxBundleWriter**

The bundle writer created by this method.

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.

Remarks

Content added to the bundle is serialized out as an Appx bundle file to outputStream.

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

IAppxBundleFactory