Copyright © 2005-2018 MultiMedia Soft

LoadEncryptedSoundFromMemorySync method

Previous pageReturn to chapter overviewNext page



Loads a song, previously encrypted through the CryptSound™ application, from the given memory buffer through a secondary thread..


Accepted formats for the original (not encrypted) file are the same supported by the LoadSound method.


A successful call to this method invokes the CallbackForPlayersEvents delegate with the nEvent parameter set to EV_SOUND_SYNC_LOADED.


For further details about encrypted songs usage check the How to protect your music through encryption section.





[Visual Basic]

Public Function LoadEncryptedSoundFromMemorySync (

nPlayerIndex as Int16,

pBuffer() as Byte,

nBufferLength as Int32,

strDecriptionKey as String

) as enumErrorCodes



public enumErrorCodes LoadEncryptedSoundFromMemorySync (

Int16 nPlayerIndex,

byte[] pBuffer,

Int32 nBufferLength,

string strDecriptionKey




public: enumErrorCodes LoadEncryptedSoundFromMemorySync (

Int16 nPlayerIndex,

unsigned char __gc[] pBuffer,

Int32 nBufferLength,

string strDecriptionKey










Number representing the zero-based index of the player that will load the sound


Buffer containing encrypted sound data


Length in bytes of the given buffer


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



Return value






enumErrorCodes.NOERROR (0)

The song file has been loaded successfully.

Negative value

An error occurred: see the LastError property for further error details or for a list of the possible error values.