Επεξεργασία

Κοινή χρήση μέσω


SystemPrng function

[SystemPrng is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use BCryptGenRandom.]

The SystemPrng function retrieves a specified number of random bytes from the system random number generator.

Note

This function has no associated header file or import library. To call this function, you must create a user-defined header file.

Syntax

BOOL SystemPrng(
  _Out_ PBYTE  pbRandomData,
        SIZE_T cbRandomData
);

Parameters

pbRandomData [out]

A pointer to a buffer that receives the retrieved bytes.

cbRandomData [in]

The number of bytes to retrieve.

Return value

Always returns TRUE.

Requirements

Requirement Value
Minimum supported client
Windows Vista with SP1 [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
DLL
Ksecdd.sys on Windows Server 2008 and Windows Vista with SP1;
Cng.sys on Windows 7 and Windows Server 2008 R2