I think that the time of day (to a fraction of a second) is still a better randomizer for an end-user event such as generating a password.
In the self-testing function below i total the free bytes available on
(1) My BigBeigeBox drive D:
(2) The system drive on this NetBook
(3) The data partition on this NetBook.
I've seen a reference within the past month of an internet-source that offers a signal from random atmospheric(?)/astronomical(?) sources
Code: Select all
Declare Function GetDiskFreeSpaceEx Lib "kernel32" _
Alias "GetDiskFreeSpaceExA" _
(ByVal lpcurRootPathName As String, _
lpFreeBytesAvailableToCaller As Currency, _
lpTotalNumberOfBytes As Currency, _
lpTotalNumberOfFreeBytes As Currency) As Long
Function lngFreeBytes(NetworkShare As String) As Long
'' Cloned from code at http://www.pcreview.co.uk/forums/network-drive-free-space-t2381085.html
'' Doug Steele, Microsoft Access MVP; http://I.Am/DougSteele; (no e-mails, please!)
Dim curBytesFreeToCaller As Currency
Dim curTotalBytes As Currency
Dim curTotalFreeBytes As Currency
Call GetDiskFreeSpaceEx(NetworkShare, curBytesFreeToCaller, curTotalBytes, curTotalFreeBytes)
lngFreeBytes = curTotalFreeBytes
'Sub TESTFreeBytes()
' Debug.Print lngFreeBytes("\\Bbb\d") + lngFreeBytes("C:") + lngFreeBytes("T:")
'End Sub
End Function