Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function fills a buffer with random bytes.

Syntax

BOOL CeGenRandom(
  DWORD 
dwLen, 
  BYTE* 
pbBuffer 
);

Parameters

dwLen

[in] Specifies the number of bytes of random data to be generated.

pbBuffer

[in, out] Pointer to the buffer that receives the random data. The buffer must be at least dwLenbytes in size. Optionally, the application can provide data in the buffer to use as an auxiliary random seed.

Return Value

Nonzero indicates success. Zero indicates failure.

Requirements

Header winbase.h
Library coredll.lib
Windows Embedded CE Windows CE .NET 4.1 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

File I/O Functions

Other Resources

CryptGenRandom