(xpsobjectmodel.h) IXpsOMColorProfileResource 介面

提供色彩配置文件資源的 IStream 介面。

繼承

IXpsOMColorProfileResource 介面繼承自 IXpsOMResourceIXpsOMColorProfileResource 也有下列類型的成員:

方法

IXpsOMColorProfileResource 介面具有這些方法。

 
IXpsOMColorProfileResource::GetStream

取得與此資源相關聯之數據流的新只讀複本。 (IXpsOMColorProfileResource.GetStream)
IXpsOMColorProfileResource::SetContent

設定要與此資源相關聯的唯讀數據流。 (IXpsOMColorProfileResource.SetContent)

備註

下列程式代碼範例說明如何建立此介面的實例。


IXpsOMColorProfileResource    *newInterface;
IOpcPartUri                   *partUri;

// 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))
{
    // The partUriString and acquiredStream variables 
    //   are defined outside of this example.
    hr = xpsFactory->CreatePartUri(
        partUriString, 
        &partUri);
    if (SUCCEEDED(hr))
    {
        hr = xpsFactory->CreateColorProfileResource (
            acquiredStream, 
            partUri,
            &newInterface);
        if (SUCCEEDED(hr))
        {
            // use newInterface

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

規格需求

需求
最低支援的用戶端 適用於 Windows Vista 的 Windows 7、Windows Vista SP2 和平臺更新 [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 xpsobjectmodel.h

另請參閱

IXpsOMObjectFactory::CreateColorProfileResource

IXpsOMResource

介面

XML Paper Specification