Commit graph

85325 commits

Author SHA1 Message Date
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
Andrei Miloiu 4dc4ec2fe4
[MSHTML] Update Romanian (ro-RO) translation (#6519) 2024-03-05 04:46:29 +01:00
Katayama Hirofumi MZ 49b2b1dab1
[SHELL32] Use STDMETHOD macro and keyword override (#6570)
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT STDMETHODCALLTYPE
  m" with "STDMETHOD(m)" (m is a method name).
- Replace "virtual t STDMETHODCALLTYPE m" with
  "STDMETHOD_(t, m)" (t is a type. m is a method
  name).
- Use "override" keyword as possible.
- CDefView should inherit IShellView3 due to
  override CreateViewWindow3 method.
- Fix CDefView::CreateViewWindow3 (parameter
  prcView is const RECT *, not LPRECT).
2024-03-05 08:43:39 +09:00
Katayama Hirofumi MZ bb297bc351
[BROWSEUI] Use STDMETHOD macro and keyword override (#6569)
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT 
  STDMETHODCALLTYPE m"
  with "STDMETHOD(m)"
  (m is a method name).
- Replace "virtual t
  STDMETHODCALLTYPE m"
  with "STDMETHOD_(t, m)"
 (t is a type. m is a method name).
- Use "override" keyword as possible.
2024-03-05 00:53:11 +09:00
Katayama Hirofumi MZ de8e1553ec
[NTOBJSHEX] Use STDMETHOD macro and keyword override (#6566)
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT 
  STDMETHODCALLTYPE m" with
  "STDMETHOD(m)" (m is a
  method name).
- Replace "virtual t
  STDMETHODCALLTYPE m"
  with "STDMETHOD_(t, m)"
  (t is a type. m is a method name).
- Use "override" keyword as possible.
2024-03-05 00:34:21 +09:00
Oleg Dubinskiy eb96d377d1
[SHELL32] Allow custom shortcut overlay icon (#6419)
Use correct icon index in SIC_OverlayShortcutImage() to properly load
shortcut overlay icon from registry instead of always using default icon.
This allows to use custom shortcut icon set by user, in case it was
specified there.

As FIXME comment stated, the icon indexes were not implemented in the far
past, so this workaround was badly required. But now they are implemented,
so no need to always use default resource from shell32, enable the correct
code instead.

Also adapt this to CShellLink::CreateShortcutIcon() when the shortcut icon
is being changed in its properties dialog, as well as in CNewMenu class
when displaying menu items for creating a new folder or a shortcut.

Addendum to f9a5344254. CORE-14758
2024-03-04 16:30:43 +03:00
Timo Kreuzer bbbcd8ed68 [NTOS:EX] Remove an ASSERT in ExpInsertPoolTracker 2024-03-03 07:19:35 +01:00
Katayama Hirofumi MZ 5627da4205
[RSHELL] Use STDMETHOD macro and keyword override (#6575)
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT
  STDMETHODCALLTYPE m" with
  "STDMETHOD(m)" (m is a method name).
- Replace "virtual t STDMETHODCALLTYPE
  m" with "STDMETHOD_(t, m)"
  (t is a type. m is a method name).
- Use "override" keyword as possible.
2024-03-03 10:14:05 +09:00
Katayama Hirofumi MZ b2d56cf364
[NETSHELL] Use STDMETHOD macro and keyword override (#6568)
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT STDMETHODCALLTYPE m"
  with "STDMETHOD(m)" (m is a method name).
- Replace "virtual t STDMETHODCALLTYPE m" with
  "STDMETHOD_(t, m)" (t is a type. m is a method
  name).
- Use override keyword as possible.
2024-03-02 21:38:52 +09:00
Katayama Hirofumi MZ 24fb46c405
[ACPPAGE] Use STDMETHOD macro and keyword override (#6567)
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT STDMETHODCALLTYPE
  m" with "STDMETHOD(m)" (m is a method name).
- Replace "virtual t STDMETHODCALLTYPE m" with
  "STDMETHOD_(t, m)" (t is a type. m is a method
  name).
- Use "override" keyword as possible.
2024-03-02 21:37:05 +09:00
Timo Kreuzer 79aaee6aac [HALX86] Implement the clock IPI handler 2024-03-02 07:56:27 +01:00
Timo Kreuzer d1c118b371 [HALX86] Move apicsmp.c to lib_hal_smp 2024-03-02 07:56:27 +01:00
Timo Kreuzer 2ce5d43a33 [NTOS/x64] Gracefully handle invalid Vector in KeConnectInterrupt
Fail instead of asserting. This is needed because a kmtest triggers it.
2024-03-02 07:30:06 +01:00
Katayama Hirofumi MZ 2320c37151
[CMD] Enable Ctrl+H (^H) as backspace (#6562)
Ctrl+H should pretend like BackSpace key
on Command Prompt.
JIRA issue: CORE-5702
- Add Ctrl+H action in ReadCommand function.
2024-03-01 22:51:57 +09:00
Katayama Hirofumi MZ c07eb9fb1b
[APPWIZ] Shortcut: Rename if there is a conflict (#6556)
Follow-up to #6550. Avoid same name
overwriting.
JIRA issue: CORE-5866
- Rename the filename if there was duplicate.
- Simplify CreateShortcut function.
- Rename IDC_SHORTCUT_LOCATION as
  IDC_LINK_LOCATION to resolve name conflict
  with shell32/shresdef.h.
2024-03-01 08:42:59 +09:00
Joachim Henze 0a587b9ccd
[NETCFGX] Proper accelerators for en-US and de-DE (#6199)
proper accelerators for en-US (like english 2k3sp2)
proper accelerators for de-DE (like german XPSP3)
slightly improved accelerators for fr-FR
and mark existing accelerator collisions for all other languages with FIXME-comments.

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com> for ukrainian header
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org> for fr-FR
2024-02-29 22:17:27 +01:00
Piotr Hetnarowicz d325c67223
[APPWIZ] Update Polish (pl-PL) translation (#6559) 2024-02-29 21:20:48 +03:00
Hermès Bélusca-Maïto ea3e66d748
[SHELL32:WINE] Improve ROS-specific registry opening in SHRestricted() (#4275) 2024-02-29 13:29:10 +01:00
Hermès Bélusca-Maïto 9513d18f93
[SHELL32:WINE] Update the table of policy restrictions (#4275)
Our shell32's wine/shpolicy.c file, synced with Wine code (and which is
currently in master still up to date with Wine!), contains outdated or
incomplete definitions that date back from Windows 98/2000.

Update the restrictions with those from shell32 v6.0 of Windows Server 2003 SP2.

References:
https://www.geoffchappell.com/studies/windows/shell/shell32/api/util/restrictions.htm
https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/ne-shlobj_core-restrictions

"NoLogoff": http://systemmanager.ru/win2k_regestry.en/93519.htm
"StartMenuLogOff": http://systemmanager.ru/win2k_regestry.en/92884.htm
"GreyMSIAds": http://systemmanager.ru/win2k_regestry.en/93177.htm
2024-02-29 13:29:08 +01:00
Hermès Bélusca-Maïto ea8ce25944
[SHELL32:WINE] Add Wine-version info to the Wine's shell32_main header. 2024-02-29 13:27:33 +01:00
Hermès Bélusca-Maïto 52dd07febd
[SHELL32:WINE] Make the wine-imported files include shell32_main.h 2024-02-29 13:26:46 +01:00
Hermès Bélusca-Maïto 72b405549c
[SHELL32] SHAddToRecentDocs(): Just use SHRestricted() to get the NoRecentDocsHistory policy...
... instead of redoing the manual work.
2024-02-29 12:54:10 +01:00
Hermès Bélusca-Maïto fc1712e494
[SHELL32] Set a sane SHELL32 versioning, when compiled for NT 5.2 and NT 6+.
i.e. don't keep using version from Windows 2000...

Values taken from
https://www.geoffchappell.com/studies/windows/shell/shell32/history/index.htm
2024-02-29 12:38:50 +01:00
Katayama Hirofumi MZ ac870f986d
[SHLWAPI_APITEST] Add SHGetRestriction testcase (#6557)
I have a plan to implement
shell32!SHRestricted correctly.
JIRA issue: CORE-11515
In the testcase:
- Get procedure SHGetRestriction
  from shlwapi.dll.
- Call SHGetRestriction to test and
  check the results.
2024-02-29 20:28:10 +09:00
Katayama Hirofumi MZ b944563c7b
[SHELL32_APITEST] Add SHRestricted testcase (#6558)
I have a plan to implement
shell32!SHRestricted correctly.
JIRA issue: CORE-11515
- Get SHRestricted and
  SHSettingsChanged procedures
  from shell32.dll.
- Use them and check the results.
2024-02-29 20:26:01 +09:00
Katayama Hirofumi MZ d0e29248e3 [SHELL32] Update Japanese (ja-JP) translation
Follow-up to #6544. CORE-18706
2024-02-29 09:23:46 +09:00
Joachim Henze e341162dd1
[RASDLG] *.rc Trim unintended spaces (#6540)
- trim unintended spaces
- uk-UA.rc tweak the header (Ukraianian typo, strip FILE:)
2024-02-28 22:34:29 +01:00
Oleg Dubinskiy f9a5344254
[SHELL32] Allow using custom desktop/folders/drives icons (#6421)
Implement proper reading the current user's icons from registry.

CORE-14758

- Load the icons specified by user in registry in the following keys:
  "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}\DefaultIcon"
  (virtual namespace folders)
  "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons"
  (filesystem folders and drives)
- Implement two functions HCU/HLM_GetIconW for reading the icons
  from mentioned HKCU and HKLM keys accordingly.
- Use HCR_RegGetIconW for falling back to default icons.
  This function always loads only default icons, even when
  the custom ones are specified by user.
- Refactor SIC_LoadOverlayIcon to use newly implemented HLM_GetIconW.

These changes apply to:
- virtual namespace folders and other desktop items (like My Computer,
  My Documents, Network Places, Recycle Bin, Web Browser (aka Internet
  Explorer), Control Panel and some of its items);
- normal filesystem directories;
- all types of drives (fixed disk drives, removable drives, CD-ROMs,
  RamDisks and network drives). Handle invalid drives, setting blank
  icon for them, since they cannot be recognized or mounted correctly.
  Also, load the autorun icons first to avoid overriding them by the
  icons defined in registry.

I've rechecked twice: excluding Start Menu icons, Desktop Workspace icon
and some FS folder icons that have their own desktop.ini configuration
files (we probably should write the custom icons we load to these configs,
as Windows does it, perhaps with WritePrivateProfileStringW), all other
icons can be changed now (only ones that can be changed on XP SP3 / 2003
SP2) via built-in system tools (like Desktop icons in desk.cpl) or any
3rd-party tools without modifying system resources.

Also all icons for the known file types can be changed,
same as before my changes.

Regarding Start Menu icons:
- changing them should be correctly implemented in explorer
  instead of shell32, as the former is responsible for the Start Menu
  and partially for the taskbar;
- in order to actually use all of them, we need to implement modern
  Start Menu first.

Useful reference: http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0162.htm
2024-02-29 00:20:47 +03:00