IXpsOMDocumentStructureResource::SetContent method (xpsobjectmodel.h)
Sets the read-only stream to be associated with this resource.
Syntax
HRESULT SetContent(
[in] IStream *sourceStream,
[in] IOpcPartUri *partName
);
Parameters
[in] sourceStream
The read-only stream to be associated with this resource.
[in] partName
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 DocumentStructure 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
Requirement | Value |
---|---|
Minimum supported client | Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | xpsobjectmodel.h |