This does nothing on Win10 home 64bit. hProv is always zero.
If I add the following constants and change the 1,0 in the call then it works. But I find it uncontrollable as a random number generator. Also if you reduce the dwLen parameter from 4 down to 1, it readily produces duplicates.
Code:Private Const PROV_RSA_FULL As Long = 1 Private Const CRYPT_VERIFYCONTEXT As Long = &HF0000000




Reply With Quote