How do you disable ASLR on Windows 7 x64 so that my program will always load the shared CRT at the same address?
The Enhanced Mitigation Experience Toolkit (EMET), downloadable from Microsoft, allows to enable/disable ASLR it on a system or process basis.
A registry setting is available to forcibly enable or disable ASLR for all executables and libraries and is found at HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\MoveImages
.
Previously you had to opt in to allowing the linker to use ASLR. Now, you have to opt out:
/DYNAMICBASE[:NO]
(Visual Studio 2012: Configuration Properties -> Linker -> Advanced -> "Randomized Base Address")
You can also do it programmatically.