I am trying to write an ActiveX DLL that makes a call to the CryptAcquireContext API. Everything works perfectly when I cut and paste the code directly into an executable and run it on the same machine.
The ActiveX DLL is being called from an asp script on a web server and it is failing with code 87
The API call is:
lRet = CryptAcquireContext(hCtx, "", "", 1, 0)
PS: Please don't anybody give me a link to a class or dll that does encryption for me. I specifically want to hash a string from within this DLL and not using massive code overhead that I don't need. I'm only interested in why this isn't working and how to get around it (or in an easy to implement hash algorithm if anyone has one)