@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The CryptGenRandom function fills a buffer with cryptographically random bytes. !!!!C# Signature: [DllImport("advapi32.dll", SetLastError=true)] static extern bool CryptGenRandom(IntPtr hProv, uint dwLen, byte[] pbBuffer); !!!!VB Signature: Declare Function CryptGenRandom Lib "advapi32.dll" (ByVal hProv As IntPtr, ByVal dwLen As Integer, ByVal pbBuffer As Byte()) As Boolean !!!!User-Defined Types: None. !!!!Alternative Managed API: The RNGCryptoServiceProvider@msdn class !!!!Notes: None. !!!!Tips & Tricks: Please add some! !!!!Sample Code: byte[] newRandom = new byte[10]; if (!CryptGenRandom(hProv, (uint)(newRandom.Length), newRandom)) { throw new Win32Exception(Marshal.GetLastWin32Error()); } Documentation: CryptGenRandom@msdn on MSDN
Edit advapi32.CryptGen...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.