IAppxEncryptionFactory3::CreateEncryptedPackageWriter method (appxpackaging.h)

Creates a new instance of an IAppxEncryptedPackageWriter.

Syntax

HRESULT CreateEncryptedPackageWriter(
  IStream                                *outputStream,
  IStream                                *manifestStream,
  IStream                                *contentGroupMapStream,
  const APPX_ENCRYPTED_PACKAGE_SETTINGS2 *settings,
  const APPX_KEY_INFO                    *keyInfo,
  const APPX_ENCRYPTED_EXEMPTIONS        *exemptedFiles,
  IAppxEncryptedPackageWriter            **packageWriter
);

Parameters

outputStream

A writeable stream for sending bytes produced by the app package.

manifestStream

A readable stream that defines the package for the AppxManifest.xml.

contentGroupMapStream

A stream that defines the content group map.

settings

Settings for creating the package.

keyInfo

Key info containing the base encryption key and key ID for encrypting the package. The base encryption key is used to derive the per file encryption keys. If this parameter is null, the global test key and key ID are used.

exemptedFiles

Files exempted from the package writer.

packageWriter

The package writer object created.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

   
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

IAppxEncryptionFactory3