ID: 468
Viewed: 3518
Added: Aug 19, 2002
Version:
Snippet uploaded by: snippet
Written By: Unknown
Demo: Sorry, no demo
Thank you for your vote. Please wait...
It appears you already voted for this snippet
It appears your vote value was empty
Calculate Random DLL Base Address
Highlight all by clicking in box
<!---Declaration--->
none
Highlight All
<!---Code--->
Form Code
'// 65536 * 256
'// DLL Base Addresses must be a multiple of 64K (65536)
'// LowerBound = 16777216 (which is 64K * 256)
'// UpperBound = 2147483648 (which is 64K * 32768)
'// 1) Generate Random Number between 256 and 32768
'// 2) Multiply by 64K
'// 3) Convert generated value to a Long value
'// 4) Convert generated value to Hex
'// 5) Convert generated string to lowercase (so that the letters are lower case)
'// 6) Add &H in front of string
Randomize
Debug.Print = "DLL Base Address: &H" & LCase(Hex(CLng((32768 - 256 + 1) * Rnd + 256) * 65536))
;
No Comments to show
Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.
Adding your comment. Please wait...
Thanks for adding your comment!. After further review it will be added.
There was a problem adding your comment. Please try again.
Please complete all the fields in the form before sending.