Graham Leggett wrote:
William A. Rowe, Jr. wrote:

Nonsense.  In the MS world, double initialization and thread safety are
entirely mandated by design.

So, if I am reading you correctly, if module A called CryptGetDefaultProvider, then set parameters using CryptSetProvider or CryptSetProvParam, and then module B came along and did the same thing, these two modules would have completely independent handles to crypto that would not clash with each other? The docs I have read so far imply that settings are application wide. Can you confirm?

They are; and shouldn't be used.  pszProvider and dwProvType args of
CryptAcquireContext are the function you were looking for.  This returns
a stateful, freethreaded handle for that module's access.

Just because their remains bogus app-default functions doesn't mean it's
wise to use them.  And this function doesn't seem relevant to the "init"
function you called out in the first place, was it?


Reply via email to