I'm working on an application in which user will enter encryption key via GUI and my app will fetch that encryption key. Now i need to store that received key into Microsoft key container. I got this and this as a starting point and i know that i have to use this only. I am able to create key inside the container but i don't want to use this key. I have to store user entered key inside the container for later use in encryption/decryption process. Help highly appreciated. Thank you.
I think the link you provided above is one off--check here instead, which covers key import (what you need to start with). In short, you'll invoke
BCryptImportKeyPair, depending on if you're dealing with symmetric or asymmetric keys.