Copyright © 2006-2018 MultiMedia Soft

EncryptCurrentSession method

Previous pageReturn to chapter overviewNext page



Encrypts the latest recording session using the provided key and stores the final result into an output file. The encryption process won't modify contents of the original recording session but will create an encrypted copy of the recording session itself.


Encrypted sound files can be decrypted and loaded at a later time through the StartFromFileEncrypted method.


For security reasons this feature is not included inside the Trial version and is disabled by default inside the Commercial version: if you own the Commercial version and if you wish using encryption features, please, contact us for instructions about enabling this specific feature.


For details about encryption/decryption features see the How to protect your recording sessions through encryption tutorial.





[Visual Basic]

Public Function EncryptCurrentSession (

strOutputPath as String,

strEncryptionKey as String

bFreeContents as Boolean

) as enumErrorCodes



public enumErrorCodes EncryptCurrentSession (

string strOutputPath,

string strEncryptionKey,

bool bFreeContents




public: enumErrorCodes EncryptCurrentSession (

string strOutputPath,

string strEncryptionKey,

bool bFreeContents









Absolute pathname of the encrypted destination file.


String containing the key used to encrypt the song: its length can be from a minimum of 16 characters to a maximum of 32 characters.


Boolean flag that specifies if contents of the current session must be discarded from memory after encryption.

Supported values are the following:

Mnemonic constant



Doesn't discard current session.


Discards current session.

For memory-based recording sessions, this setting is equivalent to calling the RecordedSound.FreeMemory method.

For file-based recording sessions, the original output file won't be deleted but the control will no more consider it as belonging to the latest recording session.




Return value






Negative value

An error occurred. Check the LastError property value in order to see the last error.

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.