Commit graph

81227 commits

Author SHA1 Message Date
Bryan Kirk 0944f808f8
[DDK] Hack the IDmaChannel::PhysicalAddress ABI 2022-02-16 01:31:28 +03:00
Bryan Kirk 3d9ef5c7e7
[PSDK] Add GUIDs used by AC97 sample driver 2022-02-16 01:31:28 +03:00
Bryan Kirk 07baa95a01
[DDK] Fix and add portcls definitions used by AC97 driver sample 2022-02-16 01:31:27 +03:00
Victor Perevertkin 6e97b4314f
[PORTCLS] Centralize AddRef/Release implementation.
And make it thread-safe.

Co-authored-by: Thomas Faber <thomas.faber@reactos.org>
2022-02-16 01:31:27 +03:00
Thomas Faber 7db9fb3ba6
[PORTCLS] Don't leak CPortWaveCyclic. 2022-02-15 08:43:08 -05:00
Thomas Faber ec1eb52ebf
[PORTCLS] Do not rely on operator new to zero memory.
The standard operator new does not do this, and GCC will in fact
optimize out any zeroing done in the operator.
2022-02-15 08:43:05 -05:00
Katayama Hirofumi MZ 418edcd2bf [SHELL32_APITEST] ShellExecCmdLine: Close newly-opened windows
ROSTESTS-378
2022-02-15 20:15:36 +09:00
Katayama Hirofumi MZ 2b2366ab90 [NTUSER] Improve UserFreeInputContext and UserDestroyInputContext
CORE-18044
2022-02-15 19:07:50 +09:00
Katayama Hirofumi MZ dfd06ee8fc
[MSPAINT] Implement skew (#4362)
- Add SkewDIB helper function in dib.cpp.
- Implement Stretch and Skew feature by SelectionModel::StretchSkew and ImageModel::StretchSkew.
- Move ColorKeyedMaskBlt function.
CORE-16634
2022-02-14 16:18:18 +09:00
Katayama Hirofumi MZ 2d90919047
[MSPAINT] Implement canvas rotation (#4360)
- Add Rotate90DegreeBlt function to dib.cpp.
- Implement ImageModel::RotateNTimes90Degrees and SelectionModel::RotateNTimes90Degrees.
- Improve ToolsModel::SetBackgroundTransparent.
- Extend and improve SelectionModel::InsertFromHBITMAP.
CORE-16634
2022-02-14 12:08:34 +09:00
Thomas Faber 6eccbe27ec
[HAL:APIC] Ensure the interrupt gets requested immediately in ApicRequestSelfInterrupt. CORE-17663 2022-02-13 17:15:00 -05:00
Eric Kohl 5811da1ec5 [RUNAS] Initial version of the runas utility
- Work in progress
- Please do not translate it yet because the resources will change significantly
2022-02-13 21:45:10 +01:00
Hermès Bélusca-Maïto f7e8214b55
[NTOS:INBV] Code refactoring: Move all the boot animation-specific code out of inbv.c and into the new bootanim.c file.
- inbv.c now only contains the Inbv-specific API and nothing else.

- It will make easier for people to write their own boot themes & animations,
  by just copying/adapting the bootanim.c file (and the resources).

- Add SAL annotations.

- All INBV progress bar functions (except for InbvIndicateProgress())
  should not be INIT-only functions, since they can be (not yet in ROS)
  used at later times -- namely, for feedback during hibernation.
2022-02-13 21:29:14 +01:00
Hermès Bélusca-Maïto 17bd71b570
[NTOS:INBV] Duplicate inbv.c to bootanim.c -- the Git way >_> 2022-02-13 21:19:13 +01:00
Hermès Bélusca-Maïto 8fd64d636d
Restore the original inbv.c 2022-02-13 21:18:51 +01:00
Hermès Bélusca-Maïto 93c5e2b7c0
[NTOS:INBV] Duplicate inbv.c to bootanim.c -- the Git way >_>
This will preserve the history in the copied file.
2022-02-13 21:18:22 +01:00
Hermès Bélusca-Maïto e17f7d6994
[NTOS:INBV] Add documentation to the progress-bar helpers. And fix a bug in them.
In particular, the progress percentage specified to InbvUpdateProgressBar(),
or the progress feedback made with InbvIndicateProgress() calls, is
**relative** to the progress sub-range specified with a previous call to
InbvSetProgressBarSubset() (by default, the range is 0...100%).

This functionality is used e.g. when the number of progress steps is
unknown prior, for example when loading drivers: in this case progress
is made within a given percentage range.

This bug has always been with us since 2010.
2022-02-13 21:16:52 +01:00
Eric Kohl 3f67212812 [PSDK] Add missing flags for CreateProcessWithLogon 2022-02-13 15:41:49 +01:00
Katayama Hirofumi MZ 60b89da383 [SHELL32_APITEST] Try to fix Test Win2003_x64 again 2022-02-13 17:45:08 +09:00
Katayama Hirofumi MZ 45a4e53fa4
[NTUSER][IMM32] Use Imm32CurrentPti and pool (#4356)
- Use newly-defined Imm32CurrentPti() instead of NtCurrentTeb()->Win32ThreadInfo.
- THREADSTATE_GETTHREADINFO is same as THREADSTATE_UNKNOWN18.
- Use the paged pool to allocate HIMC rather than heap.
- Fix and improve ImmDestroyContext function.
CORE-11700
2022-02-13 15:51:53 +09:00
Hermès Bélusca-Maïto 78a7d7dc32
[CMIDRIVER] Remove useless Visual Studio resource editor file. 2022-02-12 16:21:32 +01:00
Hermès Bélusca-Maïto f73c0e08e2
[FDEBUG][CMIDRIVER] Add missing psdk dependency for user-mode code. 2022-02-12 16:21:30 +01:00
Katayama Hirofumi MZ b5c9d532e8
[NTUSER][USER32] Implement IntImmProcessKey (#4353)
- Establish the trampoline callback USER32_CALLBACK_IMMPROCESSKEY for imm32!ImmProcessKey function, between NTUSER and IMM32.
- Add IntGetImeCompatFlags helper function.
- Implement co_IntImmProcessKey and IntImmProcessKey functions.
CORE-11700
2022-02-12 08:32:13 +09:00
Joachim Henze 27d73cd78b [NOTEPAD] Fix hr-Hr.rc compiler warning 'unrecognized escape sequence' CORE-18043
It regressed by 0.4.15-dev-3810-g e0fc48d6e2 (#4338)
No release was ever affected therefore.

The diff looks massive in tgit-diffview, strange,
but I actually replaced just a '\' with '\n' at line 168.
My local diff tool does properly display it as a one-line-change only.
2022-02-11 12:42:03 +01:00
Katayama Hirofumi MZ bbe5fd5274
[NTUSER] Implement NtUserCheckImeHotKey (#4351)
- Modify NtUserCheckImeHotKey prototype.
- Add IntGetImeHotKeyLanguageScore, IntGetActiveKeyboardLayout, IntGetImeHotKeyByKey, and IntCheckImeHotKey helper functions.
- Implement NtUserCheckImeHotKey function.
CORE-11700
2022-02-10 22:53:28 +09:00
George Bișoc 1b06522638
[NTOS:SE] Assign the captured SID and/or privileges to NULL manually on token filtering
This reverts 8479509 commit which pretty much does nothing at all (the captured pointer is NULL within the stack of the function has no effect outside of the function). My mistake, sorry.
2022-02-10 09:51:58 +01:00
Katayama Hirofumi MZ 8cdfc245b3 [IMM32] Implement ImmWINNLSGetEnableStatus
CORE-11700
2022-02-10 15:18:44 +09:00
Katayama Hirofumi MZ cf32c7cb5e [IMM32] Implement ImmSendMessageToActiveDefImeWndW
CORE-11700
2022-02-10 15:05:59 +09:00
George Bișoc 8479509a7b
[NTOS:SE] Assign the captured privilege or SID as NULL when releasing
Whenever a captured security property such as privilege or SID is released, we must not have such captured property point at random address in memory but rather we must assign it as NULL after it's been freed from pool memory. This avoids potential double-after-free situations where we might release a buffer twice.
This is exactly the case with token filtering.
2022-02-09 10:29:56 +01:00
Katayama Hirofumi MZ 3ed22ed326 [SHELL32_APITEST] Try to fix Test Win2003_x64
rm: cannot remove 'C:\\tests/testdata/shell32_apitest_sub.exe': Permission denied
2022-02-09 12:37:06 +09:00
Katayama Hirofumi MZ e52ce89be3 [NTUSER] Refactoring ime.c
s/WINAPI/NTAPI/
CORE-11700
2022-02-09 11:51:27 +09:00
Katayama Hirofumi MZ 5d5cc57869
[NTUSER] Implement NtUserSetImeHotKey (#4350)
- Modify NtUserGetImeHotKey and NtUserSetImeHotKey prototypes.
- Define enum SETIMEHOTKEY_ACTION in <undocuser.h>.
- Define IMEHOTKEY structure in ime.c.
- Add IntGetImeHotKeyLangId, IntAddImeHotKey, IntGetImeHotKeyById, IntGetImeHotKeyByKeyAndLang, IntDeleteImeHotKey, IntFreeImeHotKeys, and IntSetImeHotKey helper functions.
- Implement NtUserGetImeHotKey and NtUserSetImeHotKey functions.
- Cleanup the IME hotkeys at process exit.
CORE-11700
2022-02-09 11:27:44 +09:00
Andrej Bartulin e0fc48d6e2
[NOTEPAD] Add Croatian translation (hr-HR) (#4338) 2022-02-09 10:26:22 +09:00
Hermès Bélusca-Maïto 2ae45e0985
[CONCFG:FONT] Implement support for the Windows 10 "__DefaultTTFont__" special FaceName value. (#4337)
This special value tells the console to default to whichever font
is deemed most appropriate for the current code page.

Add Doxygen documentation for FindCachedTTFont().
2022-02-08 15:59:10 +01:00
Hermès Bélusca-Maïto 0b6b0b0021
[CONCFG:FONT] Convert the TT_FONT_ENTRY structure to one similar to MS Terminal's _TT_FONT_LIST. (#4337)
See the definition of struct _TT_FONT_LIST
in https://github.com/microsoft/terminal/blob/main/dep/Console/winconp.h

Add Doxygen documentation.

[CONSOLE.CPL][CONSRV] "fonts cache" -> "font cache".
2022-02-08 15:59:08 +01:00
Hermès Bélusca-Maïto 5d3915d0fc
[CONCFG:FONT][CONSRV] Use a suitable font when changing console output CP; fail if none found. (#4337)
CORE-12451, CORE-17601, CORE-17803
Replaces PR #4281.

When changing the console output code page, check whether the current
font can support it. If not, try to find a suitable font for the new
code page. If none can be found:

- if we are creating a new console, forcefully switch to codepage 437
  (OEM USA) and retry finding a font, falling back to "Terminal" if
  none could be found;

- if we were just changing the current CP, just fail and keep the old
  code page and font.

Rework the console font selection/creation functions for this new job
(see CreateConsoleFontEx() and friends). Elements of implementation
based from https://github.com/microsoft/terminal ; see code for more
information.

Silence the noisy IsValidConsoleFont2() diagnostic messages.

Add Doxygen documentation.

[CONSOLE.CPL] Only add "Terminal" to the enumerated list of faces
+ add a TODO implementation comment.
2022-02-08 15:59:07 +01:00
Hermès Bélusca-Maïto a94436b519
[KERNEL32] SetThreadUILanguage(): Validate the parameter. Use LANGIDFROMLCID() macro. (#4301)
Both ReactOS and Win2k3 only support '0' for the parameter.
2022-02-08 15:58:04 +01:00
Hermès Bélusca-Maïto 3e44a5d71c
[KERNEL32][CONSRV] Retrieve the best-suited language ID corresponding to the active console output code page. (#4301)
CORE-17601, CORE-17803
Replaces PR #4281.

Implement SrvGetConsoleLangId() (server-side) and set the new current
thread's locale after connecting to a console, or changing its output
code page.

Based on API tracing on Windows 2003, as well as on comments and code
gathered from: https://github.com/microsoft/terminal

Tests results are listed in PR #4301.
2022-02-08 15:58:02 +01:00
Hermès Bélusca-Maïto ba516ff0f5
[KERNEL32_APITESTS] Add a test showing thread locale/LangID sync with console (#4301)
This test shows how a console program's thread's language ID changes,
or not, when changing the console output code page (or indirectly
when starting on/connecting to a new console), depending on whether
or not the console is running on a CJK/on a non-CJK system, and the
selected code page is a CJK/a non-CJK one.

By that, the test indirectly tests the (non-exposed) consoles GetLangId
+ SetThreadLocale() calls being made under the hood.
2022-02-08 15:58:00 +01:00
Hermès Bélusca-Maïto 20e23bbfcd
[NTOS:EX] ExpGet/SetCurrentUserUILanguage() take pointer to const string. Add an implementation note to NtQueryDefaultUILanguage(). 2022-02-08 15:56:39 +01:00
Hermès Bélusca-Maïto 0540c20167
[NTOS:EX][SDK:REACTOS] Fix capitalization of "LangId" in the ProbeFor*** functions. 2022-02-08 15:56:34 +01:00
Katayama Hirofumi MZ 9db4437185
[NTUSER] Implement NtUserNotifyIMEStatus (#4345)
- Define "the special virtual keys for Japanese".
- Add UserSetImeConversionKeyState helper function.
- Implement NtUserNotifyIMEStatus function.
CORE-11700
2022-02-08 12:22:08 +09:00
Katayama Hirofumi MZ 61d4b5fd6c
[NTUSER] Cleanup the window lists (#4346)
Cleanup the window lists that are no longer needed at the thread / process termination.
CORE-11700
2022-02-08 12:21:05 +09:00
Mark Jansen ce306b83db
[SHELL32] Rename functions to fix ambiguity 2022-02-07 20:56:46 +01:00
Mark Jansen bc5603d9d0
[SHELL32] Show properties dialog in a new thread 2022-02-07 20:56:46 +01:00
Mark Jansen 93fac5533d
[SHELL32] ShellExecute: Retry after searching for the file in the SEE_MASK_INVOKEIDLIST case
CORE-18035
2022-02-07 20:56:46 +01:00
Mark Jansen f6f5490ab4
[SHELL32] ShellExecute: Implement SEE_MASK_INVOKEIDLIST
CORE-18035
Also simplify some error handling by using smart pointers
2022-02-07 20:56:21 +01:00
Katayama Hirofumi MZ 1bc9dda5e6
[NTUSER] Rewrite NtUserDestroyInputContext (#4342)
CORE-11700
2022-02-07 10:45:02 +09:00
Hermès Bélusca-Maïto 914f14a8b9
[FREELDR:NTLDR] Adjust some debug traces. RegOpenKey(): demote an ERR to WARN.
CORE-18040
2022-02-07 00:26:30 +01:00
Hermès Bélusca-Maïto f6a13d452c
[FREELDR:NTLDR] Implement support for the SOS option.
CORE-9023, CORE-18033

- Reset the UI to a minimal one in SOS mode.

- In SOS mode, a trace of loaded files is displayed on the screen,
  instead of the usual progress bar.

- Add a callback to the PE loader to notify when imported DLLs are
  loaded for a main image. This allows getting an accurate SOS trace.
2022-02-06 23:53:41 +01:00