Fixes https://bugs.winehq.org/show_bug.cgi?id=55640.
The lightening/darkening values are loosely based on Qt 6's fallback code: https://github.com/qt/qtbase/blob/ba98644180bcaf40341a9005abe93575cf45cc5a/….
The values are not perfect, technically it should use Software\Microsoft\Windows\DWM\AccentColor. But since to my knowledge, wine doesn't use AccentColor in any way, this should do the trick for now. `COLOR_HIGHLIGHT` should be roughly the same color as the accent color in most cases. Qt 6 uses the accent color as its highlight color anyways.
--
v2: dmime: Implement DirectMusicSeqTrack IPersistStream_Load.
dmime: Get rid of the IDirectMusicSeqTrack typedef.
dmband: Rewrite band track IPersistStream_Load.
dmband: Rewrite band track DBMT chunk parsing.
dmband: Rewrite band track lbdl/lbnd lists parsing.
msado15: Recordset::Open - Correctly update count/index values.
winecoreaudio: Stop using the deprecated kAudioObjectPropertyElementMaster constant.
user32/tests: Fix WM_WINDOWPOSCHANGED entries.
uiautomationcore: Handle EVENT_SYSTEM_ALERT in IProxyProviderWinEventHandler::RespondToWinEvent() for MSAA providers.
uiautomationcore: Add stub IProxyProviderWinEventHandler implementation for MSAA providers.
uiautomationcore: Implement IRawElementProviderFragmentRoot::GetFocus for MSAA providers.
uiautomationcore: Pass through failure HRESULTS on MSAA accState based property IDs for MSAA providers.
uiautomationcore/tests: Increase wait timeout for cross-process event with navigation.
dmusic: Keep the original instrument patch in the entry.
dmusic/tests: Fixup chunk alignment in steam_end_chunk.
dmime/tests: Test band track and DMUS_PATCH_PMSG.
dmime/tests: Test sequence track and DMUS_NOTE_PMSG.
dmime/tests: Test wave segments and DMUS_WAVE_PMSG.
dmime/tests: Add some DMUS_NOTIFICATION_PMSG tests.
msvcp90: Silence FIXME in _Locinfo::_Locinfo_ctor and _Locinfo::_Locinfo_Addcats functions.
mshtml: Use the event_target vtbl's handle_event for all nodes.
mshtml: Use the dispex's invoke for all nodes.
mshtml: Use the dispex's get_name for all nodes.
mshtml: Use the dispex's get_dispid for all nodes.
mshtml: Use the dispex's destructor for all nodes.
d3d10core/tests: Test performing a full clear after a draw.
wined3d: Pass a wined3d_stateblock_state to wined3d_device_validate_device().
d3d11/tests: Properly mark the indexed sample position test as succeeding with the Vulkan backend.
wined3d: Don't validate the frontbuffer's DRAWABLE location in wined3d_swapchain_resize_buffers() when NO3D is set.
d3drm: Correctly query for the returned interface.
dsound: Use malloc and free instead of _recalloc.
wineps.drv: Don't crash if specified font is missing required table in T42_download_header.
wineps.drv: Remove unused hmtx_tab field from TYPE42 structure.
kernel32/tests: Update dll characteristics to make the module loadable on ARM64.
kernel32/tests: Unaligned SRW locks crash on ARM platforms.
kernel32/tests: Don't make assumptions about argv[0] of the main process.
kernel32/tests: Comment out one more test that can crash on Windows.
ntdll: Remove unneeded SEH annotations in Unix code.
vcomp: Add SEH annotations to ARM64 assembly code.
rpcrt4: Add SEH annotations to ARM64 assembly code.
oleaut32: Add SEH annotations to ARM64 assembly code.
winmm/tests: Avoid truncating the handle passed to waveInGetDevCapsW().
msi: Use CreateFileW() for handling path from cabinet_open() instead.
wshom: Use the wcsdup function instead of reimplementing it.
shell32: Use the wcsdup function instead of reimplementing it.
ncrypt: Use the wcsdup function instead of reimplementing it.
msvfw32: Use CRT allocation functions.
mciwave: Use CRT allocation functions.
gameux: Use CRT allocation functions.
advpack: Use CRT allocation functions.
oleaut32: Use CRT allocation functions in typelib.c.
oleaut32: Use CRT allocation functions in olepicture.c.
oleaut32: Use CRT allocation functions in hash.c.
oleaut32: Use CRT allocation functions in connpt.c.
ntdll: Allow empty application nodes in actctx.
msvcp140_atomic_wait: Add __std_acquire_shared_mutex_for_instance implementation.
uiautomationcore: Don't return oleacc proxy IAccessibles from GetIAccessible for MSAA providers.
uiautomationcore: Implement IRawElementProviderFragment::get_FragmentRoot for MSAA providers.
uiautomationcore: Add a common helper function for querying IServiceProvider on IAccessible interfaces.
uiautomationcore: Add stub IRawElementProviderFragmentRoot implementation for MSAA providers.
uiautomationcore/tests: Add support for debug printing Provider method calls.
uiautomationcore/tests: Add support for debug printing Accessible method calls.
uiautomationcore/tests: Add method expect definitions for all Accessible test interfaces.
dmime: Use segment_append_track in Clone and parse_track_form.
dmime: Rewrite segment IDirectMusicSegment_RemoveTrack.
dmime: Rewrite segment IDirectMusicSegment_InsertTrack.
dmime: Rewrite segment IDirectMusicSegment_GetTrackGroup.
dmime: Rewrite segment IDirectMusicSegment_GetTrack.
dmime: Avoid leaking tracks in IDirectMusicSegment_Release.
dmime: Get rid of the IDirectMusicSegmentImpl typedef.
dmime: Use one-liners for segment parameter checks.
dmime: Rename IDirectMusicSegment8Impl method prefix to segment.
dmband: Rewrite band IPersistStream_Load.
dmband: Rewrite band dmbd chunk parsing.
dmband: Rewrite band lbil list parsing.
dmband: Rewrite band lbin list parsing.
dmband: Avoid leaking collection on band release.
dmband: Avoid leaking bands on band track Release.
dmband: Get rid of the IDirectMusicBandTrack typedef.
dmband: Get rid of the IDirectMusicBandImpl typedef.
dmband: Rename IDirectMusicBandImpl prefix to band.
mshtml: Use the dispex's query_interface for the remaining nodes.
mshtml: Use the dispex's query_interface for DOMTextNodes.
mshtml: Use the dispex's query_interface for Document nodes and fragments.
mshtml: Use the dispex's query_interface for DocumentType nodes.
mshtml: Use specific dispex for each SVG element.
mshtml: Use specific dispex vtbls for remaining HTML elements.
ntdll/tests: Test both FileLinkInformation and FileLinkInformationEx in test_file_link_information.
include: Add flags to FILE_LINK_INFORMATION used by FileLinkInformationEx.
ntdll/tests: Test both FileRenameInformation and FileRenameInformationEx in test_file_rename_information.
include: Add flags to FILE_RENAME_INFORMATION used by FileRenameInformationEx.
user32: Add hotpatchable wrapper for GetWindowLongA.
user32: Make CallWindowProcA hotpatchable.
gdi32: Make GetStockObject hotpatchable.
include: Update the d3d12 headers from vkd3d.
winebuild: Make the syscall thunks position-independent on ARM64.
winebuild: Add a few more SEH annotations.
winebuild: Remove unnecessary .cfi_startproc/endproc annotations.
winebuild: Add a separate helper for .seh annotations.
include: Move RTL functions that belong in winnt.h from winternl.h to winnt.h.
gdiplus: Fix GdipCreateFont character set initialization.
gdiplus/tests: Test GdipCreateFont character set initialization.
msvcr110: Use Context blocking functions in _StructuredTaskCollection class.
msvcr110: Simplify _StructuredTaskCollection finished task counter updating.
msvcp110: Add _Winerror_map implementation.
mshtml: Get rid of useless element destructors.
mshtml: Move node vtbl destructor methods down.
mshtml: Move node vtbl QI methods around.
mshtml: Move some SelectElement methods up.
mshtml: Move some ObjectElement methods up.
mshtml: Move some IFrame methods down.
mshtml: Move some FrameElement methods down.
mshtml: Move some FormElement methods up.
mshtml: Move some AreaElement methods up.
mshtml: Move some AnchorElement methods up.
mshtml: Move some Element methods around.
dmime: Pass the DMUS_PMSG through the performance graph.
dmime: Rename DMUS_PMSGToItem to message_from_DMUS_PMSG.
dmime: Remove unnecessary struct message members.
dmime: Use a struct list to keep performance messages.
dmime: Get rid of the DMUS_PMSGItem typedef.
dmime: Convert DMUS_PMSG music and reference times in SendPMsg.
dmime/tests: Test that SendPMsg also converts reference time.
dbghelp: Check that dwarf unwinder did actually unwind.
include: Add missing WinEvent definitions.
server: Return WSAEOPNOTSUPP on listen() if the socket's type is SOCK_DGRAM.
user32/tests: Account for some messages from dual-monitor setups.
mfreadwrite/reader: Update to IMFSourceReaderEx.
wbemprox: Fix out-of-bounds access caused by codepoints above U+00FF.
d3d10/effect: Implement 'mov' opcode for expressions.
dmusic: Implement instrument articulation downloads.
dmusic: Parse instrument regions articulation lists.
dmusic: Implement downloading wave to port.
dmusic: Keep an internal ref on the instrument's collection.
dmusic: Parse collection wave lists.
dmusic: Parse collection wave table.
dmusic: Rewrite downloading instrument to port.
dmusic: Avoid swallowing collection Load failures.
gdiplus: Copy the compound array in GdipClonePen().
uiautomationcore: Implement UiaHasServerSideProvider.
uiautomationcore: Add a common helper function for creating HUIANODEs.
uiautomationcore: Add UiaHasServerSideProvider stub.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3931
This comes from behavioral study of Windows, which doesn't seem to check if the
lock is actually exclusively held, and just simply decrement the value stored
in the lock.
This fixes a dead lock which prevents WeCom from starting up.
--
v25: ntdll: wake up SRWLOCK waiters by thread id
ntdll: allow SRWLOCKs to be quickly re-acquired
ntdll: An implementation of SRWLOCK that closer matches Windows'.
include: add atomic read/write of pointers
https://gitlab.winehq.org/wine/wine/-/merge_requests/3504
On Fri Sep 22 16:09:26 2023 +0000, eric pouech wrote:
> it has an exception handler around it, so
> * either the field is not on a readable page and the exception will be
> fired, and you'll get a NULL pointer (SAFE)
> * or the field is on a readable page but with a wrong magic value, and
> you'll get a NULL pointer (SAFE)
> * or the field is on a readable page, with the expected magic value, and
> you'll a non NULL pointer, that you can check if it fits or not in
> mapped view before reading into it (SAFE)
Oh! Okay, I will use `RtlImageNtHeader` and then do the bounds checks afterwards :)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_46369
On Fri Sep 22 15:55:16 2023 +0000, Aidan Khoury wrote:
> You're right, I checked again and this exception is captured and
> gracefully fails with the last error code set to 0xE0000001. So, I will
> remove this and just set the last error 0xE0000001 with a failing return
> value. I'll add some tests for this case.
this can also be done by setting an exception handler inside some functions
(in badly written pseudo code):
```
try {
// do the expected stuff
// setting ret & last error in case of error
} catch (exception e) {
throw exception(0xE0000001);
ret = FALSE;
SetLastError(0xE0000001);
}
return ret;
```
but that doesn't prevent from releasing the resources between the throw and this handler (we're not using RAEII and the current exception handling even for C code requires compiler support that we don't have)
so perhaps the safest solution is to return error codes internally (no exception) and throw the exception on top level functions
that's not nice for sure, but I fear we don't have many other options
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_46367
On Thu Sep 21 22:33:18 2023 +0000, Aidan Khoury wrote:
> This `rebase_image` implementation could still be adapted as an imghelp
> internal function, could it not? Though that would be better to be done
> as a separate MR, I think.
I gave ReBaseImage a quick look at how it behaves in windows and it has some likely unwanted behavior (like hard to really force a new rebase address), so it's fine to leave it aside for now
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_46359
On Fri Sep 22 15:46:59 2023 +0000, Aidan Khoury wrote:
> The native RtlImageHeader does not have boundary checks. I cannot do
> this check on RtlImageHeader's return value safely since that would be
> after RtlImageHeader has already potentially accessed an invalid address.
it has an exception handler around it, so
* either the field is not on a readable page and the exception will be fired, and you'll get a NULL pointer (SAFE)
* or the field is on a readable page but with a wrong magic value, and you'll get a NULL pointer (SAFE)
* or the field is on a readable page, with the expected magic value, and you'll a non NULL pointer, that you can check if it fits or not in mapped view before reading into it (SAFE)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_46358
On Fri Sep 22 06:40:36 2023 +0000, eric pouech wrote:
> (my question was unclear: I meant does native throw this exception?)
> what does native do if the exception is continued? (I doubt this helper
> can be DECLSPEC_NOTRETURN)
You're right, I checked again and this exception is captured and gracefully fails with the last error code set to 0xE0000001. So, I will remove this and just set the last error 0xE0000001 with a failing return value. I'll add some tests for this case.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_46356
On Fri Sep 22 06:50:36 2023 +0000, eric pouech wrote:
> this raises the questions does native ntdll.RtlImageHeader check for
> e_lfanew being within image boundary? if so, it builtin implementation
> has to be fixed (with test case please)
> and if it doesn't you can still add the check on RtlImageHeader's
> returned value
The native RtlImageHeader does not have boundary checks. I cannot do this check on RtlImageHeader's return value safely since that would be after RtlImageHeader has already potentially accessed an invalid address.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_46353
Mostly to avoid polluting other logs and artifacts, and also to avoid
recompiling crosstests over and over.
--
v3: ci: Wrap complex commands in CI scripts.
ci: Build crosstests with -Wno-array-bounds.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/359
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52665
I'm unsure how to add tests for this given it requires an app to be installed via MSIX to get a package ID in Windows otherwise `IPackageStatics::get_Current()` returns `0x80073d54`.
--
v7: windows.applicationmodel: Implement IStorageItem::get_Path().
windows.applicationmodel/tests: Add IStorageItem::get_Path() tests.
windows.applicationmodel: Add IStorageItem stub interface.
windows.applicationmodel: Implement IPackage::get_InstalledLocation().
windows.applicationmodel: Implement IPackageStatics::get_Current().
windows.applicationmodel: Add IPackageStatics stub interface.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3548
Find only supports one Column to filter on.
The parser for this will be the same for both Find/Filter with the only different
is the Filter supports multiple columns.
In trying to keep this patch small, only WSTR/BSTR/Integer have been supported. (The Common cases).
--
v3: msado15: Implement _Recordset Find
https://gitlab.winehq.org/wine/wine/-/merge_requests/2498
On Fri Sep 22 06:50:36 2023 +0000, Aidan Khoury wrote:
> `RtlImageNtHeader` lacks proper image boundary checks for e_lfanew, so
> using it in this case is not safe.
this raises the questions does native ntdll.RtlImageHeader check for e_lfanew being within image boundary? if so, it builtin implementation has to be fixed (with test case please)
and if it doesn't you can still add the check on RtlImageHeader's returned value
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_46285
On Thu Sep 21 20:03:38 2023 +0000, Aidan Khoury wrote:
> No, but if you supply invalidly formed images to the mspatcha.dll APIs
> it will raise an exception with code 0xE0000001. I made this a separate
> function so I could mark it as `DECLSPEC_NORETURN`.
(my question was unclear: I meant does native throw this exception?)
what does native do if the exception is continued? (I doubt this helper can be DECLSPEC_NOTRETURN)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_46284
> What about If I changed the commit message to winmm: MCI_MapMsgAtoW return error code directly instead of a boolean.
That's my point: it doesn't currently return a boolean, it returns a tri-state. One of those values tells the caller to skip calling `MCI_UnmapMsgAtoW()`. Your change gets rid of this.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3854#note_46283