- Use `target_include_directories()` in the libraries' CMakeLists.txt for
exposing their include path to their users, so that these library users
do not have to manually add these paths to their own CMakeLists.txt.
- Explicitly specify `STATIC` in `add_library()` for static libraries.
- Use MODULE instead of SHARED for the DLL. See commit 23373acbb9 for more details.
User-mode:
- DNSAPI uses the adns library.
- CONSOLE.CPL uses the concfg library.
- DISKPART, PING use the conutils library.
- ADVAPI32 uses the cryptlib library.
- EVENTLOG uses the evtlib library.
- NTVDM uses the fast486 library.
- HID uses the hidparser_um library.
- WINEMP3.ACM uses the libmpg123 library.
- OPENGL32 uses the mesa library.
- LOCALSPL uses the skiplist library.
- IPHLPAPI, WSHTCPIP use the tdilib library.
- TIMEDATE.CPL, SYSSETUP use the tzlib library.
- DRWTSN32, DXDIAG, SYSDM.CPL, SYSTEMINFO use the udmihelp library.
- CABINET, VFDLIB, dbghelp_apitest use the zlib library.
Drivers:
- PCIX uses the arbiter library.
- KSECDD uses the cryptlib library.
- I8042PRT uses the dmilib library.
- FTFD uses the freetype library.
- HIDPARSE uses the hidparser_km library.
- ATAPI, SCSIPORT, STORPORT, USBSTOR use the sptilib library.
- NETKVM uses the virtio library.
- BTRFS uses the zlib library.
Sound:
- backpln/audio_test use the libsamplerate library.
- KMIXER, mmixer_test, WDMAUD, WDMAUD.DRV use the libsamplerate and mmixer libraries.
- Fix File/New command. This command closes all views, deletes the snap-in
tree, creates a new root folder snap-in and finally creates a new root view.
- Implement the Windows/New Window command. This command just creates a new
root view.
- Update the main window title.
- Adjust the options dialog accordingly.
Hint: Running mmc_new might fail on ReactOS because of the missing folder
snap-in. I will add some dummy/test snap-in skeletons including the
folder snap-in next.
- MMC maintains one snapin tree per instance. Each console is just a view of
this tree. Therefore I moved the snapin root pointer from the console window
to the main window.
- Implement the register and unregister functions for the view and a common
UpdateViews function that call UpdateView for each registered view.
The Snapin Cache is used to store ISnapinAbout Information (Name, Description,
Vendor, Version, Bitmaps and Icon) for a Snapin. It is currently used by the
Add/Remove dialog.
This PR is a great start for a new C++ based MMC.
I have some improvements in my source tree which I want to add bit by bit.
My modifications to Marks PR are:
- Renamed ISnapInAbout to ISnapinAbout for compatibility reasons.
- Updated CMakeLists.txt
- Removed the patch to shellutils.h because it seems to already have been applied.
RemoveContextFromStack tests pStackEntry == pContextStackHead twice
in the same condition, so the first branch takes every entry that happens
to be the head, not only the one that is head and tail at once.
The branch below it, the one that relinks pStackEntry->pNext->pPrev and
moves the head forward, is then unreachable. Removing the head of a stack
that has more than one entry sets both head and tail to NULL and frees
only that entry, so the remaining entries are lost and leaked.
The body of the first branch is what says which test was meant:
it clears both ends, and that is only correct for the single element case.
Compare the second test against pContextStackTail.
I found this by reading, not by hitting it in a running netsh session,
so I have not confirmed the leak on a live context stack.
Reviewed-by: Whindmar Saksit <whindsaks@proton.me>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Eric Kohl <eric.kohl@reactos.org>
Signed-off-by: Dmitry Rantovov <rantovov5@gmail.com>
- Use SAL2 annotations.
- When terminating the process if the hard error did not already,
prefer using `Parameters[1]` that contains the actual failure code,
instead of what `NtRaiseHardError()` returned.
This provides a more convenient way to adjust system volume: through media buttons!
Handles `APPCOMMAND_VOLUME_MUTE`, `APPCOMMAND_VOLUME_UP`,
and `APPCOMMAND_VOLUME_DOWN` notifications.
CORE-12323
- Allow specifying the length of the output `pszName` buffer.
- Reduce the number of character buffers required.
- Simplify parsing the "Layout Display Name" value, of the form:
"@file_path,-resID" . Positive resource ID isn't handled.
- Use `LoadLibraryExW(..., LOAD_LIBRARY_AS_DATAFILE)` for loading
the specified DLL for retrieving its resources.
- Don't leak the loaded DLL when the `LoadStringW()` call succeeds.
- Don't leak the opened registry key when the "Layout Text" value
retrieval fails.
Use case-insensitive matching for comparing the current KLID with
the enumerated ones.
For example on my machine, `GetKeyboardLayoutNameW()` would return
"0000040C" (French AZERTY layout) in capital hex number, while the
registry `HKLM\System\CurrentControlSet\Control\Keyboard Layouts`
subkeys specify the layouts in lowercase hex, which is of course
perfectly valid: the French AZERTY layout would be "0000040c".
Without the fix, there wouldn't be any matching, and as a result,
the correct keyboard layout wouldn't be selected.
- `WCHAR szLayoutId[9]` --> `WCHAR szKLID[KL_NAMELENGTH]`
- Don't use the `LCID` type for unrelated things: namely,
keyboard layout IDs.
- Simplify `CreateKeyboardLayoutList()` a little.
This is an undocumented WinMM specific message that tells whether the
`KSCATEGORY_AUDIO` devices were installed or removed. wParam and lParam
are not used by this message.
It's needed for #8577 to get notification on default audio output device change.
CORE-12323
Misc. changes:
- [FMIFS] Fix source file encoding to UTF-8
- [KERNEL32] Fix SAL annotation for BasepMapFile
- [NTUSER] Fix a debug print incorrectly mentioning RtlDosPathNameToNtPathName_U
This fix is similar to the previous in 657f728767 (#5592).
- Just after initially caching the path to the ReactOS installer, check
whether an unattend.inf file can be found in its directory; otherwise,
fall back to an unattend file in the current ReactOS directory.
- If this unattend.inf file specifies to run an unattended setup
(`UnattendSetupEnabled` value set to `"yes"`), automatically start the
ReactOS installer -- instead of starting the live environment desktop.
- If the user presses Ctrl+Shift+F10 however, disable unattended setup
(suggestion to override the behaviour with a keypress from Whindmar Saksit).
NOTE: in the `WM_INITDIALOG` dialog handlers, use `SendMessageW`
to simulate the button presses. This also allows the invocation
of `EndDialog()` (from the button command handlers) while the
`WM_INITDIALOG` message is handled, so that the USER dialog manager
can then directly close the dialog without showing it first.
- Make unattended setup work for the 1st-stage GUI setup:
1. Select the partition where to install ReactOS, partitioning empty
space if necessary;
2. Format the selected partition (if requested) with the correct
filesystem, without showing the formatting dialog;
3. Jump over the wizard pages -- some of them preinitialize the data
before doing the jump. Unnecessary pages like the Welcome page,
the Install type selection page, etc. aren't included in the wizard
pages list in this mode.
In case some unattended information isn't complete (or incorrect),
halt on the concerned page(s) and allow the user to go back to the
previously skipped pages.
- Remove an unattended setup hack for volumes format.
Even in unattended setup and `FormatPartition == 0`, if the user chose
to format the partition in the format dialog that pop up, then we *MUST*
honour this choice! Otherwise, we would also have to ignore volume check
for that volume (because we would get an assertion that the volume isn't
formatted), **AND**, we wouldn't be able to install ReactOS there anyway
because the volume isn't formatted!