"Mike Hearn" mh@codeweavers.com wrote:
In some circumstances apps can survive stack corruption caused by incorrect calling conventions. There was a good entry in Raymond Chens blog about this a few months ago, explaining why and how Windows repairs the stack in particular situations.
Filip Navara already pointed out to me privately that since GetConsoleWindow takes no params there should not be any problem with calling conventions used.
Anyway WINAPI is mandatory for GetConsoleWindow in order to at least get correct stdcall decoration in an import library generated under MinGW.