在 2026-10-10 15:02, Pali Rohár 写道:
On Saturday 10 October 2026 10:49:58 LIU Hao wrote:在 2026-10-9 18:16, Pali Rohár 写道:Probably not. But it shows that this inline function IsWindowsVersionOrGreater() cannot be used on older WinNT versions which sounds stupid, something which should return BOOL whether os system version is greater than or not, cause crashing of the whole process. It would not say it changes API, it just allows to execute this function also on older WinNT versions. I think that for such "version check" inline function, this can be a useful change not only for tests.`IsWindowsVersionOrGreater()` is documented to be available since Vista, so if you are targeting pre-Vista you should not call this function. [1] https://learn.microsoft.com/en-us/windows/win32/api/versionhelpers/nf-versionhelpers-iswindowsversionorgreaterThen this function is totally useless as it always returns TRUE.
... ?The testcase calls `IsWindowsVistaOrGreater()` which is an inline wrapper for `IsWindowsVersionOrGreater()`, which is documented as since Vista, but that's completely fake information: It's an inline wrapper since Windows 8.1 SDK for `VerifyVersionInfoW()` which is since Windows 2000. However no inline helpers for Windows 2000 for any service packs exist, neither for 9x.
So even with erroneous documentation in mind, it still requires 2000. The conclusion is the same: If the test has to run on 9x, it must not call `IsWindowsVistaOrGreater()`.
-- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
