Talk:Windows API: Difference between revisions

Content deleted Content added
SineBot (talk | contribs)
Aidtopia (talk | contribs)
Added section disputing the notion of a "Win64" API.
Line 4:
{{afd-merged-from|Windows.pas|Windows.pas|01 December 2013}}
{{todo}}
 
== There is no such thing as Win64 ==
 
There is not a distinct "major version" of the Windows API called Win64. 64-bit editions of Windows implement Win32. It's the same interface. Even the "Getting Ready for 64-bit Windows" article cited to support the notion that there is a Win64 is part of the Win32 documentation set (and it never says "Win64").
 
The reason Win32 is distinct from Win16 is that the API changed in incompatible ways. For starters, Win16 was the API for an OS that used cooperative multitasking, but Win32 used pre-emptive multitasking, so there were swaths of new functionality (e.g., synchronization objects, virtual memory), fundamental changes to the input and event models, reorganization of the fledgling Windows Registry, and the introduction of long file names. These changes had repercussions that required redesign to portions of the API. Some functions (notably many that dealt with window messages) had to be called with different parameters. To ease porting from Win16 to Win32, message-crackers and the Win32s overlay were offered to paper over some of the breaking changes. But most program required some changes to work with the new API.
 
For 64-bit systems, the API did not need to change in incompatible ways. The _ABI_ is different (pointer sizes, calling conventions, etc.). Details of the implementations may be different. But the _API_ is the same. The same functions accept the same parameters and return values have the same meaning.
 
If a Windows program cannot be compiled for both 32- and 64-bit systems, it's due to a non-portable assumption baked into the code about pointer sizes or ranges of representable values—it's not because of an incompatible difference in the Windows API.
[[User:Aidtopia|Aidtopia]] ([[User talk:Aidtopia|talk]]) 14:58, 13 April 2024 (UTC)
 
== API or rather ABI? ==