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
CrytGenRandom@XP
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.


