Export (0) Print
Expand All

OPC_READ_FLAGS enumeration

Describes the read settings for caching package components and validating them against ECMA-376 OpenXML, 1st Edition, Part 2: Open Packaging Conventions (OPC) conformance requirements.

Syntax


typedef enum  { 
  OPC_READ_DEFAULT      = 0x00000000,
  OPC_VALIDATE_ON_LOAD  = 0x00000001,
  OPC_CACHE_ON_ACCESS   = 0x00000002
} OPC_READ_FLAGS;

Constants

OPC_READ_DEFAULT

Validate a package component against OPC conformance requirements when the component is accessed. For more information about OPC conformance validation, see Remarks.

When validation is performed on access, OPC validation errors can be returned by any method.

OPC_VALIDATE_ON_LOAD

Validate all package components against OPC conformance requirements when a package is loaded. For more information about OPC conformance validation, see Remarks.

If this setting is enabled, performance costs for loading and validating package components are paid when the package is first loaded.

OPC_CACHE_ON_ACCESS

Cache decompressed package component data as a temp file when accessing the component for the first time. When a package component is accessed repeatedly, this caching reduces overhead because the component data is decompressed one time for the first read instead of once for every read operation.

Remarks

If both the OPC_CACHE_ON_ACCESS and OPC_VALIDATE_ON_LOAD read flags are set, all package components are decompressed and cached when a package is loaded.

The Packaging APIs do not use the OPC core properties feature; therefore, the core properties requirements listed in Table H-9 of the OPC are not validated by the Packaging APIs. For more information about OPC conformance requirements, see 1st edition, Part 2: Open Packaging Conventions in ECMA-376 OpenXML (http://go.microsoft.com/fwlink/p/?linkid=123375).

Important  Parts may be repeatedly read from the stream at any time, regardless of which read flags are set. For example, when a package is saved, previously accessed relationships in a Relationships part in the original package may be accessed again to preserve markup compatibility.

Requirements

Header

Msopc.h

IDL

Opcobjectmodel.idl

See also

Packaging Enumerations
Overviews
Getting Started with the Packaging API
Packaging API Programming Guide
Reference
Packaging Interfaces
Packaging API Samples
Reference
IOpcFactory::ReadPackageFromStream
External Resources
ECMA-376 OpenXML standard

 

 

Community Additions

ADD
Show:
© 2015 Microsoft