Fills a buffer with pseudo-random numbers.
| 3194 | |
| 3195 | // Fills a buffer with pseudo-random numbers. |
| 3196 | BOOLEAN __stdcall GenRandom(PVOID RandomBuffer, ULONG RandomBufferLength) |
| 3197 | // Don't change the function signature without also changing the type-cast below. |
| 3198 | { |
| 3199 | static auto *RtlGenRandom = (decltype(&GenRandom)) GetProcAddress(GetModuleHandle(_T("Advapi32")), "SystemFunction036"); |
| 3200 | return RtlGenRandom && RtlGenRandom(RandomBuffer, RandomBufferLength); |
| 3201 | } |
| 3202 | |
| 3203 | |
| 3204 |