This should move all of the remaining interfaces out of basedoc, except for IDispatchEx (and some fields will still remain); those will be for next MR.
Because all of the remaining interfaces are in the `htmldoc.c` file, and they typically tend to just forward to the HTMLDocumentNode, I'm using some macros inspired by the HTMLWINDOW7_ONEVENT_PROPERTY_\* in `htmlwindow.c` to reduce duplication. The ones that are exceptions are implemented normally without macros.
The first commit converts all of the non-IHTMLDocument\* interfaces because most of the methods are FIXMEs/unimplemented, so splitting it up isn't worth it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1125
Based on [a patch](https://www.winehq.org/mailman3/hyperkitty/list/wine-devel@winehq.or… by Jinoh Kang (@iamahuman) from February 2022.
I removed the need for the event object and implemented fast paths for Linux.
On macOS 10.14+ `thread_get_register_pointer_values` is used on every thread of the process.
On Linux 4.14+ `membarrier(MEMBARRIER_CMD_GLOBAL_EXPEDITED, ...)` is used.
On x86 Linux <= 4.13 `madvise(..., MADV_DONTNEED)` is used, which sends IPIs to all cores causing them to do a memory barrier.
On non-x86 Linux <= 4.2 and on other platforms the fallback path using APCs is used.
--
v3: ntdll: Add thread_get_register_pointer_values-based fast path for NtFlushProcessWriteBuffers.
ntdll: Add sys_membarrier-based fast path to NtFlushProcessWriteBuffers.
ntdll: Add MADV_DONTNEED-based fast path for NtFlushProcessWriteBuffers.
ntdll: Make server_select a memory barrier.
ntdll: Implement NtFlushProcessWriteBuffers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/741
Some Windows version expect output to be aligned on 4 bytes.
Notes (from i386 and x86_64 tests):
- MSVC and Mingw/gcc don't layout the two variables (sdki, sdki_ex)
the same way.
- MSVC aligns each variable on 4-byte boundary,
- MingW/GCC stores them in a 8-byte chunk, but starting from the
end of the buffer: hence none of them is on a 4-byte boundary.
So, fixing the alignment of variables is not sufficient to
workaround the compilers' discrepancy on all source code.
I didn't find a generic way to align on 4 bytes structures of size
smaller than 4 bytes (apart from adding the DECLSPEC_ALIGN to
each of the offending structures, likely not that many though).
Ideas welcomed.
Wine-Bugs: https://bugs.winehq.org/show_bug.cgi?id=53684
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1114
Fix a test failure when theming is off. A toolbar without TBSTYLE_FLAT will fill its checked button
background rectangle when theming is inactive, overwriting the checked pattern required for the test.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1112
Method decriptor's strings are internally stored in ANSI, and
potentially converted from Unicode using current code page.
Test was expecting loss in Unicode to ANSI conversion.
Adapt test to also support loss-less conversion (that's the case
when code page is UTF-8).
Wine-Bugs: https://bugs.winehq.org/show_bug.cgi?id=52873
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1124
This seems to be more correct than what we previously had with fewer lines of code, so I like that. I still don't really like the extra flag I had to add for Nt{Create,Open}Key, but I couldn't find a way to make things work without it. I also checked that Windows doesn't use a similar flag (by iterating over all bit masks).
--
v4: wine.inf: Put the Clients key in the right place.
advapi32/tests: Copy Software\Classes tests from ntdll.
ntdll/tests: Refactor the Software\Classes tests.
ntdll/tests: Factor out the NtEnumerateKey() tests.
kernelbase: Remove special Wow64 handling for HKEY_CLASSES_ROOT.
kernelbase: Remove special Wow6432Node handling from RegCreateKeyEx().
kernelbase: Remove special Wow6432Node handling from RegOpenKeyEx().
server: Don't return the actual 32-bit Software\Classes key.
ntdll/tests: Add some some Software\Classes query and enumerate tests.
ntdll/tests: Test that NtCreateKeyEx() also recursively obtains the Wow6432Node parent.
server: Recursively obtain the Wow6432Node parent.
ntdll/tests: Add some Software\Classes subkey tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/966
On Thu Oct 20 13:10:51 2022 +0000, eric pouech wrote:
> Hi Hugh,
> IMO, this could be written without using 'goto'
> for example
> ```
> if (console_ioctl(...) && size >= sizeof(...))
> {
> }
> else size = 0;
> HeapFree(...);
> return size;
> ```
Sure. That’s the merged version, which I think @julliard modified.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1107#note_11523
This change is adding DWARF (CFI) unwind information to the
hand-written assembly of the `__wine_syscall_dispatcher` function.
This enables unwinding through the dispatcher from the Linux stack
into (and through) the Windows stack.
The general idea is that the `syscall_frame` struct contains the
content of the callee-save registers before the function call
(in particular the stack pointer and the return address). At any
point of the execution, we have a pointer into the `syscall_frame`
in $rcx, $rbp or $rsp.
For the CFI codes the general idea is that we are defining the
computations of the callee-save registers based on the
`syscall_frame` using DWARF’s `breg` instruction, rather than
relative to CFA.
This change adds a bunch of convenience macros, to (hopefully)
improve readability of the CFI instructions.
Note: Those change was used with great success for unwinding through
the dispatcher using a modified LLDB shown in the
[“how-wine-works-101”](https://werat.dev/blog/how-wine-works-101/)
blog post as well as for in the [Orbit profiler](https://github.com/google/orbit),
that has mixed-callstack unwinding support.
Test: Inspect callstacks reported by the Orbit profiler while
running some Windows targets using the modified wine, as well as
verify debugging reports correct callstacks when stepping with our
modified LLDB through the dispatcher itself (so that we are able
to unwind through the dispatcher at any instruction).
--
v8: ntdll: Add CFI unwind info to __wine_syscall_dispatcher (x86_64)
https://gitlab.winehq.org/wine/wine/-/merge_requests/1065