IXpsOMStoryFragmentsResource::GetStream method

Gets a new, read-only copy of the stream that is associated with this resource.

Syntax

HRESULT GetStream(
  [out, retval] IStream **stream
);

Parameters

  • stream [out, retval]
    A new, read-only copy of the stream that is associated with this resource.

Return value

If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code. For information about XPS document API return values, see XPS Document Errors.

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

Remarks

Reading from the IStream object returned by this method might return an E_PENDING error, which indicates that the stream length has not been determined yet. This behavior is different from that of a standard IStream object.

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

This method calls the stream's Clone method to create the stream returned in stream. As a result, the performance of this method will depend on that of the stream's Clone method.

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

Packaging Errors

XPS Document Errors

XML Paper Specification