Commit graph

85302 commits

Author SHA1 Message Date
Doug Lyons afd39cbc06
[USER32] Show Debug Log Message when unhandled PNG found in ICO file. (#5566)
Detect the PNG data in ICO files and print an appropriate message to the debug log.
JIRA issue: CORE-19107
2024-03-12 16:45:22 +09:00
Katayama Hirofumi MZ 88e1675ace
[SHELL32] CGuidItemContextMenu: Fix pwszCLSID leak (#6607)
Fix memory leak.
JIRA issue: CORE-19478
- Use CoTaskMemFree for pwszCLSID to avoid memory leak
  in CGuidItemContextMenu_CreateInstance function.
2024-03-12 16:10:59 +09:00
Katayama Hirofumi MZ 5aaead3fdb
[SHELL32] Start Menu: Enhance context menu (#6606)
Improve Start Menu usability.
JIRA issue: CORE-19477
- Add CSIDLFromID helper function.
- Return a context menu interface at CShellMenuCallback::OnGetContextMenu.
FIXME: CSIDL_CONTROLS, CSIDL_NETWORK, and CSIDL_PRINTERS context menu
wrongly open My Computer.
2024-03-12 15:58:22 +09:00
Katayama Hirofumi MZ 7b304b5b86
[MSUTB] Implement CLangBarItemList (#6605)
Supporting the Language bar...
JIRA issue: CORE-19363
- Define LANGBARITEMSTATE structure.
- Implement CLangBarItemList class.
2024-03-12 11:40:02 +09:00
Katayama Hirofumi MZ 57592b7e22
[SHELL32] Start Menu Customize: Fix bMustHideAdminTools (#6604)
Follow-up to #6603. Fix a bug in Admin Tools display.
JIRA issue: CORE-16956
Fix the value of bMustHideAdminTools in CMenuSFToolbar::FillToolbar.
2024-03-12 08:26:07 +09:00
Katayama Hirofumi MZ 7f8c502901
[EXPLORER] Start Menu Customize: Use TreeView_GetRoot (#6603)
Follow-up to #6596. Enable the Favorite menu setting.
JIRA issue: CORE-16956
- Use TreeView_GetRoot instead of TreeView_GetFirstVisible in
  CustomizeClassic_OnOK function.
2024-03-12 08:17:05 +09:00
Hermès Bélusca-Maïto bbce6c3fdf
[FREELDR] Deduplicate common message-box creation code.
Also, make the (T)uiSave/RestoreScreen() helpers manage themselves the
temporary memory buffer used to store the temporary screen snapshot.
2024-03-11 22:37:39 +01:00
Hermès Bélusca-Maïto 64155019df
[FREELDR] Minor formatting for MsgBox functions + add SAL annotations 2024-03-11 22:37:38 +01:00
Hermès Bélusca-Maïto dad056e06a
[FREELDR] Move the arch-specific intrin_i.h inclusions to where they are actually needed (NTLDR) 2024-03-11 22:37:37 +01:00
Hermès Bélusca-Maïto 50e5f76212
[FREELDR] FrLdrHeapCreate: Show the memory type in the ERR(). 2024-03-11 22:37:36 +01:00
Hermès Bélusca-Maïto 9a707af2e3
[FREELDR] Initialize CandidatePageCount to zero, needed if the while-loop is not run.
Granted, if the while-loop is not run, this means there is no memory
available at all on the computer where FreeLdr is running, which is
quite unexpected. But do the initialization anyways, in order to avoid
more obscure bugs down the line.

On the other hand, PageLookupTableMemAddress doesn't need to be
pre-initialized, since it gets initialized unconditionally afterwards.
2024-03-11 22:37:35 +01:00
Hermès Bélusca-Maïto 61c4b5f615
[FREELDR] pcat.cmake: minor cleanup 2024-03-11 22:37:34 +01:00
Hermès Bélusca-Maïto b790cfcef1
[FREELDR] Pre-initialize the INI section list, improve loops over sections and items.
Avoids dereferencing list entries to sections/items when these lists are empty.

IniParseFile(): Emit an error to the debug log when a candidate setting
is outside a section and skip it, instead of popping up an error on the UI.
2024-03-11 22:37:33 +01:00
Hermès Bélusca-Maïto c8c32db8c5
[FREELDR] ueficon.c: Add missing support for HOME and END keys.
And reserve INSERT, PAGE_UP and PAGE_DOWN for future handling.
2024-03-11 22:37:33 +01:00
Hermès Bélusca-Maïto f4ff0aba2f
[FREELDR] Minor code cleanup in arch/uefi files 2024-03-11 22:37:32 +01:00
Hermès Bélusca-Maïto 1e409e6902
[FREELDR] i386/hwdisk.c: Use FIRST_BIOS_DISK and FIRST_PARTITION macros like what's done in UEFI code. 2024-03-11 22:37:30 +01:00
Serge Gautherie 6185c66c61
[DESK] SetScreenSaver(): Remove remnant 'DeleteMode' variable (#6593)
Addendum to commit d21e3a1d2 (r58360).
2024-03-11 15:35:34 +01:00
Doug Lyons c17a6542ac
[NTUSER] Fix PeekMessageA for MsgFilterLow/High mouse clicks (#6427)
Fix MSO and Word Viewer not closing when "X" on title bar is clicked.
This is another @I_Kill_Bugs patch.

CORE-14436 , CORE-16985
2024-03-11 14:34:34 +01:00
Katayama Hirofumi MZ acb01cf568
[EXPLORER][SHELL32] Show/hide 'Admin tools' menu (#6598)
Improve Start Menu customization.
JIRA issue: CORE-16956
- Add IsPidlPrograms helper function.
- Specify a PIDL for Programs menu.
- Check the "StartMenuAdminTools" registry value.
- Don't add "Admin Tools" menu item into
  CMenuSFToolbar::FillToolbar if necessary.
2024-03-11 21:58:30 +09:00
Katayama Hirofumi MZ 8bd071a51e
[EXPLORER][SHELL32] Fix and improve Start Menu customization (#6596)
Correct the details of Start Menu customization.
JIRA issue: CORE-16956
- Hide the setting item if the item is restricted.
- Don't change restriction in Explorer.
- Fix Start Menu settings for restriction and registry.
- Fix and simplify code.
2024-03-11 20:18:07 +09:00
Katayama Hirofumi MZ 0241b5c4e9
[EXPLORER][SHELL32] Expand/unexpand Control Panel menu (#6595)
Follow-up to #6594. Improve Start Menu customization.
JIRA issue: CORE-16956
- Add IDS_ADVANCED_EXPAND_CONTROL_PANEL, IDS_ADVANCED_EXPAND_PRINTERS,
  and IDS_ADVANCED_EXPAND_NET_CONNECTIONS resource strings.
- Check the "CascadeControlPanel", "CascadeNetworkConnections", and "CascadePrinters"
  registry values.
- Modify Start Menu by using AddOrSetMenuItem and AddStartMenuItems helper
  functions in CShellMenuCallback::OnGetSubMenu.
2024-03-11 16:19:46 +09:00
Katayama Hirofumi MZ 71285dff48
[EXPLORER][SHELL32] Expand/unexpand My Documents menu (#6594)
Follow-up to #6592. Improve Start Menu
customization.
JIRA issue: CORE-16956
- Add IDS_ADVANCED_EXPAND_MY_DOCUMENTS
  and IDS_ADVANCED_EXPAND_MY_PICTURES
  resource strings.
- Check L"CascadeMyDocuments" and
  L"CascadeMyPictures" registry values.
- Add GetAdvancedValue helper function.
- Implement CreateRecentMenu function.
2024-03-11 13:18:58 +09:00
Katayama Hirofumi MZ 4e10ebed40
[BOOT] Don't create CSIDL_ADMINTOOLS folder in initial (#6551)
We shouldn't create an empty CSIDL_ADMINTOOLS folder at initial status.
JIRA issue: CORE-12328
- Modify boot/boot_images.cmake.
2024-03-11 11:24:26 +09:00
Katayama Hirofumi MZ 5daab33c59
[EXPLORER][SHELL32][SDK] Show/hide 'Run' menu item (#6592)
Improve Start Menu customization.
JIRA issue: CORE-16956
- Add SHSettingsChanged prototype to
  <undocshell.h>.
- Add SetRestriction helper function.
- Implement showing/hiding Run menu
  item of Start Menu.
2024-03-11 10:54:12 +09:00
Katayama Hirofumi MZ ede65b88bc
[SHELL32][SHLWAPI][SDK] Implement SHRestricted etc. (#6560)
shell32!SHRestricted is necessary to make shell working well.
JIRA issue: CORE-11515
- Add dll/win32/shell32/wine/PolicyData.h to define the shell policy data.
- Define POLICYDATA structure and SHELL_NO_POLICY constant
  in <shlwapi_undoc.h>.
- Fix shell32!SHRestricted, shell32!SHSettingsChanged,
  shlwapi!SHGetRestriction, and shlwapi!SHRestrictionLookup functions.
2024-03-11 08:29:04 +09:00
Serge Gautherie 3e3594e3aa [KILL] ExecuteKill(): Return '1' on failures
and add a related 'CloseHandle()' call.

Also, enforce PID 'unsigned' type.
2024-03-10 17:16:56 +01:00
Serge Gautherie 5a30c71e70 [KILL] main(): Return actual return value
and get rid of 'tail' variable, which had wrong type anyway.

Also, be strict about parameter number: only 1 PID is supported.
2024-03-10 17:16:56 +01:00
Serge Gautherie 56baf8e2e8 [FORMATTING][KILL] kill.c: reformat it 2024-03-10 17:16:56 +01:00
Hermès Bélusca-Maïto 352b7f6785
[SDK:NDK/XDK] Sync NtCurrentTeb() definitions between NDK and PSDK winnt.h (#6542)
The definitions in the NDK inline_ntcurrentteb.h and psfuncs.h files are
synced togther with those of winnt.h (in the winnt_old.h generator file).

See commits c1929445d (r49627) and 925c587c8 (r56318).

IMPORTANT NOTE: The ARM64 definition does not exist yet in our headers!
2024-03-10 17:10:50 +01:00
Hermès Bélusca-Maïto cec7adb97f
[SDK:NDK/XDK] Adjust the KeGetPcr() ARM definition (#6542)
Re-enable the KIPCR() macro and use it for KeGetPcr()
and KeGetCurrentProcessorNumber() definitions.
2024-03-10 17:09:36 +01:00
Hermès Bélusca-Maïto bf9cac8a67
[SDK:NDK/XDK] Remove x86 KeGetPcr() definition from the DDK (#6526)
The official MS DDK/WDK does not expose KeGetPcr() for x86, so do
not expose it there as well. Use instead the private NDK definition.

If it were exposed in the DDK/WDK, it would have to be a
multiprocessor-compatible definition.

Note that the broken definition was working only in single-processor
mode, using the PCR static memory pointer value.
The official MS DDK/WDK exposes KeGetPcr() as an alias to such a
PCR value only for IA64, MIPS and PPC, which is of course not great.
2024-03-10 16:55:44 +01:00
Katayama Hirofumi MZ e6c0081c28
[IMM32_APITEST] Add KLID testcase (#6590)
Confirming keyboard layout
implementation by checking
HKL, KLID, and registry.
JIRA issue: CORE-19268
- Add KLID testcase.
- Check HKLs, KLIDs (Keyboard
  Layout IDs), and related
 registry, with using
  user32!GetKeyboardLayoutList
  function.
2024-03-10 22:36:40 +09:00
Katayama Hirofumi MZ 0c65ceca3c
[MSCTF] Implement GetHKLSubstitute (#6589)
Implementing the back-end of
the Language bar...
JIRA issue: CORE-19361
- Rename GetLocaleInfoString
  as GetHKLName.
- Implement GetHKLSubstitute
  helper function.
- Fix GetHKLDesctription function.
2024-03-10 15:37:42 +09:00
Katayama Hirofumi MZ fcbcc5b30c
[KBSWITCH][INPUT][SDK] Use <imm32_undoc.h>'s IS_IME_HKL (#6588)
Unify the private IMM32 macro
definitions. Refactoring...
JIRA issue: CORE-19361
- Define IS_SPECIAL_HKL macro
  in <imm32_undoc.h>.
- Use IS_IME_HKL and
  IS_SPECIAL_HKL macros of
  <imm32_undoc.h>,
  in kbswitch and input modules.
2024-03-10 12:15:56 +09:00
Katayama Hirofumi MZ e25d7d724d
[MSCTF][SDK] Implement multi-language handling (#6587)
Implementing the back-end of
the Language bar...
JIRA issue: CORE-19361
- Add mlng.cpp and mlng.h.
- Modify msctf.spec.
- Implement MLNGINFO
  structure and CStaticIconList
  class.
- Implement TF_InitMlngInfo,
  TF_MlngInfoCount,
  TF_InatExtractIcon,
  TF_GetMlngIconIndex, and
  TF_GetMlngHKL functions.
2024-03-10 11:35:05 +09:00
Katayama Hirofumi MZ efa86fff9f
[MSCTFIME] Implement CicBridge::Notify (#6586)
Supporting TIPs...
JIRA issue: CORE-19360
- Implement CicBridge::Notify
  method.
- Implement CicBridge::
  SetCompositionString method.
- Add some CicInputContext
  methods (stub).
2024-03-09 12:57:50 +09:00
Katayama Hirofumi MZ 1ee014525c
[MSCTFIME] Implement CicBridge::EscapeKorean (#6585)
Supporting TIPs...
JIRA issue: CORE-19360
- Add CicBridge::EscHanjaMode.
- Add code to CicBridge::EscapeKorean.
2024-03-09 11:59:37 +09:00
Katayama Hirofumi MZ 299abf7c87
[MSCTFIME][SDK] Add CInputContextOwner (stub) (#6584)
Supporting TIPs...
JIRA issue: CORE-19360
- Add ITfContextOwner
  interface to "msctf.idl".
- Stub-implement
  CInputContextOwner class.
2024-03-08 20:43:32 +09:00
Katayama Hirofumi MZ b383b70089
[SHELL32_APITEST] Improve ShellHook testcase (#6582)
Make shell32:ShellHook testcase stable and trustworthy.
JIRA issue: ROSTESTS-389
- Use real shell hook.
- Delete HSHELL_RUDEAPPACTIVATED tests.
- Add HSHELL_WINDOWDESTROYED tests.
2024-03-08 18:17:09 +09:00
Katayama Hirofumi MZ 0709dff84c
[SHELL32_APITEST] Improve FindExecutable testcase (#6583)
Make shell32:FindExecutable testcase stable and trustworthy.
JIRA issue: ROSTESTS-389
- Reduce dependency with sub-program (instead use copy of
  notepad.exe).
- Simplify.
2024-03-08 17:21:57 +09:00
Hermès Bélusca-Maïto e1d334794a
[FREELDR][ROSSYM(_NEW)] Remove last vestigial references to "NTOSAPI".
This was a MinGW-specific, non-MS-DDK/WDK-compatible define, that was
used to mark NTOS kernel/hal exports, instead of NTSYSAPI etc.

We have since fixed that, and changed the way Freeldr (and rossym)
manages these, see commits:
186c8b72d (r16028), 51f0dfd30 (r17651) and 526efd2ee (r24359)
2024-03-07 13:35:08 +01:00
Timo Kreuzer def2fe5dc3 [HALAPIC] Rename a field for consistency 2024-03-06 19:04:41 +01:00
Timo Kreuzer c5f93c50dd [CMLIB] Quick-fix a pool buffer overrun
A more complete fix is in PR #6064, but this needs to be fixed now.
2024-03-06 19:04:20 +01:00
Stanislav Motylkov a69b0c9fd5 [MAIN] Fix icon identifiers and their order
Additionally:
- Reuse printers and fonts folder icons from shell32,
  the same way as it was done in c0dbde0436.
  The printers folder icon was missing here though.
- Fix "look_key" => "lock_key" typos.

This fixes Administrative Tools and Fonts Folder icons in Control Panel
when being restored to defaults with Stardock IconPackager 5.1.

CORE-19471
2024-03-06 19:18:18 +03:00
Hermès Bélusca-Maïto 3a49e26f13
[KERNEL32][PSDK][NTVDM][CONSRV] Use now-documented ReadConsoleInputEx() flag names.
Addendum to commit b8b8819c7 (r60920)

ReadConsoleInputEx() and its flags used to be undocumented.
In the meantime they became documented on MSDN, see:
https://learn.microsoft.com/en-us/windows/console/readconsoleinputex

We can therefore adopt these now-documented flag names.
2024-03-06 12:28:27 +01:00
Oleg Dubinskiy c0dbde0436
[MYDOCS] Add missing icons expected by 3rd party applications (#6576)
Add "My Documents" and "My Pictures" icons, with 100 and 101 identifiers
accordingly. They are duplicating the icons from shell32.

This fixes My Documents desktop icon becoming blank when reverting back
to the system default icons after applying 3rd party icon set in Stardock
IconPackager 5.1, and also fixes icons of some items in the application
preview dialog.

It's confirmed that mydocs.dll on Windows XP SP3 and Server 2003 SP2
includes these two icon resources with the said identifiers.
The icons there are being an exact copy from shell32 as well.

CORE-19471 CORE-14758
2024-03-06 13:56:26 +03:00
Katayama Hirofumi MZ 361bf39872
[BROWSEUI] Fix CExplorerBand Right-Dragging menu (#6579)
Display correct menu on right-dragging
an item in Folder explorer bar to Desktop.
JIRA issue: CORE-19474
In CExplorerBand::OnTreeItemDragging
method:
- Use GetAttributesOf to get the
  attributes of a folder item.
- Use correct dwEffect value for
  DoDragDrop call.
2024-03-06 08:11:32 +09:00
Katayama Hirofumi MZ 1cc721e6d5
[NTDLL][NTDLL_APITEST] Add LdrLoadDll testcase (#6563)
JIRA issue: CORE-6585
- Add one comment into LdrpLoadDll function.
- Add LdrLoadDll testcase.
2024-03-06 07:58:07 +09:00
Katayama Hirofumi MZ 0d43ce7879
[USER32_APITEST][SDK] Add GW_ENABLEDPOPUP testcase (#6564)
JIRA issue: CORE-6920
- Add GW_ENABLEDPOPUP constant to
  <winuser.h>.
- Add GW_ENABLEDPOPUP testcase.
2024-03-06 07:52:30 +09:00
Vitaly Orekhov c30b284373
[ATL] Implement CSimpleStringT::Preallocate (#6574)
Used in `ATL::CStringW` and `ATL::CStringA`, for example:

```
ATL::CStringW cswItemText = "";
cswItemText.Preallocate(64);

SendDlgItemMessageW(pdis->CtlID, LB_GETTEXT, pdis->itemID, reinterpret_cast<LPARAM>(cswItemText.GetBuffer()));
cswItemText.ReleaseBuffer();
```

This public function is used to allocate memory for the string via private PrepareWrite, but it's missing somehow. Now it shouldn't be.
2024-03-05 11:42:27 +03:00