EncryptionProvider.EndSession(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Ends the current encryption session.
public:
void EndSession(int SessionHandle);
public void EndSession (int SessionHandle);
abstract member EndSession : int -> unit
Public Sub EndSession (SessionHandle As Integer)
Parameters
- SessionHandle
- Int32
The ID of the current session.
Remarks
During a save operation, the CloneSession(Int32) method is called by your COM add-in to create a second, working copy of the EncryptionProvider object’s encryption session for the file that is about to be saved. Next the Save(Int32, Object) method is called to get whatever custom information you would like to persist about your encryption settings. This information is available when this document is reopened later. Then the EncryptStream(Int32, String, Object, Object) method is called which gives the provider the entire contents of the document. And finally, to complete the process, the EndSession(Int32) method for the cloned session handle.