CSP is the only out-of-the-box solution for RSA on Windows. I've searched and seen a lot of threads on CSP here but the few using RSA were basically quick demos of encrypting and decryption using CSP storage and little configuration and none of them actually exported keys.

From what I've read on MSDN my code actually generates the key pairs and exports them, but I've yet to get the encryption to use these external keys. Has anyone had any luck saving keys outside of the CSP container and using them later?

I wrote this in a couple days worth of spare time using MSDN. It should be working I just haven't seen any CSP based demos of exporting keys. According to MSDN this should be working. You should be able to Base64 rsa\pub and share it and decrypt with rsa\priv.

The functions are all unicode safe without a unicode variant. No flag on PeekS works. I'm guessing it's a parameter to one of the CSP functions or the "blob" format..

I haven't had a chance to look at the blob structure in a run-time debugger yet. MSDN seems to completely lack documentation of some aspects of CSP and you have to reverse engineer some of these out-buffers. All the code on these forums either generated keys wrong or kept them in the container between encryption and decryption..