When using the WINDOWS subsystem, Windows won’t create the console window, because the program creates its own window for user interaction. But if we’re using a GUI program, then we’re using the WINDOWS subsystem and our program should implement the WinMain function. Also, when using a CONSOLE subsystem, Windows will automatically create a console window for the program to use. If we’re using a console application, then we’re using a CONSOLE subsystem and our program should have the main function. Notice that there are multiple subsystems, which are specified below: Let’s take a look at different subsystems in the Visual Studio project’s properties: But how does an operating system know that? To understand that, we have to talk about a subsystem, which is used together with the PE header to load the executable and run it. We know that Windows works with PE executables because it knows how to execute them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |