Did you know...
Have you ever seen the following window before? It was once very popular in the good old days, but has been abandoned in recent years (another good example being the pixel fonts). People just keep getting busier in the blooming new era.
Windows 7
- Shift + Right Click on a file icon would give you additional context menu entries such as "Copy as path".
- Shift + Right Click on a folder icon would give you "Open command window here".
Visual Studio 2010 (C++ mode)
- Use the Ctrl + R, Ctrl + W keyboard shortcut to toggle the spaces and tab marks.
- You can use $CMDLINE and $ENV pseudovariables in the Watch Window while debugging, and if you modified the value, take a look at the Output Window to see what happened.
- You can use $ERR,hr in the Watch Window to view the last error, the format specifier will translate the error code into text message.
- You can create a new toolchain by creating a new PlatformToolset, the default installation path is C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets.
Hyper-V
- To tell if a machine is physical or virtual, the most reliable way I can think is to measure the system timing (e.g. DPC latency).
- You can determine if a machine is physical or virtual from the hardware info, HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS.
- You can get the host machine for a VM by taking look at the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters.
A few things which are difficult than they look
- Parse command line.
- Manipulate file path and name.
- Mimic the behavior of NT loader.