CrytGenRandom@XP

CrytGenRandom@XP

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

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

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.

Jennifer

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya