This error is caused because an installation of the Office 2007 overwrites two particular files that are used by SSAS 2005:
Unexpected error ocurred: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
So the solution is to copy this two files from:
%programfiles%\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\
%programfiles%\Common Files\System\Ole DB\