Copyright © 2006-2019 MultiMedia Soft

EncryptCurrentSession method

Previous pageReturn to chapter overviewNext page

Remarks

 

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.

 

 

Syntax

 

[Visual Basic]

control.EncryptCurrentSession (

strOutputPath as String,

strEncryptionKey as String

bFreeContents as enumBoolean

) as enumErrorCodes


 

[C++]

short control.EncryptCurrentSession (

LPCTSTR strOutputPath,

LPCTSTR strEncryptionKey,

short bFreeContents

);


 

 

Parameter

Description

 

 

strOutputPath

Absolute pathname of the encrypted destination file.

strEncryptionKey

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.

bFreeContents

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

Supported values are the following:

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

Doesn't discard current session.

BOOL_TRUE

1

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

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.