Fix invisible disabled menu item text in Subtitle Workshop Classic 6.1.4. The application happens to
use 0xF0F0F0 as the menu background and the inactive caption color to draw disabled menu item text.
In Light theme, the inactive caption color is very close to 0xF0F0F0, thus causing the invisible
text. So use a darker color for inactive captions to avoid this issue. The inactive caption text
color is also adjusted accordingly.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53575
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/925
mrac tries to get function pointers for these functions using MmGetSystemRoutineAddress, I haven't seen them being used by it, but might as well implement it since they are very easy to implement.
--
v4: ntoskrnl.exe: Implement various KeQuery* functions
https://gitlab.winehq.org/wine/wine/-/merge_requests/914
This patch set is based upon [patches from Wine Staging](https://github.com/wine-staging/wine-staging/tree/master/patches/n…, and implements support for the `SYSTEM`, `HIDDEN` and `READONLY` DOS file attributes. These have been implemented in various ways depending upon the capabilities of the operating system and the file system.
# Storage Methods
## FAT MSDOS file attributes
* Linux: [`ioctl_fat(2)`](https://www.man7.org/linux/man-pages/man2/ioctl_fat.2.html)
On Linux, the FAT filesystem implementation allows DOS file attributes to be applied to files and
queried through a family of ioctls. Note that these ioctls are not yet supported by the NTFS or CIFS
drivers.
## Extended File Attributes
* Linux: [`xattr(7)`](https://www.man7.org/linux/man-pages/man7/xattr.7.html)
* MacOS: [`getxattr(2)`](https://www.unix.com/man-page/osx/2/getxattr/), [`setxattr(2)`](https://www.unix.com/man-page/osx/2/setxattr/), [`removexattr(2)`](https://www.unix.com/man-page/osx/2/removexattr/)
* FreeBSD, NetBSD: [`extattr(2)`](https://nixdoc.net/man-pages/FreeBSD/man2/extattr.2.html)
Modern filesystems generally support Extended File Attributes - auxiliary blobs of binary data that can be attached to a file. Samba uses the `user.DOSATTRIB` attribute to store DOS attribute information in the form of a hexadecimal value.
Note that although FreeBSD and NetBSD support the extended attribute system calls, these are not currently implemented in the operating system, or supported in any of their filesystem drivers.
## BSD File Flags
* MacOS: [`fchflags(2)`](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fchflags.2.html)
* FreeBSD, NetBSD: [`fchflags(2)`](https://nixdoc.net/man-pages/FreeBSD/man2/fchflags.2.html)
On some BSD-like operating systems including MacOS, FreeBSD and NetBSD, the `struct stat` structure contains the `st_flags` member can carry flags of which the following can be used to represent DOS attributes:
* `UF_IMMUTABLE` can represent `FILE_ATTRIBUTE_READONLY`
* `UF_HIDDEN` can reprent `FILE_ATTRIBUTE_HIDDEN` (not available on NetBSD)
# Design
The implementation is takes a permissive approach. It will attempt to store flags by any of the above mentioned methods, and will retrieve flags using any available method and will combine flags from multiple sources together.
# See Also
* https://bugs.winehq.org/show_bug.cgi?id=9158
* https://bugs.winehq.org/show_bug.cgi?id=15679
--
v4: ntdll: Added integration with MacOS/BSD st_flags
ntdll: Add integration with Linux FAT file attributes
ntdll: Add support for FreeBSD style extended attributes.
ntdll: Add support for MacOS X style extended attributes.
ntdll: Implement storing DOS attributes in NtCreateFile.
https://gitlab.winehq.org/wine/wine/-/merge_requests/916
Map known HRESULT values into their FACILITY_VBS counterparts
Unless the callee provided its own Description (e.g. via SetErrorInfo)
VBscript maps certain well-known HRESULT values into its own error facility
and messages, changing Err.Number and also setting Err.Source to itself
(unless already provided, in which case it is left alone)
e.g. if the invoked method returns E_NOINTERFACE,
The VBScript Err object should show
Err.Number: 0x1AE
Err.Source: Microsoft VBScript runtime error
Err.Description: Class doesn't support Automation
Rather than the original HRESULT
Err.Number: 0x80004002
--
v3: vbscript: do HRESULT->VBSERROR mapping for the whole EXCEPINFO at once.
vbscript/tests: test throwException with Description but *not* Source.
vbscript: only set EXCEPINFO strings for cases that map_hres translated.
vbscript: Fix handling missing description in EXCEPINFO.
https://gitlab.winehq.org/wine/wine/-/merge_requests/899
Many code sections still use fixed-size arrays on stack - or even worse - `strcat` in combination with strings of unknown length. This MR/PR provides general purpose Wine-internal functions for safer string handling. The functions are currently header-only to not pollute msvcrt exports.
The API was written for an upcoming shell32/shlexec patch (WIP) to properly fix
possible stack corruptions due to out-of-bounds writes for unexpected long paths or URLs.
This is a dynamic container inspired by C++ std::string / std::vector with
wide/narrow conversion and formatted text. Growth factor = 2 for simplicity.
Differences to `STRING`/`UNICODE_STRING` (`RtlCreateUnicodeString` and similar):
* No USHORT length limitation
* Actual dynamic resizable container
* String formatting and conversion support
* Short and consistent API naming
New test added to msvcrt: `winestring`
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/910