共用方式為


IXpsOMPackage::SetDiscardControlPartName 方法 (xpsobjectmodel.h)

設定 XPS 套件中捨棄控件元件的名稱。

語法

HRESULT SetDiscardControlPartName(
  [in] IOpcPartUri *discardControlPartUri
);

參數

[in] discardControlPartUri

IOpcPartUri 介面,其中包含要指派給 XPS 封裝之捨棄控件元件的名稱。 NULL 指標會釋放任何先前指派的捨棄控件元件。

傳回值

如果方法成功,它會傳回S_OK;否則會傳回 HRESULT 錯誤碼。

規格需求

需求
最低支援的用戶端 適用於 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

另請參閱

IOpcPartUri

IXpsOMPackage

XML Paper Specification