共用方式為


IXpsOMPartResources interface

Provides access to all shared, part-based resources of the XPS document.

When to implement

Never. Custom implementation of this interface is not supported.

Members

The IXpsOMPartResources interface inherits from the IUnknown interface. IXpsOMPartResources also has these types of members:

  • Methods

Methods

The IXpsOMPartResources interface has these methods.

Method Description
GetColorProfileResources

Gets the IXpsOMColorProfileResourceCollection interface that contains the color profiles that are used in the XPS document.

GetFontResources

Gets the IXpsOMFontResourceCollection interface that contains the fonts that are used in the XPS document.

GetImageResources

Gets the IXpsOMImageResourceCollection interface that contains the images that are used in the XPS document.

GetRemoteDictionaryResources

Gets the IXpsOMRemoteDictionaryResourceCollection interface that contains the remote resource dictionaries that are used in the XPS document.

 

Remarks

The code example that follows illustrates how to create an instance of this interface.

IXpsOMPartResources    *newInterface;

// Note the implicit requirement that CoInitializeEx 
//  has previously been called from this thread.

hr = CoCreateInstance(
    __uuidof(XpsOMObjectFactory),
    NULL,
    CLSCTX_INPROC_SERVER,
    _uuidof(IXpsOMObjectFactory),
    reinterpret_cast<LPVOID*>(&xpsFactory)
    );

if (SUCCEEDED(hr))
{
    hr = xpsFactory->CreatePartResources (&newInterface);

    if (SUCCEEDED(hr))
    {
        // use newInterface

        newInterface->Release();
    }
    xpsFactory->Release();
}
else
{
    // evaluate HRESULT error returned in hr
}

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

IXpsOMObjectFactory::CreatePartResources

Interfaces

XML Paper Specification