On Tuesday 09 November 2004 21:24, Alexandre Julliard wrote:
Michael Jung mjung@iss.tu-darmstadt.de writes:
I agree that if this is done on Windows in advapi32, we have to do it there, too. What I meant to say was the following:
There are basically two possibilities: 1.) It's done in rsaenh. Then we are ok. 2.) It's done in advapi32: Then it doesn't matter if we already have set it in rsaenh, because it will be overwritten.
But if Windows doesn't set it in rsaenh, then we are just hiding a bug. And of course there's always the possibility that native advapi32 somehow depends on rsaenh not doing it; I know it's unlikely, but the point is we can't just do things differently and assume that it will work.
The attached program produces the following output on my WinXP SP2:
Loaded rsaenh.dll successfully! Got CPAcquireContext address! Success! Last error: 00000000
So it seems that rsaenh is setting last error to ERROR_SUCCESS. If you wan't to try the program, make sure that there is a default key container named with your login name on your system. Otherwise CPAcquireContext will fail.
Greetings, Michael