RtlUniform(3w)
NAME
RtlUniform (NTDLL.@)
SYNOPSIS
ULONG RtlUniform
(
PULONG seed
)
DESCRIPTION
Generates an uniform random number.
PARAMS
seed [Out] The seed of the Random function.
RETURNS
It returns a random number uniformly distributed over [0..MAXLONG-1].
NOTES
- Generates an uniform random number using D.H. Lehmer's 1948 algorithm.
In our case the algorithm is:
- result = (*seed * 0x7fffffed + 0x7fffffc3) % MAXLONG;
- *seed = result;.
DIFFERENCES
The native documentation states that the random number is uniformly
distributed over [0..MAXLONG]. In reality the native function and our
function return a random number uniformly distributed over [0..MAXLONG-1].
IMPLEMENTATION
Defined in "winternl.h".
Implemented in "build/buildd-wine-unstable_1.1.32-1+b1-amd64-KnxYu0/wine-unstable-1.1.32/build32/dlls/ntdll/rtl.c".
- Debug channel "ntdll".