I have already commited this today into XSEC C++ lib. :) Keys might become corrupted because someone with admin rights run your app, and after that someone with lesser rights run it again on the same PC (two users). Or something like that.
In the WinCAPICryptoProvider ctor there is another call to CryptAcquireContext(), but before this one, and it works fine. It never reports corrupted keys error. It uses NULL as a second parameter which means it acquires keys for current user, and not s_xsecKeyStoreName value which is the same for all users on that PC. Best regards, Milan