Re: Executable enty points incorrectly documented



Kornél Pál wrote:
The first problem in Windows SDK is that WinMain (http://msdn.microsoft.com/en-us/library/ms633559.aspx) is documented if it were an operating system interface while it is merely a C language construct so it has nothing to do with the operating system.

[snip]

First of all, this is the documentation for the Win32 API, not the OS internals. A conventional Win32 framework supports a WinMain entry point, just as it supports (say) MAKELPARAM, which is nowhere to be found in any Windows OS.

Second, WinMain isn't language-specific -- there are Pascal environments that use it too, for starters. You cannot avoid having to have some C knowledge to read and understand the API documentation, but this in itself does not make the things described "C language constructs". Even so, the Win32 API does describe things that are C specific -- the aforementioned MAKELPARAM won't be present in other languages, at least not in that form. Again, the documentation targets conventional Win32 frameworks.

Lastly, people who are interested in how their Win32 framework interacts with the OS to get things done are free to look into it themselves (or read a book like Windows Internals) but these details are generally not contained in the MSDN unless they're important for common development scenarios (which having your own entry point is not). The WinMain documentation clearly states:

"The name WinMain is used by convention by many programming frameworks. Depending on the programming framework, the call to the WinMain function can be preceded and followed by additional activities specific to that framework."

--
J.
.



Relevant Pages

  • Re: Executable enty points incorrectly documented
    ... suggestions from Kornel to the SDK team for the evaluation. ... API for WinMain or DllEntryPoint." ... Because this is the real entry and because it's possible to use your own ... WinMain should be documented in the C/C++ documentation. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Executable enty points incorrectly documented
    ... I'd like to update you that I have submitted the suggestions from Kornel to the SDK team for the evaluation. ... "The parameters and return value must be defined as documented in the Win32 API for WinMain or DllEntryPoint." ... Because this is the real entry and because it's possible to use your own entry point from C/C++ here should be the signature of the function expected by the /ENTRY argument rather than the signature expected by the CRT entry point wrappers. ... DllEntryPoint on the other hand is incorrect beause it's name is documented and used as DllMain so using DllEntryPoint just confuses the user and makes finding documentation more difficult. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Program Startup State
    ... The WinMain entry in MSDN begins: ... Once you get down under the runtime libraries, documentation ... Gary Chanson (Windows SDK MVP) ...
    (microsoft.public.win32.programmer.kernel)

Loading