Package Consumption Error Group
When you attempt to access a package that is loaded from an IStream interface, the following error codes may be returned.
Return code/value | Description |
---|---|
|
The selected package creation settings are inconsistent; an example would be creating a package that uses both Force 32-bit mode and Force 64-bit mode. |
|
Errors that occurred during previous operations prevent the requested operation from completing. Future attempts to perform the operation that triggered this error, or attempts to perform related operations, will fail. |
|
More than one Default element specifies the same extension in the content type XML markup. For more information about Default elements and content type XML markup, see the OPC. |
|
More than one Override element in the Content Types stream specifies the same part name as the value of its PartName attribute. If this error is encountered while a package is being read, the package is not valid, because the PartName attribute value for each Override element must be unique. For more information about Override elements, see the OPC. |
|
A part with the specified part name already exists in the current package. |
|
A piece with the same piece number already exists in the current package. Pieces are a result of interleaved parts. If the Packaging API is used to consume a package that supports interleaving, this error may result. The Packaging API does not support the production of packages that have interleaved parts. For more information about interleaving, see the OPC. |
|
A relationship with the same identifier already exists in the current package. |
|
The current position is already past the last item of the enumerator. |
|
The current position already precedes the first item of the enumerator. |
|
The enumerator is invalid because the underlying set has changed. |
|
The enumerator cannot perform this operation from its current position. |
|
The current position already precedes the first item of the enumerator. |
|
The enumerator is invalid because the underlying set has changed. |
|
The enumerator cannot perform this operation from its current position. |
|
A content type does not conform to the rules for a valid media type, specified in RFC 2616: HTTP/1.1 (https://go.microsoft.com/fwlink/p/?linkid=143979) and the OPC. |
|
The XML markup that defines package content types in the Content Types stream is not well-formed. |
|
An extension that is provided for a default content type is not valid, because it does not conform to the rules for a part name, specified in the OPC. |
|
The part name that is used as the value of the PartName attribute of an Override element in the Content Types stream does not conform to the rules for a valid part name, specified in RFC 3986: URI Generic Syntax (https://go.microsoft.com/fwlink/p/?linkid=143950) and the OPC. For more information about Override elements, see the OPC. |
|
An unexpected piece was found. Pieces are a result of interleaved parts. If the Packaging API is used to consume a package that has interleaved parts, this error may result. The Packaging API does not support the production of packages that have interleaved parts. For more information about interleaving, see the OPC. |
|
The Id attribute of a relationship does not conform to the rules specified in the OPC. |
|
The Target attribute of a relationship does not conform to the rules specified in the OPC. |
|
The TargetMode attribute of a relationship does not conform to the rules specified in the OPC. |
|
The Type attribute of a relationship does not conform to the rules specified in the OPC. |
|
The relationship markup for a Relationships part is not well-formed XML. |
|
The XML Encoding attribute must be UTF-8 or UTF-16. |
|
The PreserveAttributes attribute does not have a matching Ignorable attribute on the same element. |
|
The PreserveElements attribute does not have a matching Ignorable attribute on the same element. |
|
The ProcessContent attribute does not have a matching Ignorable attribute on the same element. |
|
An element (or its parent) that is ignorable by markup compatibility has an attribute that is prohibited in Part 5: Markup Compatibility and Extensibility of ECMA-376 OpenXML (https://go.microsoft.com/fwlink/p/?linkid=123375). |
|
Encountered an enumeration type that is not valid. |
|
The prefix list cannot be parsed, because it contains a character that is not valid, such as ':'. |
|
A markup compatibility attribute contains an invalid list of element names. |
|
The declaration of an xmlns attribute is malformed. |
|
An AlternateContent element must have at least one Choice element as a child. |
|
A markup compatibility element that requires the Requires attribute is missing the attribute, or that attribute's value is empty. |
|
There is more than one Fallback element within the child elements of an AlternateContent, but only one is allowed. |
|
An AlternateContent element cannot have another AlternateContent element as a child. |
|
A markup compatibility element has an attribute that is not recognized or supported in the markup compatibility namespace. |
|
A Choice element was encountered after the Fallback element, or more than one Fallback element was encountered. |
|
An element that is used in the markup compatibility namespace is not recognized as a valid markup compatibility element. |
|
The Requires attribute was found on a markup compatibility element that does not support this attribute. |
|
The MustUnderstand attribute of an element contains a namespace that is not recognized. |
|
The package contains an XML prefix that is not defined. |
|
Could not find the part that contains Content Types stream. |
|
One or more pieces of an interleaved part were not found. A piece is a file that contains data for an interleaved part. This error may result if the Packaging APIs are used to consume a package that has interleaved parts. Production of packages that have interleaved parts is not supported by the Packaging APIs. For more information about interleaving, see the OPC. |
|
The specified part does not exist. |
|
The Content Types stream XML markup does not conform to the syntax specified in RFC 2616: HTTP/1.1 and the OPC. |
|
The relationship markup does not conform to the rules specified in the OPC. |
|
The part name of one part is a segment in the path of the part name of another part. An example would be a part named "path/dirorfile/file.txt" and a part named "path/dirorfile". |
|
Either the content type of a part differed from the expected content type (specified in the OPC, ECMA-376 Part 2), or the part content did not match the part's content type. |
|
The OPC allows certain aspects of a package, such as the number of pieces used to compose a part, to grow without bounds. For practical purposes, however, the Packaging API limits the possible number of pieces to an unsigned DWORD. |
|
The central directory exceeds 65,535 bytes. |
|
The file comment length exceeds 65,535 bytes. |
|
Compression of the data failed. |
|
The archive has an incorrect checksum or signature, or file headers in the central directory are in an unexpected order. |
|
Data decompression failed. |
|
Two file items in the archive have the same name. |
|
The extra field length exceeds 65,535 bytes. |
|
The length of a local file header exceeds 65,535 bytes. |
|
The number of file items found in the archive does not match the number of file items recorded in the central directory. |
|
The file attributes recorded in a file header in the central directory are inconsistent with the attributes of the zipped file item. |
|
A field or header in the archive contains a different number of bytes than expected. |
|
A data descriptor was expected for the file item, but none was found. |
|
The archive is missing the end of the central directory record. |
|
The length of a file item name exceeds 65,535 characters. |
|
The 64-bit ZIP format is required because the data exceeds the capacity of the 32-bit ZIP format. Recreate the package using the 64-bit ZIP format. |
|
The package cannot be read because the archive is either unsupported (for example, a multidisk) or encrypted. |
Remarks
For more information about error handling in COM, see the Error Handling (COM) topic.
Requirements
Header |
|
See also
-
Overviews
-
Reference
-
External Resources
-
ZIP File Format Specification from PKWARE, Inc., version 6.2.0 (2004)