Prepare for CLSID_QueryAssociations.
JIRA issue: CORE-20467
- Add dll/win32/shell32/evalcmd/
elements.cpp.
- Implement AssocCreateElement
function in elements.cpp.
- Modify shell32.spec.
- Fix shlwapi!AssocCreate by using
AssocCreateElement.
- Add SKGetValueW and
SKSetValueW prototypes into
<shlwapi_undoc.h>.
- Add AssocCreateElement
prototype into <shlwapi_undoc.h>.
- Add some CLSIDs into
<shlguid_undoc.h>.
- Add some resource strings into
shlwapi.
- Add AssocGetPerceivedType
prototype into <shlwapi.h>.
- Add AssocCreateElement
testcase into shell32_apitest.
CORE-20231
Tests show this is allowed on Windows and even Wine. Also, official MS
Windows SDK headers indicate that the `CreateHalftonePalette()` `hDC`
parameter is optional, and so can be NULL.
Not allowing a NULL `hDC` caused compatibility issues, breaking applications
like Internet Explorer 8.0 and Microsoft Encarta.
Make `NtGdiCreateHalftonePalette()` accept a NULL `hDC`, fixing its crash
in this case, and only locking it when it's not NULL. Simplify also the
function execution path.
Co-authored-by: Simone Mario Lombardo <[email protected]>
Dragging the first-boot install/status window could make setup stall,
and the shell never started after that.
The problem is that the move/size modal loop can remove a posted `WM_QUIT`
while setup is tearing the thread down. That quit message then does not
reach the outer `GetMessage()` loop, so the setup thread keeps waiting
instead of exiting.
This fix keeps the `WM_QUIT` message alive by re-posting it and leaving
the move/size loop.
See also: https://devblogs.microsoft.com/oldnewthing/20050222-00/?p=36393
## How to test
Boot to first-boot setup, drag the install/status window while it is finishing,
and check that setup continues and Explorer starts instead of hanging.
`co_IntGetScrollBarInfo()` computed the `rgstate` bits into the output buffer
and then immediately overwrote them with the cached copy, so callers always
got stale state.
Fix this by copying the cached info before computing `rgstate`.
This also exposed an inverted `WS_DISABLED` test (per wine, disabled `SB_CTL`
should report `UNAVAILABLE`, not enabled ones), which is now fixed as well.
JIRA issue: CORE-20617
@learn-more found #9157 breaks the build as follows:
> error C2220: the following warning is treated as an error
> warning C4163: 'strncmp': not available as an intrinsic function
> warning C4163: 'strncpy': not available as an intrinsic function
_MSC_VER=1932 was not the version that the intrinsic functions
(strncmp, strncpy, wcsncmp, wcsncpy) added.
Using Compiler Explorer could detect the correct version:
_MSC_VER=1950.
Remove the excessive repainting of the non-client window area (title caption/buttons and borders) whenever other windows are being dragged over.
CORE-5877, CORE-16672
Keep the configured event log `MaxSize` as a capacity limit and track the
physical file size separately.
New logs now start at the Windows 64 KiB file-size granularity, instead of
growing immediately to the full configured maximum. They are then grown in
64 KiB chunks as records are written, while preserving the logical used area
in the header offsets and EOF record.
AddControllers already disconnects the controller interrupt on its error paths but left InterruptObject pointing at the freed object.
Now that DriverEntry runs Cleanup on failure (and Unload() routes through it too), that stale pointer is handed to IoDisconnectInterrupt a second time, bugchecking with BAD_POOL_HEADER.
Clear InterruptObject right after disconnecting so Cleanup() skips it.
CORE-20669
The mask bounds check in `DIB_XXBPP_StretchBlt` allowed `sx == cx` (and similar for `sy`),
reading one pixel past the end of the mask bitmap.
On the contrary, the source-surface check a few lines below already does it right.
- Use shared locks for the display device and PDEV lookup paths.
These functions only walk existing lists and take references, while list updates
and mode-switch paths still use exclusive locking.
This avoids serializing read-only display queries unnecessarily.
- Use shared locks for other read-only NtUser calls.
Some win32k syscalls were still taking the exclusive user lock even though they only read existing state.
This switches a few simple query paths to the shared user lock instead: foreground window lookup, IME hotkey/context queries, layered window attributes, and title bar info.
The goal is to avoid taking the writer lock for read-only work while keeping the same behavior.
This is needed for ISO filesystem driver to work correctly,
as it assumes 2048 bytes per sector for CD-ROM media.
Happens on 86Box with board `[i430FX] ASUS P/I-P55TP4XE`,
Bochs emulator with `01/17/97-i440FX-2A69HV3CC-00` BIOS,
and some other real machines.
CORE-20640
Fix the bug, where `NtUserMenuItemFromPoint()` returned `cItems` instead of `NO_SELECTED_ITEM`
when no item is under the point (`mi` is never NULL on a miss), so `MenuItemFromPoint()` callers
could have indexed one past the menu array.
To be used by NT6 apis in kernel32
This is not great. It works, but it puts stuff into the lib that shouldn't be in there. We need it, because the includes need the generated files.
Maybe a dependency could solve that.
This function has an important role
for new ShellExecute implementation.
JIRA issue: CORE-19278
- Add evalcmd static library into
dll/win32/shell32/evalcmd.
- Implement
SHEvaluateSystemCommandTemplate
in evalcmd.
- Link evalcmd to shell32 and shlwapi.
- Modify shell32.spec and shlwapi.spec.
- Add prototype to <shellapi.h>.
- Add
SHEvaluateSystemCommandTemplate
testcase.
- Define PathIsAbsolute inline
function in <shlwapi_undoc.h>
and use it.