mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
1697231916
- Retrieve version information of `kernel32.dll` without providing a fixed path to the Windows directory, to handle the case that Windows is not installed in the default location `C:\Windows`. This works because `GetFileVersionInfoSizeW` and `GetFileVersionInfoW` use the search sequence defined by `LoadLibrary`, so they will find the DLL without the path explicitly being specified. The version is retrieved from `kernel32.dll` instead of `user32.dll`, as the former is more commonly used for this purpose. - Use the unicode (wide character) functions consistently instead of the ANSI functions. - Use the correct format specifier `%hu` for `unsigned short` (i.e. `WORD` in the Windows API). References: - https://learn.microsoft.com/en-us/windows/win32/api/winver/nf-winver-getfileversioninfosizew - https://learn.microsoft.com/en-us/windows/win32/api/winver/nf-winver-getfileversioninfow - https://stackoverflow.com/a/44672263/1708371 |
||
---|---|---|
.. | ||
tl | ||
unicode | ||
bezier.cpp | ||
bezier.h | ||
color.h | ||
detect.h | ||
dynamic.h | ||
hash.cpp | ||
hash.h | ||
hash_bundled.cpp | ||
hash_ctxt.h | ||
hash_libtomcrypt.cpp | ||
hash_openssl.cpp | ||
lock_scope.h | ||
log.cpp | ||
log.h | ||
logger.h | ||
math.h | ||
system.cpp | ||
system.h | ||
types.h | ||
vmath.h |