Commit graph

1397 commits

Author SHA1 Message Date
Katayama Hirofumi MZ ac0bcf4a90
[SHLWAPI][SHLWAPI_APITEST][SDK] PathFileExistsDefExtAndAttributesW (#6879)
Implementing missing features...
JIRA issue: CORE-19278
- Implement PathFileExistsDefExtAndAttributesW function.
- Add its prototype to <shlwapi_undoc.h>.
- Modify shlwapi.spec.
- Add PathFileExistsDefExtAndAttributesW testcase.
2024-05-15 07:42:43 +09:00
Whindmar Saksit 9e8214fa13
[BROWSEUI] GetControlWindow must support FCW_TREE for DefView usage (#6781)
Support GetControlWindow, ShowControlWindow and IsControlWindowShown for TREE and STATUS in the Shell Browser so DefView can set CMF_EXPLORE correctly.
2024-05-09 18:56:19 +02:00
Joe Mason d234dc2d52
[AVRT] Import Audio/Video Runtime module from Wine 9.7 (#6826)
Enhance compatibility with future programs, including browsers.
AVRT is an acronym for "Audio/Video Multimedia Realtime Runtime" and is NT6.
2024-05-07 15:40:27 +03:00
Hermès Bélusca-Maïto 8e799e2d3e
[SDK:WINE] Some minor additions to wine/test.h (#6822)
- Add two missing debugstr_w* helpers. These will be needed for
  future winetest syncs.

Note that such change would be unnecessary, would wine/test.h and
wine/debug.h be also updated with latest Wine versions. Indeed,
wine/debug.h is now allowed to be included in wine tests since
wine commit:
```
include: Allow using debug.h in tests.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id c8f338369695d360e021f2cbd82a18b2c0eb1514 by Alexandre Julliard <julliard@winehq.org>
```

- Since our wine/test.h doesn't include wine/debug.h for now, include
  instead stdio.h for the time being, in order to get support for
  s(w)printf() in tests that don't include stdio.h
2024-05-04 23:04:21 +02:00
Hermès Bélusca-Maïto 30226f834d
[SDK:WINE] Improve wine/unicode.h (v)sprintfW defines, regarding the (v)swprintf functions (#6823)
These defines assumed that the (v)swprintf functions were the
non-conformant ones (that don't take a 'count' 2nd parameter).
Because of that, use instead the _(v)swprintf functions. However,
those exist only in NT6+. Therefore, redefine these locally
using the _(v)snprintf functions.

NOTE: wine/unicode.h has been removed in wine commit
348eebae872e90a735041a153635d00b01178cfa from July 13, 2022
2024-05-04 13:47:51 +02:00
Whindmar Saksit ef80b3dde4
[SDK] ReleaseCComPtrExpectZero should print the relevant file:line (#6772)
ReleaseCComPtrExpectZero currently always prints the same line from shellutils.h in the warning which is not very useful. A macro is required for __FILE__ to be correct.
2024-05-02 17:56:28 +02:00
Timo Kreuzer 45aa8f8111 [CRT] Remove useless #undef abort from process.h 2024-04-26 15:16:31 +02:00
Timo Kreuzer 6beff505d7 [CRT] Add _Exit to process.h
This is already done this way in our stdlib.h. It is needed by GCC 13 C++ headers. The problem happens like this:
- telnet/precomp.h includes fstream from GCC
- fstream includes pthread.h from GCC
- pthread.h includes process.h from ReactOS
- process.h defines _CRT_TERMINATE_DEFINED, but doesn't declare _Exit
- fstream includes cstdlib from GCC
- cstdlib includes stdlib.h from GCC (#include_next)
- stdlib.h doesn't declare _Exit, because _CRT_TERMINATE_DEFINED is defined
- cstdlib uses _Exit
2024-04-26 15:16:31 +02:00
Oleg Dubinskiy 24e088daa8
[MMEBUDDY] Implement support for looped wave playback (#6761)
Fix playing wave header multiple times in case the caller requests to do it.
In Windows, it is supported by WHDR_BEGINLOOP and WHDR_ENDLOOP flags (specified together) and dwLoops member of WAVEHDR structure (ususally set to 0xFFFFFFFF (INFINITE constant)).
- Check whenther WHDR_BEGINLOOP | WHDR_ENDLOOP flags are set by the caller.
- If they are, get the amount of times to play the header from WAVEHDR.dwLoops.
- Perform wave header competion only when the loop count is equal to zero. Otherwise, don't do it.
- When the header is entirely committed, in case completion is not needed, reset committed bytes count to the starting value to allow the header play again.
- Decrement loop count in case it isn't set to INFINITE, to mark loop as played correctly. When this count becomes zero, then the playback is finished.
- Get rid from SOUND_OVERLAPPED.PerformCompletion member. Use SOUND_DEVICE_INSTANCE.LoopsRemaining == 0 condition instead.
- Do this only for WaveOut devices, since MSDN states it works only with output buffers. Hence, there is nothing changed for WaveIn.
- Update an appropriate statement about unimplemented functionality from mmebuddy notes.
TODO: handle the case when multiple headers are requested to be looped (WHDR_BEGINLOOP and WHDR_ENDLOOP are set separatedly: 1st flag - in the 1st header, and 2nd in the last header). Currently, only looping a single wave header is supported.
This fixes the playback in the apps those request looped wave playback of some audio data (e. g., BRD Demo app, which did play its sound only first 500 ms before, now it plays endlessly until closing it manually).
CORE-10118
2024-04-24 11:08:40 +02:00
Timo Kreuzer 9229709312 [NTOS:KE/x64] Implement processor freeze code 2024-04-23 15:50:06 +02:00
Timo Kreuzer 95bf896b10 [CRT] crtdefs.h: Wrap localeinfo_struct in ifdef
This prevents a redefinition error, when GCC 13 host headers are included when compiling c++ code.
2024-04-16 20:10:38 +02:00
Timo Kreuzer 8feb078692 [NTOS:KE/x64] Use movaps instead of movdqa
It does the same thing, but is one byte shorter.
2024-04-14 16:09:20 +02:00
Timo Kreuzer 8d459f2820 [NTOS:KE/x64] Clean up EnterTrap/ExitTrap
- Always save and restore all non-volatile registers, including xmm
- Remove the obsolete flags
2024-04-14 16:09:20 +02:00
Timo Kreuzer 05456808e8 [NTOS:KE/x64] Fix handling of non-volatiles in trap vs exception frame
The registers that are saved/restored in the trap / exception frame need to be consistent between all entry/exit points as well as the functions that convert between trap/exception frame and context. The trap frame contains only the non-volatile registers and rbp, the rest is saved in the exception frame.
The previous code didn't save rbp in the syscall handler, which led to it being clobbered when exiting though KiServiceExit2 rather than returning back to the syscall exit path. Also KeContextToTrapFrame would use rbx, rsi and rdi from the trap frame, which wouldn't be saved there by the syscall handler.
2024-04-14 16:09:20 +02:00
Timo Kreuzer fc6e23d6b8 [NDK/x64] Remove #pragma pack(push,4) around KPRCB/KPCR 2024-04-13 17:59:04 +02:00
Katayama Hirofumi MZ 31ce37da2a
[SHELL32][SHELL32_APITEST][SDK] Implement GUIDFromStringA (#6734)
Implementing missing features...
JIRA issue: CORE-19278
- Add GUIDFromString testcase.
- Implement GUIDFromStringA function.
- Add NULL check to GUIDFromStringW.
- Add GUIDFromStringA prototype to "undocshell.h".
2024-04-12 21:29:07 +09:00
Whindmar Saksit 7a810c17e7
[SHELL32] Implement several ShellDispatch methods (#6145)
* Implement most of the methods

* Some suggested changes and better error handling (that I then mask like Windows)
2024-04-10 14:29:26 -07:00
Katayama Hirofumi MZ d05dcf6a02
[SHELL32][SDK] Fix ParseDisplayName Part 1 (#6721)
JIRA issue: CORE-19495
- Implement SHParseDisplayName and
  CDesktopFolder::ParseDisplayName.
- Add CStubFolderBase, CShellUrlStub, CFileUrlStub,
  CIDListUrlStub, and CHttpUrlStub helper classes.
- Add SHGetSpecialFolderID and
  Shell_ParseSpecialFolder helper functions.
- Add BindCtx_ContainsObject,
  BindCtx_GetUIWindow, 
  BindCtx_RegisterObjectParam, SHBindToObject,
  SHBindToObjectEx, SHCoInitializeAnyApartment,
  SHGetAttributes, SHGetNameAndFlagsW,
  SHIsFileSysBindCtx, SHSkipJunctionBinding,
  Shell_DisplayNameOf, and Shell_FailForceReturn
  helper functions.
- Modify CSIDL data.
2024-04-10 09:32:13 +09:00
Whindmar Saksit 9238a1762f
[SHELL32] Copy as path shell extension (#6701)
* Added Copy as path menu extension

---------

Co-authored-by: Thamatip Chitpong <weedgamer131@gmail.com>
2024-04-06 14:01:32 -07:00
Whindmar Saksit 8841e3d7ba
[SHELL32] Handle the Progman Folder options message and tab switching support (#5574)
* Handle the "OnShowOptionsDlg" message
* Support switching tabs
* Update dll/win32/shell32/dialogs/folder_options.cpp
* Update dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
* ShowFolderOptionsDialog workaround
* Added Vista pages, define for magic message

---------

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
Co-authored-by: Thamatip Chitpong <weedgamer131@gmail.com>
2024-04-04 18:53:57 -07:00
Timo Kreuzer 24b4026ce8 [NTOS:KE/x64][SDK] Add HANDLE_USER_APCS asm macro
This also fixes delivering APCs from the system call handler, which previously would have clobbered rax. Also don't use the thread's TrapFrame member, which is not always set, when returning.
2024-04-01 20:15:49 +02:00
Timo Kreuzer 88e24bc463 [NTOS:KE/x64][SDK] Add some trap handling support asm macros 2024-04-01 20:15:49 +02:00
Ratin Gao 1cf8759d69
[KERNEL32][KERNEL32_VISTA][KERNEL32_APITEST] Implement and export NT6+ firmware API (#6580)
- Implement `GetFirmwareType` and improve existing API test for it
- Move (Get/Set)FirmwareEnvironmentVariableEx(A/W) to kernel32_vista_static and export them when NT version >= 6.2

Addendum to 4c8a2a8815. CORE-11954
2024-03-30 15:46:34 +03:00
Whindmar Saksit 1408de02ce
[SHELL32] SHOpenFolderAndSelectItems should handle children correctly (#6151)
- Free pidl from ILCombine.
- ILGetNext will never return NULL on valid input, it is not the correct way to check.
2024-03-23 22:24:04 +01:00
Andrei Miloiu c9bab6be25
[NET][MC] Update Romanian (ro-RO) translation for message table (#6506) 2024-03-23 21:07:05 +01:00
Timo Kreuzer 2f03b146da [CRT] intrin_x86.h: Use movsl instead of movsd to fix a GCC 13 warning 2024-03-19 07:44:40 +01:00
Katayama Hirofumi MZ 10d9e9de05
[SHELL32][SDK] Implement RealShellExecute(,Ex)(A,W) (#5849)
Implementing missing features...
JIRA issue: CORE-19278
- Modify shell32.spec.
- Implement RealShellExecuteA, RealShellExecuteW, RealShellExecuteExA,
  and RealShellExecuteExW functions.
- Add the prototypes to <undocshell.h>.
- Modify SEE_MASK_... constants.
2024-03-19 08:58:07 +09:00
Katayama Hirofumi MZ 1af0dbe36e
[MSUTB][SDK] Use QISearch for QueryInterface (#6631)
Simplify code and reduce binary size.
JIRA issue: CORE-19363
- Use shlwapi!QISearch for QueryInterface
  implementation.
- Add delay link to shlwapi.
- Define QITABENT macro in <shlwapi.h>.
2024-03-17 11:55:19 +09:00
Katayama Hirofumi MZ 1fbf09f531
[RAPPS][SHLWAPI][SDK] Un-escape URL filename (#6626)
Choosing the better filename.
JIRA issue: CORE-19490
- Add UrlUnescapeAndMakeFileNameValid helper function.
- Use UrlUnescapeW and PathIsValidCharW.
- Add PATH_CHAR_CLASS_... flags for PathIsValidCharA/W.
2024-03-17 08:15:08 +09:00
Katayama Hirofumi MZ fd9666630e
[SDK][MC] errcodes.mc: Add Japanese (ja-JP) translation (#6624)
Localize the error messages.
JIRA issue: CORE-18706
Modify errcodes.mc for Japanese localization.
2024-03-16 00:11:53 +09:00
Katayama Hirofumi MZ cbad6cef24
[SHLWAPI] Implement SHSetDefaultDialogFont (#6620)
Implementing missing features...
JIRA issue: CORE-19278
- Implement SHSetDefaultDialogFont function.
- Add SHSetDefaultDialogFont prototype to
  <shlwapi_undoc.h>.
2024-03-15 21:25:53 +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
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 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 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
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
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
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 0d8a6a30cc
[PSDK] Remove unused file; it doesn't also exist in official MS PSDK 2024-02-28 17:23:17 +01:00
Katayama Hirofumi MZ fc3eeb61f3
[SDK:LIB] Introduce Cicero static library (#6492)
Refactoring and reduce binary size.
JIRA issue: CORE-19268
- Add cicero static library in sdk/lib/cicero folder.
- Delete sdk/include/reactos/cicero folder.
- Adapt the dependencies to these changes.
- Make ctfmon, msutb, and msctf modules UNICODE.
2024-02-17 09:53:50 +09:00
Katayama Hirofumi MZ 8ea93d2ab2
[REACTOS] Standardize <imm.h> and <immdev.h> (#6493)
Improve header compatibility and
code quality.
JIRA issue: CORE-19268
- Improve <imm.h> and <immdev.h>
  compatibility by correctly choosing
  the items.
- Use <immdev.h> instead of
  <ddk/immdev.h>.
- Move INPUTCONTEXTDX, IMEINFOEX,
  IMEDPI, and CLIENTIMC into
  <imm32_undoc.h>.
- Adapt to these changes.
2024-02-13 20:33:14 +09:00
Katayama Hirofumi MZ 019872dd12
[SDK] cicuif.h: Implement CUIFMenuItemSeparator::OnPaintO10 (#6490)
Supporting the Language bar...
JIRA issue: CORE-19363
- Implement CUIFMenuItemSeparator::OnPaintO10
  method.
- Implement CUIFSchemeDef::GetCtrlFaceOffset
  method.
- Implement CUIFWindow::PaintObject method.
- Implement cicDrawMaskBmpOnDC function.
2024-02-12 17:40:09 +09:00
Katayama Hirofumi MZ f8cb6458e4
[MSUTB][SDK] Add CTipbarWnd Part 4 (#6478)
Supporting the Language bar...
JIRA issue: CORE-19363
- Add implementation to CTipbarWnd.
- Implement GetLibTls function.
2024-02-11 17:21:14 +09:00
Katayama Hirofumi MZ 23db429e42
[MSCTF][MSUTB][SDK] Add CTipbarItem and CTipbarThread (#6477)
Supporting the Language bar...
JIRA issue: CORE-19363
- Modify msctf.spec.
- Add CTipbarThread and
  CTipbarItem classes.
2024-02-11 13:24:41 +09:00
Katayama Hirofumi MZ 152af475b1
[MSUTB][SDK] Implement SetRegisterLangBand (#6471)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add some helper functions.
- Implement SetRegisterLangBand
  function.
2024-02-10 16:04:33 +09:00
Katayama Hirofumi MZ afaa05e366
[MSUTB][SDK] Add CTipbarWnd Part 2 (#6466)
Supporting Language Bar...
JIRA issue: CORE-19363
- Add implementation to
  CTipbarWnd class.
- Add delay link to uxtheme.dll.
2024-02-09 18:28:24 +09:00