Program entry point question

N

Nick Keighley

Angus a écrit :




You can use main() for GUI programs, and Microsoft has explicitely mentioned this fact since at
least windows 95, when win32 appeared. The only difference in a GUI program and a console program is
a bit set or unset in the executable that tells the program loader to open a console for it or not.

All the answers you got in this goup are wrong, and do not consider this fact either because the
people answering here are ignorants of Microsoft windows conventions, or because they do not like
Microsoft, that they consider the evil empire.

so you're saying don't ask for Windows info in clc?
 
R

Richard Bos

I am sure this will NOT work - definitely not on some older versions of
Windows, I don't know about Vista etc.

It will probably not work on some _very_ old Windows versions, but it'll
work on most. I may know someone who still runs some shop software on
NT4, where I suspect it won't work, but I don't think I know someone who
still runs 3.11. '98 is surprisingly common outside the home and the
desktop office, but it will run such code.

However, that does not mean that it's a good idea. In essence you're
calling a function intended for a freestanding implementation, from a
program startup function intended for a hosted one. This is _allowed_ -
almost anything is allowed, with enough diagnostics - but that doesn't
mean it's wise.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top