IOCTL_HAL_GET_RANDOM_SEED

This IOCTL returns random bytes from a hardware source.

Parameters

  • dwIoControlCode
    [in] Set to IOCTL_HAL_GET_RANDOM_SEED.
  • lpInBuf
    [in] Set to NULL.
  • nInBufSize
    [in] Set to zero.
  • lpOutBuf
    [in] Set to the address of an allocated output buffer for storing the random bytes.
  • nOutBufSize
    [in] Set to the size of the output buffer.
  • lpBytesReturned
    [in] DWORD pointer to receive the size of data returned in lpOutBuf.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

This request is used by the random number generator to query the platform hardware for additional sources of random data, such as a high-frequency counter. If the system has provided support for IOCTL_HAL_GET_RANDOM_SEED, TRUE is returned for a successful operation. The number of bytes of random data returned may be less than nOutBufSize. If no suitable random source is present on the platform or the request fails, FALSE is returned. If FALSE is returned, call GetLastError for information.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Pkfuncs.h.

See Also

Security IOCTLs

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.