Well I researched it, and it looks like your declarations are correct according to this site: http://forums.asp.net/t/988210.aspx/1

They have a vb6 example using quite a few APIS from the advapi32.dll, including CryptSetKeyParam. So in that site I linked go to the ***The follwing is my VB 6.0 method*** section and hopefully thatll lead you in the right direction on utilizing this API correctly.