2 ms·
The canonical answer seems to be https://devblogs.microsoft.com/oldnewthing/20090101-00/?p=19643 https://devblogs.microsoft.com/oldnewthing/20090101-00/?p=19...
by pjc50 2y ago
The canonical answer seems to be https://devblogs.microsoft.com/oldnewthing/20090101-00/?p=19643 https://devblogs.microsoft.com/oldnewthing/20090101-00/?p=19... : there's a flag in the PE executable header. But as you say, the same APIs are available to both once you're running. So you can have a console application that decides it's going to open some windows.