UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:xpsobjectmodel.IXpsOMPackage.WriteToFile |
IXpsOMPackage::WriteToFile (xpsobjectmodel.h) |
Writes the XPS package to a specified file. |
|
xps\ixpsompackage_writetofile.htm |
xps |
89accde7-989e-4a87-b96e-e47cc6c6954a |
12/05/2018 |
FALSE, IXpsOMPackage interface [XPS Documents and Packaging],WriteToFile method, IXpsOMPackage.WriteToFile, IXpsOMPackage::WriteToFile, TRUE, WriteToFile, WriteToFile method [XPS Documents and Packaging], WriteToFile method [XPS Documents and Packaging],IXpsOMPackage interface, xps.ixpsompackage_writetofile, xpsobjectmodel/IXpsOMPackage::WriteToFile |
xpsobjectmodel.h |
Windows |
Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps \| UWP apps] |
Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps \| UWP apps] |
XpsObjectModel.idl |
Windows |
19H1 |
|
|
|
|
|
|
Writes the XPS package to a specified file.
The name of the file to be created. This parameter must not be NULL.
The SECURITY_ATTRIBUTES structure, which contains two distinct but related data members:
- lpSecurityDescriptor: an optional security descriptor
- bInheritHandle: a Boolean value that determines whether the returned handle can be inherited by child processes
For more information about the securityAttributes parameter, refer to CreateFile.
Specifies the settings and attributes of the file to be created. For most files, a value of FILE_ATTRIBUTE_NORMAL can be used.
For more information about the flagsAndAttributes parameter, refer to CreateFile.
A Boolean value that indicates whether the document markup is to be optimized for size when it is written to the file.
Value | Meaning |
---|---|
|
The package writer will attempt to optimize the markup for minimum size. |
|
The package writer will not attempt any optimization. |
The method returns an HRESULT. Possible values include, but are not limited to, those in the table that follows. For information about XPS document API return values that are not listed in this table, see XPS Document Errors.
Return code | Description |
---|---|
|
The method succeeded. |
|
fileName is NULL. |
This method calls the Packaging API. For information about the Packaging API return values, see Packaging Errors.
The optimizeMarkupSize value determines whether the markup inside the individual document parts is to be optimized. It has no effect on how the parts are interleaved.