http://msdn.microsoft.com/en-us/library/windows/desktop/ms681952(v=vs.85).aspx
-and according to
+ (which now redirects to a docs.microsoft.com page that is
+ devoid of comments, and which is not available on the
+ Wayback Machine)
+
+ and according to
http://connect.microsoft.com/VisualStudio/feedback/details/689696/installing-security-update-kb2507938-prevents-console-allocation
-and
+ (which has disappeared, and isn't available on the Wayback
+ Machine)
+
+ and
-http://answers.microsoft.com/en-us/windows/forum/windows_xp-windows_update/kb2567680-andor-kb2507938-breaks-attachconsole-api/e8191280-2d49-4be4-9918-18486fba0afa
+https://answers.microsoft.com/en-us/windows/forum/windows_xp-windows_update/kb2567680-andor-kb2507938-breaks-attachconsole-api/e8191280-2d49-4be4-9918-18486fba0afa
-(none of which are available any more, either at any obvious Microsoft site or
-on the Wayback Machine), even a failed attempt to attach to another process's
-console will cause subsequent AllocConsole() calls to fail, possibly due
+even a failed attempt to attach to another process's console
+will cause subsequent AllocConsole() calls to fail, possibly due
to bugs introduced by a security patch. To work around this, we
do a FreeConsole() first. */
FreeConsole();