Export (0) Print
Expand All

IAppxBundleFactory::CreateBundleWriter method

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

outputStream [in]

Type: IStream*

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

bundleVersion [in]

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.

bundleWriter [out, retval]

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.

E_INVALIDARG
ERROR_INVALID_PARAMETER

Remarks

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

Requirements

Minimum supported client

Windows 8.1 [desktop apps only]

Minimum supported server

Windows Server 2012 R2 [desktop apps only]

Header

AppxPackaging.h

IDL

AppxPackaging.idl

IID

IID_IAppxBundleFactory is defined as BBA65864-965F-4A5F-855F-F074BDBF3A7B

See also

IAppxBundleFactory

 

 

Show:
© 2014 Microsoft