Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[The RtlGenRandom function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use the CryptGenRandom function.]
The RtlGenRandom function generates a pseudo-random number.
BOOLEAN RtlGenRandom(
[out] PVOID RandomBuffer,
[in] ULONG RandomBufferLength
);
[out] RandomBuffer
A pointer to a buffer that receives the random number as binary data. The size of this buffer is specified by the RandomBufferLength parameter.
[in] RandomBufferLength
The length, in bytes, of the RandomBuffer buffer.
If the function succeeds, the function returns TRUE.
If the function fails, it returns FALSE.
When you have finished using the random number, free the RandomBuffer buffer by calling the SecureZeroMemory function.
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | ntsecapi.h |
DLL | Advapi32.dll |
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!