共用方式為


EncryptedPackageEnvelope.Create 方法

定義

建立及傳回 EncryptedPackageEnvelope

多載

Create(Stream, PublishLicense, CryptoProvider)

在指定的資料流上建立及傳回 EncryptedPackageEnvelope

Create(String, PublishLicense, CryptoProvider)

建立及傳回 EncryptedPackageEnvelope,並為其提供指定的檔名。

Create(Stream, PublishLicense, CryptoProvider)

在指定的資料流上建立及傳回 EncryptedPackageEnvelope

public:
 static System::IO::Packaging::EncryptedPackageEnvelope ^ Create(System::IO::Stream ^ envelopeStream, System::Security::RightsManagement::PublishLicense ^ publishLicense, System::Security::RightsManagement::CryptoProvider ^ cryptoProvider);
public static System.IO.Packaging.EncryptedPackageEnvelope Create (System.IO.Stream envelopeStream, System.Security.RightsManagement.PublishLicense publishLicense, System.Security.RightsManagement.CryptoProvider cryptoProvider);
static member Create : System.IO.Stream * System.Security.RightsManagement.PublishLicense * System.Security.RightsManagement.CryptoProvider -> System.IO.Packaging.EncryptedPackageEnvelope
Public Shared Function Create (envelopeStream As Stream, publishLicense As PublishLicense, cryptoProvider As CryptoProvider) As EncryptedPackageEnvelope

參數

envelopeStream
Stream

要建立檔案的資料流。

publishLicense
PublishLicense

嵌入在複合檔案中的發行授權。

cryptoProvider
CryptoProvider

物件,其決定目前使用者可以對加密內容執行的作業。

傳回

新建立的 EncryptedPackageEnvelope

例外狀況

envelopeStreamnull

envelopeStream 未提供讀取/寫入權限。

備註

目前的使用者具有新檔案的讀取/寫入許可權。

另請參閱

適用於

Create(String, PublishLicense, CryptoProvider)

建立及傳回 EncryptedPackageEnvelope,並為其提供指定的檔名。

public:
 static System::IO::Packaging::EncryptedPackageEnvelope ^ Create(System::String ^ envelopeFileName, System::Security::RightsManagement::PublishLicense ^ publishLicense, System::Security::RightsManagement::CryptoProvider ^ cryptoProvider);
public static System.IO.Packaging.EncryptedPackageEnvelope Create (string envelopeFileName, System.Security.RightsManagement.PublishLicense publishLicense, System.Security.RightsManagement.CryptoProvider cryptoProvider);
static member Create : string * System.Security.RightsManagement.PublishLicense * System.Security.RightsManagement.CryptoProvider -> System.IO.Packaging.EncryptedPackageEnvelope
Public Shared Function Create (envelopeFileName As String, publishLicense As PublishLicense, cryptoProvider As CryptoProvider) As EncryptedPackageEnvelope

參數

envelopeFileName
String

OLE 複合檔案的名稱。

publishLicense
PublishLicense

嵌入在複合檔案中的發行授權。

cryptoProvider
CryptoProvider

物件,其決定目前使用者可以對加密內容執行的作業。

傳回

新建立的 EncryptedPackageEnvelope

例外狀況

envelopeFileNamenull

備註

如果已存在具有指定名稱的檔案,則會覆寫該檔案。

目前的使用者具有檔案的讀取/寫入存取權。

另請參閱

適用於