Win32 API in pywin32

Michael Torrie torriem at gmail.com
Sat Aug 13 21:39:22 EDT 2016


On 08/13/2016 06:22 PM, Lawrence D’Oliveiro wrote:
> On Saturday, August 13, 2016 at 10:49:11 PM UTC+12, eryk sun wrote:
>> You can call GetFileSizeEx [1]. Or call GetFileInformationByHandleEx
>> [2] to get the FileStandardInfo. These APIs use the LARGE_INTEGER
>> union type, which has a long long "QuadPart" member.
>> ...
>> FILETIME is a legacy of the Windows API. The kernel and user-mode
>> runtime library (i.e. Rtl* in ntdll) use LARGE_INTEGER. Note that all
>> of the info classes for GetFileInformationByHandleEx also use
>> LARGE_INTEGER because they're basically a thin layer over the NT API.
>> ...
>> [etc etc]
> 
> What an absolute mess, compared to the simplicity of POSIX/Linux <https://www.samba.org/samba/news/articles/low_point/tale_two_stds_os2.html>.

POSIX has its share of cruft and redundant interfaces too, I'm sure.
While some parts of the Linux API are simple, others definitely are not,
and Linux has its share of legacy stuff (can you say X11?). And for
user-space things like sound and graphics, APIs are a real hodge-podge
and jumble on Linux and modern Unix operating systems.

> Is it any wonder that Microsoft is now adding a Linux API layer to Windows?

It's certainly not to someday completely replace the native windows
APIs, I can assure you.




More information about the Python-list mailing list