Hi, can I ask one qestion? I cannot find answer anywhere... When I write some program using Dev-C++ (or any other high language), when creating new project, I can choose whether its console program or Win 32 API program. So, where is the actual difference? I mean, is there any special code to tell windows: hey, run it in console mode, or its just compiled as Real CPU mode program, so windows can somehow recognise it? If so, how can windows recognise it? And the most important, can I actually write a program which won´t be using neither windows API or console? Like my own graphical interface, or routines to copy files from HDD and so? Thanks.
Program execution
Started by pokevitek, Dec 07 2009 01:05 PM
2 replies to this topic
#1
Posted 07 December 2009 - 01:05 PM
|
|
|
#2
Posted 07 December 2009 - 01:32 PM
A Windows API program is a program that is meant to run as a windowed application. It uses special Windows API calls to draw the window, etc. A console application is designed to work with pure text. There really aren't any other options that I know of.
#3
Posted 07 December 2009 - 03:35 PM
pokevitek said:
So, where is the actual difference? I mean, is there any special code to tell windows: hey, run it in console mode, or its just compiled as Real CPU mode program, so windows can somehow recognise it?
It's in the libraries that the program uses. Windows provides some libraries to use that draw windows and fun stuff like that. There's one set for consoles, another set for the typical GUI program. (I think they're the more or less the same API, just used differently. Don't quote me on that.) You can also have programs with no GUI whatsoever, even no console. Just invisible. These don't load any GUI libraries.
As far as a real mode CPU program...no. Real mode is something else, man. Windows runs in protected mode; getting a real mode program to run in real mode in Windows is downright difficult. In fact, you shouldn't be able to, because otherwise you could completely take out the OS and take over the computer.
Quote
can I actually write a program which won´t be using neither windows API or console? Like my own graphical interface, or routines to copy files from HDD and so? Thanks.
Nnnn...I guess you could use DirectX or some other video mode stuff, draw your own GUI. As far as device manipulation, unfortunately I believe you'd have to write your own kernel-level device driver--and even then you'd have to use kernel API. I don't think Windows allows you to write stuff that runs beneath the kernel to the point where you completely do your own thing and don't use the API at all.
sudo rm -rf /


Sign In
Create Account


Back to top









