This topic describes the Packaging APIs, which provide support for applications that consume or produce Open Packaging Conventions–compliant files, called packages.
This topic contains the following sections.
Purpose
The Windows 7 Packaging feature is a set of COM-based API that provides support for accessing, modifying, and saving packages using C and C++.
What is Packaging?
Packaging can be more easily understood through an analogy with real–world filing systems. People and businesses need to organize their information. Often, this information is tracked by using paperwork that is stored in folders, which are in turn, stored in filing cabinets. For each person and business, someone had to design a system to fit their needs, a system that would allow information to be accessed as needed.
A personalized filing system provides great advantages when used by someone who understands how the system works, but when someone new needs to access the system, how do they know where to find the information they need? Suddenly, the personalized filing system becomes less convenient. Applications face similar challenges in organizing data: what information is most important and how can developers ensure that it is easily accessible?
The ECMA-376 OpenXML, 1st Edition, Part 2: Open Packaging Conventions (OPC) specification provides an answer to this question. A package, as described in the OPC, enables different applications to access key information from an OPC–based file in a standardized and predictable way. A package is like a filing cabinet whose basic organization is known to all the people and businesses that interact with it.
Examples of ZIP-based package formats include:
- The OpenXML formats used in the 2007 Microsoft Office system:
- Office Word 2007 documents (.docx)
- Office Excel 2007 worksheets (.xlsx)
- Office PowerPoint 2007 presentations (.pptx)
- XPS documents (.xps)
Developer Audience
The Packaging APIs are designed to be used by the following classes of developers:
- Developers who create applications that interact with packages.
- Developers who create tools or add-ons that interact with packages.
Prerequisites
To use the Packaging API, you should have a practical understanding of the technologies in the following table:
| Technology | Description |
| COM Programming |
As a COM-based API set, the Packaging API relies on you to perform tasks such as error handling, resource management, and synchronization. For an introduction to COM programming, see COM Programming.
|
| OPC specification of the ECMA-376 OpenXML standard |
The OPC may expand on and supplement the descriptions and requirements provided in the Packaging API documentation. For a summary of key ideas in the specification, see Open Packaging Conventions Fundamentals. For more in-depth information, see 1st edition, Part 2 of the ECMA-376 OpenXML (http://go.microsoft.com/fwlink/?LinkId=123375) standard.
|
Additional Resources and Related Technologies
While not required to use the Packaging API, knowledge of the following technologies will advance your understanding of the Packaging API.
| Technology | Description |
| System.IO.Packaging |
The managed Packaging API implementation. For a summary of key differences between this and the managed API, see Differences between the Native and Managed APIs. For in-depth information about the managed implementation, see System.IO.Packaging.
|
| XPS Document API |
The native implementation of the XML Paper Specification (XPS) (an OPC-based format), which is built on the Packaging APIs. For more in-depth information, see XPS Document API.
|
| XPS Digital Signature API |
The native implementation of XPS Digital Signature requirements,which is built on the Packaging APIs. For more in-depth information, see XPS Digital Signature API.
|
| Extensible Markup Language (XML) |
If your application interacts with XML markup that is acessed by calling a Packaging API, familiarity with XML markup will be helpful in developing your application. For more information, see Extensible Markup Language (XML) (http://go.microsoft.com/fwlink/?LinkId=146591).
|
Section Contents
| Topic | Description |
| Packaging API Programming Guide | This section contains conceptual topics that describe how to use the Windows 7 Packaging APIs. |
| Packaging API Reference | The topics in this section provide information about the Packaging APIs.
|
| Packaging API Samples | The topics in this section briefly describe the sample programs that accompany the Microsoft Windows Software Development Kit (SDK) for Windows 7. |
| Packaging API Glossary | This topic provides definitions for Packaging API terms. |
See Also
- Overviews
- Getting Started with the Packaging API
External Resources
- ECMA-376 OpenXML
Send comments about this topic to Microsoft
Build date: 11/16/2009