I am an engineer and just began to learn MFC using Visual C++ ver6. Now I try to obtain random numbers from CryptoAPI to use scientific calculations (Monte Carlo).
I got some instructions from Intel HP, including icsp4ms.h
files and tried to install the software.

Although I used the code written in the document files as:

// Get 4-bytes random number
if (CryptGenRandom(hProv, randomLength, (BYTE*)&randomNumber) != TRUE)

I could not obtain random numbers (The flag is FALSE).
I am using Windows XP in Dell precision 530. I am worried that the Intel instructions do not show the case of XP.

Could anyone tell me the method to get random number in the case of Windows XP or correct HP site to treat this
matter? I

2 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

File "icsp4ms.h" is not from Intel C++ compiler. We don't have the API CryptGenRandom() also. You need to contact the originator of the product for more information.

One tip for you, some times it's the parameters you passed that aren't right. Make sure the passing by value or name parameters contain the correct value for the API.


Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui