Share via


IXpsOMStoryFragmentsResource::SetContent method

Sets the read-only stream to be associated with this resource.

Syntax

HRESULT SetContent(
  [in] IStream     *sourceStream,
  [in] IOpcPartUri *partName
);

Parameters

  • sourceStream [in]
    The read-only stream to be associated with this resource.

  • partName [in]
    The part name to be assigned to this resource.

Return value

If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code.

Remarks

The calling method should treat this stream as a single-threaded apartment (STA) model object and not re-enter any of the stream interface's methods.

For more information about the content of a StoryFragments part, see the XML Paper Specification.

Because GetStream gets a clone of the stream that is set by this method, the provided stream should have an efficient cloning method. A stream with an inefficient cloning method will reduce the performance of GetStream.

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

IXpsOMStoryFragmentsResource

IOpcPartUri

XML Paper Specification