IOpcFactory::CreatePackage method (msopc.h)

Creates a package object that represents an empty package.

Syntax

HRESULT CreatePackage(
  [out, retval] IOpcPackage **package
);

Parameters

[out, retval] package

A pointer to the IOpcPackage interface of the package object that represents an empty package.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
E_NOTIMPL
This method is not implemented for this version of Windows.

Remarks

Support on Previous Versions of Windows

This method is not supported on versions of Windows prior to Windows 7. For more information, see Getting Started with the Packaging API, and Platform Update for Windows Vista.

Thread Safety

Packaging objects are not thread-safe.

For more information, see the Getting Started with the Packaging API.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header msopc.h

See also

Getting Started with the Packaging API

IOpcFactory

Music Bundle Sample

Overviews

Packages Overview

Packaging API Programming Guide

Packaging API Reference

Packaging API Samples

Packaging Errors

Platform Update for Windows Vista

Reference