共用方式為


IXpsOMPackageWriter::IsClosed method

Gets the status of the IXpsOMPackageWriter interface.

Syntax

HRESULT IsClosed(
  [out, retval] BOOL *isClosed
);

Parameters

  • isClosed [out, retval]
    A pointer to a Boolean variable that receives the status of the IXpsOMPackageWriter interface.

    Value Meaning
    TRUE

    The package is closed and no more content can be added.

    FALSE

    The package is open and content can be added.

     

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the table that follows. For information about XPS document API return values that are not listed in this table, see XPS Document Errors.

Return code Description
S_OK

The method succeeded.

XPS_E_UNAVAILABLE_PACKAGE

A severe error occurred and the contents of the XPS OM might be unrecoverable. Some components of the XPS OM might still be usable but only after they have been verified. Because the state of the XPS OM cannot be predicted after this error is returned, all components of the XPS OM should be released and discarded.

 

This method calls the Packaging API. For information about the Packaging API return values, see Packaging Errors.

Remarks

If the IXpsOMPackageWriter interface is closed, operations on the package are not allowed.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Header

Xpsobjectmodel.h

IDL

XpsObjectModel.idl

See also

IXpsOMPackageWriter

IXpsOMPackageWriter3D

Using the IXpsOMPackageWriter Interface

Packaging Errors

XPS Document Errors

XML Paper Specification