🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3190

Re: Are all Windows programs ill-formed?

#3190
From: Claus Faerber
Date: Thu, 01 Feb 1996 18:14
28 lines
2170 bytes
Eugene Radchenko <eugene@qsar.chem.msu.su> wrote about
Are all Windows programs ill-formed?
in article <AE5J83na99@qsar.chem.msu.su> of 29 Jan 96:
> Hi!
> I have just realized that something is grossly overlooked in C++ standard.
> It requires every program to have the main() function (which implementation
> is not allowed to supply) with parameters (void) or (int argc, int*argv[]).
> However, Windows programs have another convention: prrogram must contain
> the function
>   int WinMain(HINSTANCE curInst, HINSTANCE prevInst, LPSTR cmdline, int
> cmdShow) Some of this is of course quirks or even outright ignored in Win32
> (prevInst), but the full non-parsed command line could be useful sometimes,
> and not all implementations provide the function retrieving it. And anyway
> this is definitely not a main() from the specs. Maybe the requirements on
> the main() should be relaxed somehow?

The actual main() procedure is part of the C++ Windows run- 
time library and it's this function which calls Win/LibMain.

Claus

------------------------------------------------------------------------
Claus Andre Faerber - claus@faerber.muc.de - http://www.muc.de/~cfaerber
------------------------------------------------------------------------
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy is
  in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
Technical Details
Message-ID: <61uFCRS3cDB@faerber.muc.de>
Path: arc1-ca.pugleaf.net!fido.asd.sgi.com!austern

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fido.asd.sgi.com!austern
From: claus@faerber.muc.de (Claus Faerber)
Newsgroups: comp.std.c++
Subject: Re: Are all Windows programs ill-formed?
Date: 01 Feb 1996 10:14:40 PST
Organization: -
Approved: austern@isolde.mti.sgi.com
Message-ID: <61uFCRS3cDB@faerber.muc.de>
NNTP-Posting-Host: isolde.mti.sgi.com
X-Original-Date: Wed, 31 Jan 1996 17:12:00 +0100
In-Reply-To: <AE5J83na99@qsar.chem.msu.su>
X-Mailer: CrossPoint v3.1 R/B17071
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBVAwUBMREDLEy4NqrwXLNJAQF6YAH/Qt1M/XHue5gmK0jvapjZP0zVmC2Hx7EI
 9LKLyOT2P1WBWUkyJvl21qI9ct/BVEdrMCSEXmSuGNhc6IICV9LVzg==
 =xWLz
Originator: austern@isolde.mti.sgi.com