Compare commits

...

117 Commits

Author SHA1 Message Date
Serge Gautherie a83caabe3c
Merge c87402c199 into dcf9eb060a 2024-04-27 03:04:33 +02:00
Marcin Jabłoński dcf9eb060a
[SHELL32] Fix Control_RunDLLW (#5400)
This commit makes Control_RunDLLW pass all but one tests from rostests (the one test that fails is the first one, but it only fails if the path to the test program contains a space).

- Rework string parsing in the Control_DoLaunch routine
- Do not send the CPL_STARTWPARMSW message, if no extra parameters were specified (fixes the failing Got NULL lParam2! and some CPL_STARTWPARMSW: expected -1 got %d tests)
- Do not resolve invalid dialog names to index zero, unless the name is empty (fixes some of the failing CPL_DBLCLK: expected -1 got %d tests)
- Handle quotes in the second part of wszCmd

CORE-8981
2024-04-26 18:28:46 -06: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
Thamatip Chitpong cd0bb1af07 [TASKMGR] Process page: Allow using "Open File Location" functionality without running Explorer shell
If Explorer shell is not available, use ReactOS's alternative file browser instead.
2024-04-26 07:16:00 +07:00
Thamatip Chitpong 6d16d27462 [TASKMGR] Process page: Improve readability of command line string formatting code 2024-04-26 07:16:00 +07:00
Thamatip Chitpong 018264f38f
[NTUSER] Release modifier keys when deactivating message queue (#6754)
CORE-14768
2024-04-26 07:12:02 +07:00
Katayama Hirofumi MZ 1331e2fb02
[KERNEL32_APITEST] Add LCMapString testcase (#6805)
@tkreuzer said he wants LCMapString testcase in chat.
JIRA issue: N/A
2024-04-26 08:39:45 +09:00
Doug Lyons 3693d55404
[SHELL32] Fix Desktop folder details view (#5743)
* [SHELL32] Fix Desktop Folder Details View

JIRA issue: [CORE-19177|https://jira.reactos.org/browse/CORE-19177]

* Remove Comments column from Desktop Folder Details View and simplify code.
* Revise date/time sort based on reviewer comments.
* Swap size and type column positions for desktop folder details view.

With help from Whindmar, most (hopefully all) of the magic number for the columns
have been removed in all of the shell folders.

Co-authored-by: Whindmar Saksit <whindsaks@proton.me>
Co-authored-by: Carl J. Bialorucki <cbialo2@outlook.com>
2024-04-25 17:20:28 -05:00
Timo Kreuzer 1f49173f82 [CRT] Massively improve performance of rand_s
Cache the pointer to RtlGenRandom instead of loading and unloading advapi32 every single time this function is called.
2024-04-25 05:25:12 +02:00
Timo Kreuzer 3c55252828 [CRT_APITEST] Add test for rand_s 2024-04-25 05:25:12 +02:00
Timo Kreuzer f319538d98 [CRT] Move rand_s into it's own file 2024-04-25 05:25:12 +02:00
Timo Kreuzer 0ea48e79fc [CRT] Move _invalid_parameter into its own file
As the author of the code, I changed to license to MIT.
2024-04-25 05:25:12 +02:00
Timo Kreuzer 43beb913da [CRT] Move rand to stdlib, where it belongs 2024-04-25 05:25:12 +02:00
Katayama Hirofumi MZ d55f49978d
Revert "[SHELL32] SHChangeNotify: Use tree for CDirectoryList (#6784)" (#6800)
Reverts #6784 that was a guilty commit of CORE-19531 that causing performance regression.

JIRA issue: CORE-19531
2024-04-25 09:01:21 +09:00
Katayama Hirofumi MZ 91acf823d8
[SHELL32] SHChangeNotify: Use tree for CDirectoryList (#6784)
Optimize for speed and memory.
JIRA issue: CORE-13950
CDirectoryList class exists just for remembering which file item is a directory or
not, in order to notify the filesystem item changes. This information can
become a tree data structure.

- Add CFSPathIterator and CFSNode helper classes.
- CFSNode is a class for tree nodes.
- Re-implement CDirectoryList class by using tree nodes.
- Delete CDirectoryItem class.
2024-04-24 19:44:30 +09:00
Katayama Hirofumi MZ c0c270e90e [SHELL32_APITEST] Delete obsolete "iexplore.exe" tests
Follow-up to 75cc5b2. CORE-13950
2024-04-24 19:06:48 +09:00
Katayama Hirofumi MZ 75cc5b2b1c [SHELL32_APITEST] Commonize FindSubProgram function
and delete obsolete "iexplore.exe" tests. CORE-13950
2024-04-24 19:03:10 +09:00
Katayama Hirofumi MZ 8337df2bd1
[SHELL32_APITEST] SHChangeNotify: Improve coverity (#6798)
Improve coverity and speed.
JIRA issue: CORE-13950
- Move NUM_STAGE to the header file.
- Add stages.
- Add DIRTYPE_DESKTOP_DIR and
  DIRTYPE_PRINTERS directory types.
- Improve speed more.
2024-04-24 18:25:15 +09: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
Katayama Hirofumi MZ d23573beed [SHELL32_APITEST] Follow-up to #6796 (25e2f5f)
This change will massively improve speed.
JIRA issue: CORE-13950
- Set zero to INTERVAL.
- Remove SHCNF_FLUSHNOWAIT.
2024-04-24 10:22:42 +09:00
Katayama Hirofumi MZ 25e2f5f277
[SHELL32_APITEST] Make SHChangeNotify testcase more stable (#6796)
Make the testcase more stable and faster. Reduce code.
JIRA issue: CORE-13950
- Use WM_COPYDATA message to communicate with shell32_apitest_sub.exe.
- Use concept of "stage" and "step".
- Do multiple checks in one step.
- Flush notification by using (SHCNF_FLUSH | SHCNF_FLUSHNOWAIT) flags.
2024-04-24 09:10:29 +09:00
Timo Kreuzer 6ac260dcec [NTOS:KE/x64] Handle NMI vs swapgs race condition 2024-04-23 15:50:06 +02:00
Timo Kreuzer 72fd54a7f4 [NTOS:KE/x64] Implement Kd processor switching 2024-04-23 15:50:06 +02:00
Timo Kreuzer 9229709312 [NTOS:KE/x64] Implement processor freeze code 2024-04-23 15:50:06 +02:00
Timo Kreuzer af2ce4d08f [NTOS:KE/x64] Implement KiSaveProcessorState / KiRestoreProcessorState 2024-04-23 15:50:06 +02:00
Timo Kreuzer 1d289fec77 [NTOS:KE] Improve freeze code in KeBugCheckWithTf
- Don't wait 1 second for each processor
- Use AFFINITY_MASK
- Use Prcb->Number, which is more future proof than KeGetCurrentProcessorNumber
- Improve for loop
2024-04-23 15:50:06 +02:00
Timo Kreuzer d96f01b5dc [NTOS:KE/x64] Add KiNmiInterruptHandler
So far it only calls KiHandleNmi. It will also handle processor freeze later.

TODO: Pass TF_WITH_EF to directly generate a KEXCEPTION_FRAME
2024-04-23 15:50:06 +02:00
Katayama Hirofumi MZ 1dc8d80ca1
[SHELL32] SHChangeNotify: Add drive, remove drive (#6782)
Implementing missing features...
JIRA issue: CORE-13950
- Add WM_DEVICECHANGE message handler in the shell window to detect
  DBT_DEVICEARRIVAL and DBT_DEVICEREMOVECOMPLETE.
- Use GetLogicalDrives function to detect drives.
- Use SHChangeNotify to send SHCNE_DRIVEADD and
  SHCNE_DRIVEREMOVED notifications.
- Modify CDefView::OnChangeNotify.
2024-04-23 08:28:38 +09:00
Timo Kreuzer a8ece7e81a [EVTLIB] Fix size of event log record
The size is 32bit, don't read a SIZE_T. Fixes crashes of advapi32_winetest eventlog on x64.
2024-04-22 16:42:02 +02:00
Timo Kreuzer 565828127f [WIN32U_VISTA] Add win32u.dll for Vista 2024-04-22 10:15:40 +02:00
Serge Gautherie fd331f1494 [NTUSER] UserSetCursorPos(): Use an early return
Addendum to 76290a6 (0.4.15-dev-7889).
2024-04-20 13:57:35 -06:00
Serge Gautherie 8b9bf3369c
[DOC] 3rd Party Files.txt: Update 3 unknown versions (#6771) 2024-04-20 21:29:26 +02:00
Katayama Hirofumi MZ 0240a87618
[SHELL32] SHChangeNotify: SHCNF_DWORD and SHCNF_PRINTERA/W (#6777)
Implementing missing features...
JIRA issue: CORE-13950
- Add Shell_ParsePrinterName helper function.
- Implement SHCNF_DWORD, SHCNF_PRINTERA,
  and SHCNF_PRINTERW types of SHChangeNotify
  function.
2024-04-20 23:11:31 +09:00
Serge Gautherie 68a8619b7b [SHELL32] Remove 2 redundant initializations
Addendum to 6146fd0 (r54688) and 99b2e3d (r54979).
2024-04-20 01:50:14 +04:00
Whindmar Saksit 62c30d1f93
[SHELL32] SHCreateDefaultContextMenu: Pass HWND to callback (#6764)
The caller's callback function is supposed to receive the window handle
passed to SHCreateDefaultContextMenu / CDefFolderMenu_Create2.
2024-04-20 00:34:45 +03:00
Whindmar Saksit dacdd80390
[ZIPFLDR] Fix ShellExecute opening a .zip (#6714)
ShellExecute on a .zip file fails because the command in the registry
uses rundll32 that passes in an ANSI string, which is the default for
exported functions without a W suffix.

- This should also fix RAPPS not being able to open downloaded .zip files
- I made it use the full path to Explorer for good measure

Fixes regression introduced by 0.4.15-dev-6343-g bf2cec186c (#5411)

CORE-19506
2024-04-20 00:12:56 +03:00
Hermès Bélusca-Maïto 5f3554a40c
[FREELDR] Merge boot-drive and partition functionalities together (#6760)
And deprecate corresponding boot types "Drive" and "Partition".
These are replaced by the more general "BootSector" boot type.

Finish the unification of the code, started in commit ff85aa0c3,
that loads and boots disk MBR, partition VBR or boot sector in file.

A "WarnDeprecated()" helper is added to warn the user about the
deprecated features, and to inform them to adjust their FREELDR.INI
file in accordance.

In addition, bump FreeLoader version to 3.2 (at last!): a lot of
features have been added or deprecated since its last release.
2024-04-19 21:45:41 +02:00
Oleg Dubinskiy 5949c20d97
[MMIXER] Fix additional data size initialization for different audio formats (#6753)
Calculate size of the additinal data based on the format tag specified by the caller.
For PCM wave format, it should be zero, and for all others,
it should be taken from cbSize member of WAVEFORMATEX structure.
- Initialize data size for each format appropriately.
- Append it to the total pin connect allocation size, to allocate enough memory for it.
- Use it as additional data size for requested wave format.
- Append it to the total size of data format.
- Add SAL2 annotations for MMixerInitializeDataFormat function.
Fixes two crashes in winmm:capture and winmm:wave winetests, which have been introduced by 12b3272d9e.
So this is an addendum to that commit.
CORE-19514
2024-04-18 23:19:35 +02:00
Justin Miller ad9c634efa
[SDK] Don't just infinitely spam the DbgPrint in the bootloader (#6763) 2024-04-18 12:08:00 -07:00
Mark Harmstone dd6c1c8843 [FREELDR] Allow Freeloader to boot Vista revamp of PR #1905 (#6479)
[FREELDR] Add "WindowsVista" boot type
[FREELDR] Set GDT correctly for Vista
[FREELDR] Map first page of memory, this is an observed behavior, and
also increases stability boot Checked windows 2003 SP2 ntoskrnl with
freeloader.
[SDK] Don't assert on big keys in bootloader

Co-authored-by: Justin Miller <justin.miller@reactos.org>
2024-04-18 09:28:54 -07:00
Stanislav Motylkov 6d853be981 [ZIPFLDR] Make function prototype consistent
It is the only function in that file that used this format, all the others are one line.

Spotted by Whindmar Saksit.
2024-04-18 18:22:17 +03:00
Stanislav Motylkov 359c9c7b42 [SHELL32] Update Russian (ru-RU) translation
Addendum to 9238a1762f.
2024-04-18 18:18:16 +03:00
Carlo Bramini 605fa32d45
[CALC] Fix input bug when display is in error. (#5988)
CORE-19191

Reproduce the same behaviour of the calculator for Windows XP when an error condition is met.
When the result is NaN and it cannot be printed, the error condition is cleared by pressing the CLEAR button.
2024-04-18 11:39:46 +02:00
Justin Miller 2a2556c5d0
[WIN32SS] Introduce the NATIVE_REACTX define and disable some Dx calls (#6025)
The code itself isn't wrong but we're entirely missing the logic needed
to make it work. This leads to spontaneous crashes with video drivers and
various unity games.
2024-04-17 21:47:49 -07:00
Justin Miller 9452b29c7f
[VFDLIB] GitHub actions workaround - Disable PDB generation for vfd.dll (#6762)
After a back and fourth investigation I've just decided to disable pdb generation for this ROSAPP for now.
We tried taking the code apart a bit and only building parts but alas it didnt yield any sucess.

disabling the AV also didn't help.
2024-04-17 20:24:33 -07:00
Joachim Henze 21a9f78b2d [COMCTL32] Pt.rc: Place accelerator FIXMEs 2024-04-18 01:53:20 +02:00
Katayama Hirofumi MZ d383b20b01
[REGEDIT] Correctly limit splitter's X coordinates (#6758)
JIRA issue: CORE-19516
- Add ClampSplitBarX helper function to delete
  duplicated code.
- Use a signed value in WM_LBUTTONUP handling.
- Use ClampSplitBarX in ResizeWnd function,
  WM_LBUTTONDOWN, WM_MOUSEMOVE, and
  WM_LBUTTONUP handling.
2024-04-18 06:09:58 +09:00
Hermès Bélusca-Maïto 7b4f42470f
[FREELDR] Reformat the boot editor strings in the code. 2024-04-17 22:25:14 +02:00
Hermès Bélusca-Maïto e5517176b8
[FREELDR] linuxboot: It doesn't need the BIOS boot drive number and partition.
Also document a little bit the RootDevice field in the boot sector;
add SAL2 annotations.
2024-04-17 22:25:13 +02:00
Hermès Bélusca-Maïto c25a0e1919
[FREELDR:UI] Minor miscellaneous fixes.
- UiMessageBox(): Enlarge the default buffer used to printf msgbox strings.

- TuiUpdateDateTime(): When displaying the time, don't pad too much
  with spaces on the left.

- TuiDrawShadow():
  * Pre-calculate whether we need to show the right/bottom shadows,
    and whether the right-shadow has a double width.
  * Cap the right and bottom upper-bound coordinates before looping,
    in order to avoid buffer overflows if the given coordinates go
    beyond the screen.

- TuiDrawMsgBoxCommon(): Improve how the message box centering
  calculations are done:
  * When the "full-UI" is used (and center-menu is used), try to
    center the message box in the space between the header and
    the status bar.
  * Ensure the top-left box corner is inside the screen, in case
    the calculated message box borders go off-screen.

- TuiCalcMenuBoxSize():
  * Uniformize the way the menu box coordinates are calculated.
  * Reduce the space between menu box margins and the longest item.
  * Ensure the top-left menu corner is inside the screen, in case
    the calculated menu box borders go off-screen.
2024-04-17 22:19:43 +02:00
Hermès Bélusca-Maïto c044201472
[FREELDR] Skip NULL-pointer entries in Argv when enumerating arguments.
A NULL pointer (not necessarily the terminating one) is a valid entry
in the Argv argument vector, according to the ARC specification
(Section 4.4 "Loaded-Program Conventions").
Thus, such pointer needs to be ignored when searching over the
argument vector.
2024-04-17 21:57:12 +02:00
Hermès Bélusca-Maïto 93245d385d
[FREELDR] arcsupp.c: Relicense my code to MIT and use SAL2 annotations. 2024-04-17 21:57:11 +02:00
Hermès Bélusca-Maïto 5b2dcdd03d
[FREELDR] BuildArgvForOsLoader: Add a terminating NULL pointer to the Argv vector.
Addendum to commits d05be0da3 and bd451f240.

This is required for POSIX compliance, which the ARC specification obeys.

See Section 2.1.2.2.1 (ANSI X3.159-1989) or 5.1.2.2.1 (ISO/IEC 9899:x)
"Program startup":
```
If they are declared, the parameters to the main function shall obey
the following constraints:
— The value of argc shall be nonnegative.
— argv[argc] shall be a null pointer.
[...]
```

See also https://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html
2024-04-17 21:57:09 +02:00
Joachim Henze 6cb18bc6a4
[COMDLG32] *.rc: Tweak spaces in IDS_INVALID_FILENAME (#6736)
This saves a few bytes in the binary, e.g.
comdlg32.dll master 0.4.15-dev-7887-g64a59a1 RosBEWin2.2.2 GCC8.4.0 dbg x86 shrinks
from 1.011.712 bytes to 1.009.664 bytes.

Furthermore it syncs the translations at this line, because pt-PT.rc already applied such a tweak.

Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
2024-04-17 16:53:09 +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
Katayama Hirofumi MZ 1b85a5fa06
[BROWSEUI] SHExplorerParseCmdLine: Fix parsing of /root (#6752)
Remove excessive (!pInfo->pidlPath) check in SHExplorerParseCmdLine
function.
JIRA issue: CORE-16939
2024-04-15 09:41:01 +09:00
Carl J. Bialorucki ea34ecc9ec
Check if dwBandID is NULL before getting band object (#6738)
fixes CORE-18807 'Our explorer.exe ATL-asserts when executed on XPSP3'
which most likely got unhidden when we enabled the ATL-assertions in
0.4.15-dev-5023-g 55343f04b0
2024-04-15 01:08:01 +02:00
Katayama Hirofumi MZ b1de3bfb2b
[SHELL32] Fix ParseDisplayName Part 4 (#6747)
Follow-up to #6746. Reduce SHParseDisplayName
failures.
JIRA issue: CORE-19495
- Re-implement CDrivesFolder::ParseDisplayName
  method.
2024-04-15 03:25:20 +09:00
Katayama Hirofumi MZ 63e5885b37
[SHELL32] Fix ParseDisplayName Part 3 (#6746)
Follow-up to #6740. Reduce SHParseDisplayName
failures.
JIRA issue: CORE-19495
- Add CRegFolder::_IsInNameSpace helper method.
- Half-implement CRegFolder::ParseDisplayName
  method.
- Parse class string by using GUIDFromStringW
  function.
- Return CO_E_CLASSSTRING for invalid CLSID
  string.
2024-04-15 03:24:09 +09: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 83e741c643 [RTL/x64] Implement RtlRaiseException in asm
This fixes invalid contexts being passed to RtlDispatchException. Also update the ExceptionAddress field in the EXCEPTION_FRAME, to match the Rip value in the CONTEXT, which is required for proper unwinding.
2024-04-14 14:12:35 +02:00
Joachim Henze ba170757d6
[REGEDIT] Anonymize CONTROL "List1" (#6735)
This saves a few bytes in the binary, e.g.
regedit.exe master 0.4.15-dev-7887-g64a59a1 RosBEWin2.2.2 GCC8.4.0 dbg x86 shrinks
from 1.049.600 bytes to 1.049.080 bytes.

Furthermore it syncs the translations at this line, because es-ES.rc even translated that identifier to "Lista1" already.
2024-04-14 11:10:01 +02:00
Carl J. Bialorucki 78dc504e72
[SHELL32] Initialize MenuItemInfoW struct in AddStaticContextMenusToMenu (#6737)
This prevents an issue where clicking on most of the icons on the desktop
that isn't the file explorer causes explorer to throw an exception,
and also prevents another issue where most applications won't launch from the start menu;
at least on MSVC builds running on VirtualBox 5.2.44.

^- I am pretty sure, that this was not always the case. The guilty rev is yet unknown though.
2024-04-14 00:12:35 +02:00
Serge Gautherie b8abfa76ca
[DOC] 3rd Party Files.txt: Complete 'win-iconv' (#6691)
Upstream (code) reads:
`win_iconv is placed in the public domain.`
2024-04-13 21:23:15 +02:00
Timo Kreuzer fc6e23d6b8 [NDK/x64] Remove #pragma pack(push,4) around KPRCB/KPCR 2024-04-13 17:59:04 +02:00
Timo Kreuzer bb444b93d9 [RTL/x64] Handle STATUS_UNWIND_CONSOLIDATE in RtlRestoreContext
It's not entirely correct yet and will probably fail on recursive c++ exceptions, but it fixes basic c++ exception handling.
2024-04-13 14:34:23 +02:00
Katayama Hirofumi MZ ff282894a8
[SHELL32] Refactor and simplify CDesktopFolder (#6741)
Follow-up to #6721. This PR can reduce 1KB of
binary size.
JIRA issue: CORE-19495
- Delete CStubFolderBase and derived classes.
- Add
  CDesktopFolder::_ParseDisplayNameByParent
  method.
- Don't use excessive IShellFolder objects in
  parsing display names.
- Simplify and reduce code.
2024-04-13 21:08:39 +09:00
Katayama Hirofumi MZ 7fdec96009
[SHELL32] Fix ParseDisplayName Part 2 (#6740)
Follow-up to #6721. Reduce
SHParseDisplayName failures.
JIRA issue: CORE-19495
- Re-implement CFSFolder::ParseDisplayName
  method to validate the names.
- Add CFSFolder::_ParseSimple,
  CFSFolder::_GetFindDataFromName, and
  CFSFolder::_CreateIDListFromName helper
  methods.
- Add PathIsDotOrDotDotW, PathIsValidElement,
  PathIsDosDevice, and SHILAppend helper
  functions.
- Delete GetNextElementW and add
  Shell_NextElement function.
2024-04-13 21:07:12 +09:00
Ratin Gao f61e14f554 [NTDLL][ADVAPI32][ADVAPI32_APITEST][CRYPTLIB] Add hash API exports for NT6+ and apitests with small fixes
- For NT6.0+, NTDLL exports those hash APIs that ADVAPI32 thunks forward to
- Fix undocumented context structure layout and content
- Add apitests to verify both of hash result and structure content
2024-04-13 12:41:36 +02:00
Timo Kreuzer 14beaec1d9 [SHELLBTRFS] Prevent redeclaration of __cpuidex with newer mingw-w64 headers 2024-04-13 10:01:46 +02:00
Doug Lyons 76290a6696
[NTUSER] Avoid sending superfluous WM_MOUSEMOVE messages (#6397)
Add a check so that mouse move messages are not generated unless
the mouse cursor X or Y position is changed.

This fixes extra mouse moves generated when clicking.
Patch by I_Kill_Bugs.

CORE-8394 CORE-18529 CORE-19422 CORE-19423
2024-04-12 23:58:52 +03: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
Joachim Henze 64a59a17b5 [REGEDIT] RC: it-IT: Strip spaces, hu-HU,pt-PT,tr-TR: add FIXMEs
The it-IT.rc thingy I spotted when I wanted to port back the regedit-changes from
0.4.15-dev-6592-g 995d255962
The line definitely got improved by that commit, but it was still inferior.

In the other 3 langs it is just some stuff where master head is inferior to older branches,
I spotted them while porting back other things.
So I placed the FIXMEs to protect myself from porting it back accidentally,
and to help the native speakers with seeing them on master head.

The tr-TR.rc: "D&izi Değeri" -> "D&ize Değeri" was done for consistency, because we do have
that item 3 times, and 2 of them were using "D&ize Değeri" already.
2024-04-12 06:31:24 +02:00
Joachim Henze 938a39aee9
[COMDLG32] cdlg_Sq.rc: Strip 2 includes (#6730)
They do look weird/wrong and no other rcs do have them.
Builds fine on all bots.
I do have no clue, why they were added here historically.
2024-04-11 19:54:11 +02:00
Oleg Dubinskiy 12b3272d9e
[AUDIO] Implement support for WAVE_FORMAT_EXTENSIBLE audio format (#6686)
[MMIXER] Implement hadling WAVE_FORMAT_EXTENSIBLE audio format
Fix opening audio device error when trying to open it with WAVE_FORMAT_EXTENSIBLE format tag set in wFormatTag member of WAVEFORMATEX:
- Pass additional data size from WAVEFORMATEX.cbSize to pin data format.
- Append it to the whole size of pin data format (KSDATAFORMAT.FormatSize).
- Set additional fields in WAVEFORMATEXTENSIBLE structure (data format, BPS and channel mask) when WAVE_FORMAT_EXTENSIBLE is used. They are used by our inbuilt Intel AC97 miniport driver at least. It simply fails when these members are not set.
- Fix pin connect allocation size by appending an additional data size from WAVEFORMATEX.cbSize to KSPIN_CONNECT + KSDATAFORMAT + WAVEFORMATEX. This allows to proerly initialize additional extensible data and avoids kernel memory leakage when using extensible audio format.
- Remove format tag check which allowed WAVE_FORMAT_PCM to be opened correctly. So now all possible audio formats can be opened properly at least (although it does not mean they may work correctly).
This fixes the audio playback for all apps those are supporting extensible audio data and use it by default (e. g. AIMP 5.30, QMMP 0.12.17, all Chrome/Chromium-based browsers, GameDev Tycoon Demo game etc.).
CORE-10907, CORE-14783

* [KS] Allow passing additional extensible audio data when extensible audio format is used
- Append additional data size from WAVEFORMATEX.cbSize to pin connect size passed to KsCreatePin. If the tag is WAVE_FORMAT_PCM, then this member should always be zero. So in that case, no any additional data is passed to creation request, and the passed data size is correct for PCM too (KSDATAFORMAT + WAVEFORMATEX).
This fixes audio playback in several apps those are supporting extensibble audio and use it by default (e. g. AIMP 5.30, QMMP 0.12.17, all Chrome/Chromium based browsers, GameDev Tycoon Demo game etc.).
CORE-10907, CORE-14783.

* [WDMAUD.DRV] Pass the correct additional data size to I/O control request
Store a correct size of additional data in WAVEFORMATEX.cbSize when performing open of audio device, when WAVE_FORMAT_EXTENSIBLE audio format is used.
It allows to properly open audio device with Legacy APIs enabled too.
This fixes audio playback in several apps those are using extensible audio data (e. g. AIMP 5.30, QMMP 0.12.17, all Chrome/Chromium based browsers, GameDevTycoon Demo game etc.).
CORE-10907, CORE-14783
2024-04-11 11:59:14 +02:00
Joachim Henze d72d61fe47
[COMDLG32] *.rc Improve translations (#6729)
First an foremost this fixes "the copies-icon in the print-dlg not showing" for Taiwan as well.
That part is an addendum to 0.4.15-dev-3493-g a36cc8054d (#2831)
Taiwan is untypically placed in cdlg_Zh.rc as well for comdlg, next to the traditional chinese version and therefore was forgotten.

Furthermore improve many translations a little bit, where strings could be stolen from neighbor controls. This part focuses mostly on the NEWFILEOPENV2ORD.

Then add many FIXMEs for existing accelerator collisions, many of them were introduced by adding the "Help"-button retrospectively, when other translations existed already. Let the native speakers handle them later.

Strip accelerators from some "Cancel" buttons, e.g. in cdlg_Pt.rc, and the "Save as" button, e.g. within cdlg_Es.rc as those should not exist, which most languages did properly respect already.

Also fix a few text truncations and a few accelerators, e.g. for de-DE: stc3 was cutoff, and "Öffnen" had the wrong accelerator.
2024-04-11 00:56:04 +02: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
Timo Kreuzer c69371cced [NTOS:KE/x64] Improve KeGetTrapFrame 2024-04-10 23:27:53 +02:00
Timo Kreuzer bedc16d46d [DEVMGR] Add DYNAMIC_FIELD_OFFSET macro
This replaces the usage of FIELD_OFFSET for dynamic indexing into array fields.
Sadly GCC has broken __builtin_offsetof and they don't seem to intend to fix it.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95942
2024-04-10 23:27:11 +02:00
Timo Kreuzer f5e54015ee [KS] Fix a bug found by GCC 13 2024-04-10 21:47:38 +02:00
Timo Kreuzer 109b84826e [UDFS] Remove packing around include of ntifs.h
This is not just wrong, it is criminal.
2024-04-10 21:46:34 +02: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
Andrei Miloiu e85ef799fe
[SHELL32] Update Romanian (ro-RO) translation (#6657)
Co-authored-by: Joachim Henze <joachim.henze@reactos.org>
2024-04-09 12:41:54 +02:00
Maj Soklič 2d79b751a4
[NOTEPAD] Fix english STRING_PRINTFAILED translation (#6722) 2024-04-09 11:46:52 +02:00
Katayama Hirofumi MZ ff531eaade
[SHLWAPI][SHLWAPI_APITEST] Fix NULL behavior of StrDupA/W (#6720)
Fix wrong behavior of shlwapi!StrDupA and shlwapi!StrDupW functions.
JIRA issue: CORE-19495
Return NULL when lpszStr == NULL.
2024-04-08 09:17:08 +09:00
Andrei Miloiu 0cfc9aba05
[STOBJECT] Update Romanian (ro-RO) translation (#6695) 2024-04-07 20:40:38 +02:00
Andrei Miloiu 608ed5619f
[SHLWAPI] Update Romanian (ro-RO) translation (#6702) 2024-04-07 20:36:23 +02:00
Andrei Miloiu 3e4d8e6f6c
[UMANDLG] Update Romanian (ro-RO) translation (#6699) 2024-04-07 20:34:38 +02:00
Katayama Hirofumi MZ 5eea72f61b
[SHELL32] Use Uppercase in SHELL32_GUIDToStringA/W (#6719)
Improve consistency.
JIRA issue: CORE-19495
Reduced 4 failures in shell32:SHParseDisplayName.
2024-04-07 20:34:50 +09:00
Timo Kreuzer 713a360c74 [NTOS:KE/x64] Remove pointless loop in KiInitiateUserApc
Only one user APC can be delivered here. The next one can only be delivered, when KiUserApcDispatcher returns to the previous context with NtContinue.
2024-04-07 09:14:26 +02:00
Timo Kreuzer 7589238b68 [NTOS:KE/x64] Fix user APC delivery on syscall exit
We need to save the missing registers in the trap frame before calling KiInitiateUserApc, because they will be used to create the CONTEXT that is saved on the user mode stack, where KiUserApcDispatcher returns back to using NtContinue. This fixes remaining failures in kernel32_apitest QueueUserAPC.
2024-04-07 09:14:26 +02:00
Timo Kreuzer c4498d751d [KERNEL32_APITEST] Add test for multiple queued user APCs 2024-04-07 09:14:26 +02:00
Timo Kreuzer 85fc290bb7 [KERNEL32_APITEST] Use InterlockedIncrement for proper synchronization 2024-04-07 09:14:26 +02:00
Timo Kreuzer 43b181309e [NTOS:KE] Fix calculation of timer expiration
Both due-times and interrupt time are unsigned, but were treated as signed in KiInsertTimerTable, which led to very long (e.g. INFINITE) waits being interpreted as having a negative due-time and being completed instantly.
Mostly fixes kernel32_apitest QueueUserAPC
2024-04-07 09:14:26 +02:00
Timo Kreuzer 34576c7015 [NTOS:KE/x64] Implement KiUserCallbackExit
This is used in KiUserModeCallout instead of KiServiceExit2. The latter is broken, leaks non-volatile registers and will need to be modified to handle an exception frame, which we don't need/have here. It will also use sysret instead of iret and is generally simpler/faster.
Eventually it would be desirable to skip the entire trap frame setup and do everything in KiCallUserMode. This requires some cleanup and special handling for user APC delivery.
2024-04-07 09:13:58 +02: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
Oleg Dubinskiy 91be8bf0a1
[MSVCRT20][MSVCRT40] Fix heap initialization (#6713) CORE-19505
Fixes CORE-19505 'game "Hover!" from rapps does not start anymore'
It failed showing a msgbox
"There was an error allocating memory in Hover!"

the regression was introduced by
0.4.15-dev-5602-g c47506a5f4

Add missing heap initialization in DllMain entrypoints of msvcrt20.dll and msvcrt40.dll,
similarly to as it is done in msvcrt.dll (CRT).
The msvcrt.dll (CRT) initialization code was updated properly
during the last winesync, accordingly to the new changes,
but msvcrt20.dll/msvcrt40.dll one was not. So update it too.
This fixes the crash of HOVER 1.0 game from Rapps when
it tries to allocate a dynamical memory from the
unitialized heap via malloc() function exported from our msvcrt20.dll.
2024-04-06 17:46:11 +02:00
Timo Kreuzer ea28951607 [UMKM_APITEST] Add a test for syscall handling
This is intentionally not part of ntdll_apitest, because that links to advapi32, which links to rpcrt4, which (wrongly!) links to ws2_32, which (wrongly!) links to user32, which breaks the test.
2024-04-06 08:14:52 +02:00
Doug Lyons a771729e69
[COMCTL32] Fix Status Bar Updating (#6696)
This fixes CORE-19497 'Regression, part of the statusbar with the sizegrip is not redrawn properly'

The regression was introduced / unhidden by 0.4.15-dev-5617-g 7866eb2886

Author of the patch: JIRA-user: I_Kill_Bugs
turned into PR by @Doug-Lyons
Thank you both!

KVM: https://reactos.org/testman/compare.php?ids=94433,94435
VBox: Builder Broken atm unfortunately
2024-04-05 23:30:09 +02:00
Timo Kreuzer b6987d1463 [RTL/x64] Remove an ASSERT in RtlpTryToUnwindEpilog
This can fail on optimized builds, where functions can end after a noreturn function call without an epilog / ret, but with an int 3. We simply fail gracefully, which is the right thing to do.
2024-04-05 18:18:45 +02: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 5b82ada2ed [NTOS:Ke/x64] Improve KiDispatchExceptionToUser
Return back to the caller instead of exiting through KiServiceExit2, which is broken and needs to be changed to allow restoring of an exception frame.
2024-04-04 18:41:39 +02: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
Thamatip Chitpong 5329e475db [NTOS:MM] MiDeleteVirtualAddresses: Update PrototypePte before exiting loop, when deleting PDE
Fix BSoD 0x1A introduced by commit c7e09061ca
CORE-18190
CORE-18818
CORE-19253
2024-04-02 00:14:57 +07:00
Thamatip Chitpong 588449c364 [NTOS:MM] Revert commit 0c612980ac
This revert commit 0c612980ac
2024-04-02 00:14:57 +07:00
Serge Gautherie 6dcf70f398
[DOC] 3rd Party Files.txt: Update/Complete 'CardLib' (#6688)
As mentioned in e.g. base/applications/games/solitaire/ReadMe.txt ,
CardLib is indeed freeware, in public domain.
2024-04-01 18:29:29 +02:00
Dmitry Borisov 5070e8960a
[ACPI] Fix object evaluation (#6302)
CORE-17256

- Implement support for complex input buffers.
  This will enable the IDE driver with some hack
  to execute the _STM (channel timing settings) control method.
- Fix a memory leak.
- Fix returned status code.
- Correctly calculate the output buffer size.
- Improve buffer validation.
- Implement support for async control requests.
- Implement local reference conversion.
- Implement support for subpackage argument conversion.
- Place some code into INIT section.
2024-04-01 18:21:35 +02:00
Timo Kreuzer 1538712c0b [NTOS:KE/x64] Move setting the thread's trap frame to KiSystemCallEntry64
This is needed, because KiSystemCallHandler can be called multiple times for the same syscall entry, which would mess up the linkage. This replaces a previous hack and makes things cleaner.
2024-03-31 12:12:48 +02:00
Gleb Surikov fc6bf61e4c
[NTOS:CM] Avoid unnecessary ObDereferenceObject when handling an ObInsertObject failure (#6673)
In case of failure, ObInsertObject itself dereferences the object, so calling ObDereferenceObject one more time in the failure handler is redundant.

- Remove ObDereferenceObject call from CmpCreateRegistryRoot in case ObInsertObject fails.
- Add missing RootKey dereference if CmpCreateRegistryRoot failed to get the key cell (KeyCell).

CORE-17904
2024-03-30 22:10:17 +03: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
Serge Gautherie a68406bccf
[DOC] 3rd Party Files.txt: Add 'AMD LibM for Windows' (#5945)
Addendum to 4afb647 (0.4.15-dev-5466).
2024-03-30 03:57:24 +01:00
Timo Kreuzer 43fc73207d [FREELDR/x64] Set up CR0/CR4 for SSE instructions
Newer GCC starts emitting SSE/SSE2 instructions, which would cause a triple fault, during early boot, if not enabled.
2024-03-29 19:39:01 +01:00
Serge Gautherie c87402c199 [REGEDIT] ModifyValue(): Always HeapFree() + '= NULL' on static vars
Use a consistent and clear/safe pattern.
2023-12-21 05:49:01 +01:00
329 changed files with 11246 additions and 9714 deletions

View File

@ -1635,7 +1635,7 @@ static INT_PTR CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
case IDC_BUTTON_D:
case IDC_BUTTON_E:
case IDC_BUTTON_F:
calc.is_nan = FALSE;
if (calc.is_nan) break;
build_operand(hWnd, LOWORD(wp));
return TRUE;
case IDC_BUTTON_PERCENT:
@ -1701,6 +1701,7 @@ static INT_PTR CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
}
return TRUE;
case IDC_BUTTON_BACK:
if (calc.is_nan) break;
if (calc.sci_in) {
if (calc.esp == 0) {
TCHAR *ptr;

View File

@ -180,7 +180,7 @@ BEGIN
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Възпроизводствено право 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -181,7 +181,7 @@ paměti."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Textový dokument"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -181,7 +181,7 @@ hukommelse, og prøv så igen."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -181,7 +181,7 @@ Anwendungen, um den verfügbaren Arbeitsspeicher zu\nerhöhen."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Textdokument"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -181,7 +181,7 @@ BEGIN
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -180,7 +180,7 @@ Close one or more applications to increase the amount of\nfree memory."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -183,7 +183,7 @@ aumentar la cantidad\nde memoria libre."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Documento de texto"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -187,7 +187,7 @@ käsu lõpetamiseks.\nSulge üks või enam rakendust, et suurendada\nvaba mälu
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Tekstidokument"
STRING_NOTEPAD_AUTHORS "Autoriõigus 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -181,7 +181,7 @@ memoria librearen\nkopurua handitzeko."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -181,7 +181,7 @@ muistia."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -181,7 +181,7 @@ de la mémoire."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Document Texte"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -183,7 +183,7 @@ task.\nClose one or more applications to increase the amount of\nfree memory."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -187,7 +187,7 @@ BEGIN
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "टेक्स्ट डॉक्यूमॅन्ट"
STRING_NOTEPAD_AUTHORS "कॉपीराइट 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -187,7 +187,7 @@ zadatak.\nZatvorite jednu ili više aplikacija da povećate\nslobodnu memoriju."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Tekstni dokument"
STRING_NOTEPAD_AUTHORS "Copyright 1997, 98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -180,7 +180,7 @@ Would you like to save the changes?"
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -180,7 +180,7 @@ ini.\nTutup satu atau lebih aplikasi untuk meningkatkan jumlah\nmemori bebas."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Teks Dokumen"
STRING_NOTEPAD_AUTHORS "Hak Cipta 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -181,7 +181,7 @@ di memoria libera."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Documento di testo"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -180,7 +180,7 @@ Ar norite išsaugoti pakeitimus?"
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "(C) 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -182,7 +182,7 @@ tugas ini.\nTutup satu atau lebih aplikasi untuk menambah jumlah\ningatan kosong
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -180,7 +180,7 @@ Wilt u de wijzigingen opslaan?"
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -180,7 +180,7 @@ Avslutt en eller mere applikasjoner for øke mengden av\nledig minne."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Enerett 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -175,7 +175,7 @@ BEGIN
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Dokument tekstowy"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -180,7 +180,7 @@ tarefa.\nFeche uma ou mais aplicações para aumentar a quantidade de memória l
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -180,7 +180,7 @@ tarefa.\nFeche uma ou mais aplicações para aumentar a quantidade de memória l
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Documento de texto"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -182,7 +182,7 @@ alebo viac aplikácií, aby sa uvoľnila pamäť a skúste to znova."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -182,7 +182,7 @@ detyrë.\nMbyll nje ose me shume programe te rrisesh shumën e\nmemories."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -180,7 +180,7 @@ den här åtgärden.\nAvsluta ett eller flera program för att frigöra mer minn
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -175,7 +175,7 @@ BEGIN
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -178,7 +178,7 @@ BEGIN
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Metin Belgesi"
STRING_NOTEPAD_AUTHORS "Telif Hakları: 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -180,7 +180,7 @@ BEGIN
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Текстовий документ"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -180,7 +180,7 @@ Ozgarishlarni saqlashni istaysizmi?"
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Text Document"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -188,7 +188,7 @@ BEGIN
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "文本文档"
STRING_NOTEPAD_AUTHORS "版权所有 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -189,7 +189,7 @@ BEGIN
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "純文字檔案"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -188,7 +188,7 @@ BEGIN
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing is failed."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "純文字檔案"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@ -2,6 +2,7 @@
* Regedit child window
*
* Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
* Copyright (C) 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -38,6 +39,13 @@ extern LPCWSTR get_root_key_name(HKEY hRootKey)
return L"UNKNOWN HKEY, PLEASE REPORT";
}
static INT ClampSplitBarX(HWND hWnd, INT x)
{
RECT rc;
GetClientRect(hWnd, &rc);
return min(max(x, SPLIT_MIN), rc.right - SPLIT_MIN);
}
extern void ResizeWnd(int cx, int cy)
{
HDWP hdwp = BeginDeferWindowPos(4);
@ -54,6 +62,9 @@ extern void ResizeWnd(int cx, int cy)
cy = rs.bottom - rs.top;
}
GetWindowRect(g_pChildWnd->hAddressBtnWnd, &rb);
g_pChildWnd->nSplitPos = ClampSplitBarX(g_pChildWnd->hWnd, g_pChildWnd->nSplitPos);
cx = g_pChildWnd->nSplitPos + SPLIT_WIDTH / 2;
if (hdwp)
hdwp = DeferWindowPos(hdwp, g_pChildWnd->hAddressBarWnd, NULL,
@ -380,6 +391,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
}
}
goto def;
case WM_DESTROY:
DestroyListView(g_pChildWnd->hListWnd);
DestroyTreeView(g_pChildWnd->hTreeWnd);
@ -389,15 +401,16 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
g_pChildWnd = NULL;
PostQuitMessage(0);
break;
case WM_LBUTTONDOWN:
{
RECT rt;
int x = (short)LOWORD(lParam);
GetClientRect(hWnd, &rt);
if (x>=g_pChildWnd->nSplitPos-SPLIT_WIDTH/2 && x<g_pChildWnd->nSplitPos+SPLIT_WIDTH/2+1)
INT x = (SHORT)LOWORD(lParam);
if (x >= g_pChildWnd->nSplitPos - SPLIT_WIDTH / 2 &&
x < g_pChildWnd->nSplitPos + SPLIT_WIDTH / 2 + 1)
{
last_split = g_pChildWnd->nSplitPos;
draw_splitbar(hWnd, last_split);
x = ClampSplitBarX(hWnd, x);
draw_splitbar(hWnd, x);
last_split = x;
SetCapture(hWnd);
}
break;
@ -407,12 +420,14 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
case WM_RBUTTONDOWN:
if (GetCapture() == hWnd)
{
finish_splitbar(hWnd, LOWORD(lParam));
INT x = (SHORT)LOWORD(lParam);
x = ClampSplitBarX(hWnd, x);
finish_splitbar(hWnd, x);
}
break;
case WM_CAPTURECHANGED:
if (GetCapture()==hWnd && last_split>=0)
if (GetCapture() == hWnd && last_split >= 0)
draw_splitbar(hWnd, last_split);
break;
@ -433,35 +448,13 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
case WM_MOUSEMOVE:
if (GetCapture() == hWnd)
{
HDC hdc;
RECT rt;
HGDIOBJ OldObj;
int x = LOWORD(lParam);
if(!SizingPattern)
INT x = (SHORT)LOWORD(lParam);
x = ClampSplitBarX(hWnd, x);
if (last_split != x)
{
const DWORD Pattern[4] = {0x5555AAAA, 0x5555AAAA, 0x5555AAAA, 0x5555AAAA};
SizingPattern = CreateBitmap(8, 8, 1, 1, Pattern);
}
if(!SizingBrush)
{
SizingBrush = CreatePatternBrush(SizingPattern);
}
GetClientRect(hWnd, &rt);
x = (SHORT) min(max(x, SPLIT_MIN), rt.right - SPLIT_MIN);
if(last_split != x)
{
rt.left = last_split-SPLIT_WIDTH/2;
rt.right = last_split+SPLIT_WIDTH/2+1;
hdc = GetDC(hWnd);
OldObj = SelectObject(hdc, SizingBrush);
PatBlt(hdc, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, PATINVERT);
draw_splitbar(hWnd, last_split);
last_split = x;
rt.left = x-SPLIT_WIDTH/2;
rt.right = x+SPLIT_WIDTH/2+1;
PatBlt(hdc, rt.left, rt.top, rt.right - rt.left, rt.bottom - rt.top, PATINVERT);
SelectObject(hdc, OldObj);
ReleaseDC(hWnd, hdc);
draw_splitbar(hWnd, last_split);
}
}
break;
@ -473,9 +466,6 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
}
break;
case WM_TIMER:
break;
case WM_NOTIFY:
if (g_pChildWnd == NULL) break;
@ -668,7 +658,8 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
{
ResizeWnd(LOWORD(lParam), HIWORD(lParam));
}
/* fall through */
break;
default:
def:
return DefWindowProcW(hWnd, message, wParam, lParam);

View File

@ -1670,8 +1670,6 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin)
lRet = ERROR_SUCCESS; /* Allow editing of (Default) values which don't exist */
type = REG_SZ;
valueDataLen = 0;
stringValueData = NULL;
binValueData = NULL;
}
if (lRet != ERROR_SUCCESS)
@ -1937,6 +1935,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin)
if (lRet != ERROR_SUCCESS)
{
HeapFree(GetProcessHeap(), 0, binValueData);
binValueData = NULL;
error(hwnd, IDS_BAD_VALUE, valueName);
goto done;
}
@ -1954,8 +1953,12 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin)
if (lRet == ERROR_SUCCESS)
result = TRUE;
}
if(binValueData != NULL)
if (binValueData)
{
HeapFree(GetProcessHeap(), 0, binValueData);
binValueData = NULL;
}
}
else
{
@ -1964,16 +1967,22 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin)
done:
if (resourceValueData)
{
HeapFree(GetProcessHeap(), 0, resourceValueData);
resourceValueData = NULL;
resourceValueData = NULL;
}
if (stringValueData)
{
HeapFree(GetProcessHeap(), 0, stringValueData);
stringValueData = NULL;
stringValueData = NULL;
}
if (requirementsValueData)
{
HeapFree(GetProcessHeap(), 0, requirementsValueData);
requirementsValueData = NULL;
requirementsValueData = NULL;
}
return result;
}

View File

@ -695,7 +695,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Добре", IDOK, 107, 114, 50, 14
PUSHBUTTON "Отказ", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Избор на любимки:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Storno", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Vyberte Oblíbené:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "A&bbrechen", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Favorit(en) auswählen:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Ακύρωση", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Επιλογή Αγαπημένου(ων):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Cancel", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Select Favorite(s):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -693,7 +693,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Aceptar", IDOK, 107, 114, 50, 14
PUSHBUTTON "Cancelar", IDCANCEL, 7, 114, 50, 14
CONTROL "Lista1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Seleccionar favoritos:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Annuler", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Sélectionnez le(s) favori(s) :", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "אישור", IDOK, 107, 114, 50, 14
PUSHBUTTON "ביטול", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "בחירת מועדפים:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -80,7 +80,7 @@ END
IDR_REGEDIT_MENU MENU
BEGIN
POPUP "&File"
POPUP "&File" //FIXME: accelerator collision &F
BEGIN
MENUITEM "&Import Registry File...", ID_REGISTRY_IMPORTREGISTRYFILE
MENUITEM "&Export Registry File...", ID_REGISTRY_EXPORTREGISTRYFILE
@ -128,7 +128,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Refresh\tF5", ID_VIEW_REFRESH
END
POPUP "&Favorites"
POPUP "&Favorites" //FIXME: accelerator collision &F
BEGIN
MENUITEM "&Add to Favorites", ID_FAVOURITES_ADDTOFAVOURITES, GRAYED
MENUITEM "&Remove Favorite", ID_FAVOURITES_REMOVEFAVOURITE, GRAYED
@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Cancel", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Select Favorite(s):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Batal", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Pilih Favorit:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -565,7 +565,7 @@ END
STRINGTABLE
BEGIN
IDS_IMPORT_PROMPT "Aggiungendo informazioni si possono involontariamente modificare o eliminare i valori e causare il giusto funzionamente dei componenti.\n Se non si considera attendibile la fonte di queste informazioni in '%s', non aggiungere al Registro di sistema.\n\n Si desidera continuare? "
IDS_IMPORT_PROMPT "Aggiungendo informazioni si possono involontariamente modificare o eliminare i valori e causare il giusto funzionamente dei componenti.\nSe non si considera attendibile la fonte di queste informazioni in '%s', non aggiungere al Registro di sistema.\n\nSi desidera continuare?"
IDS_IMPORT_OK "Le chiavi e i valori contenuti in '%s' sono stati correttamente aggiunti al Registro di sistema."
IDS_IMPORT_ERROR "Impossibile importare '%s': Errore durante l'apertura del file. Ci può essere un disco, file cdanneggiati o il file non esiste."
IDS_EXPORT_ERROR "Impossibile esportare '%s': Errore durante la creazione o la scrittura del file. Ci può essere un disco o un file di sistema danneggiato."
@ -698,7 +698,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Annulla", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Scegli preferiti:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 9, "MS UI Gothic"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "キャンセル", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "お気に入りの選択:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -692,7 +692,7 @@ FONT 9, "굴림"
BEGIN
DEFPUSHBUTTON "확인", IDOK, 107, 114, 50, 14
PUSHBUTTON "취소", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "즐겨찾기를 선택:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Cancel", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Select Favorite(s):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Avbryt", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Velg favoritt(er):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -700,7 +700,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Anuluj", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Wybierz ulubione:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Cancelar", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Selecionar favorito(s):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -145,11 +145,11 @@ IDR_POPUP_MENUS MENU
BEGIN
POPUP ""
BEGIN
MENUITEM "&Modificar", ID_EDIT_MODIFY
MENUITEM "&Modificar", ID_EDIT_MODIFY //FIXME: accelerator collision &M
MENUITEM "Modificar dados binários", ID_EDIT_MODIFY_BIN
MENUITEM SEPARATOR
MENUITEM "&Excluir\tDel", ID_EDIT_DELETE
MENUITEM "&Mudar o nome", ID_EDIT_RENAME
MENUITEM "&Mudar o nome", ID_EDIT_RENAME //FIXME: accelerator collision &M
END
POPUP ""
BEGIN
@ -179,10 +179,10 @@ BEGIN
END
MENUITEM "&Localizar...", ID_EDIT_FIND
MENUITEM SEPARATOR
MENUITEM "&Eliminar", ID_TREE_DELETE
MENUITEM "&Eliminar", ID_TREE_DELETE //FIXME: accelerator collision &E
MENUITEM "&Mudar o nome", ID_TREE_RENAME
MENUITEM SEPARATOR
MENUITEM "&Exportar", ID_TREE_EXPORT
MENUITEM "&Exportar", ID_TREE_EXPORT //FIXME: accelerator collision &E
MENUITEM "&Permissões...", ID_TREE_PERMISSIONS
MENUITEM SEPARATOR
MENUITEM "&Copiar chave 'Nome'", ID_EDIT_COPYKEYNAME
@ -198,8 +198,8 @@ BEGIN
POPUP ""
BEGIN
MENUITEM "C&ortar", ID_HEXEDIT_CUT
MENUITEM "&Copiar", ID_HEXEDIT_COPY
MENUITEM "&Colar", ID_HEXEDIT_PASTE
MENUITEM "&Copiar", ID_HEXEDIT_COPY //FIXME: accelerator collision &C
MENUITEM "&Colar", ID_HEXEDIT_PASTE //FIXME: accelerator collision &C
MENUITEM "&Excluir", ID_HEXEDIT_DELETE
MENUITEM SEPARATOR
MENUITEM "Seleccionar &Tudo", ID_HEXEDIT_SELECT_ALL
@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Cancelar", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Seleccione Favorito(s):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -700,7 +700,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Con&firmă", IDOK, 107, 114, 50, 14
PUSHBUTTON "A&nulează", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Alege favorit(e):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Отмена", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Выберите удаляемое:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -695,7 +695,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Zrušiť", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Select Favorite(s):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Cancel", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Select Favorite(s):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -694,7 +694,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Anulo", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Select Favorite(s):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -690,7 +690,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Avbryt", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Välj Favorit(er):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -692,7 +692,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Cancel", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Select Favorite(s):", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -82,7 +82,7 @@ END
IDR_REGEDIT_MENU MENU
BEGIN
POPUP "&Dosya"
POPUP "&Dosya" //FIXME: accelerator collision &D. If you decide to change this then please keep it in sync with the "&Dosya" in IDC_REGEDIT MENU
BEGIN
MENUITEM "&Al...", ID_REGISTRY_IMPORTREGISTRYFILE
MENUITEM "&Ver...", ID_REGISTRY_EXPORTREGISTRYFILE
@ -97,7 +97,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Çıkış", ID_REGISTRY_EXIT
END
POPUP "&Düzen"
POPUP "&Düzen" //FIXME: accelerator collision &D
BEGIN
MENUITEM "&Değiştir...", ID_EDIT_MODIFY
MENUITEM SEPARATOR
@ -159,7 +159,7 @@ BEGIN
BEGIN
MENUITEM "&Anahtar", ID_EDIT_NEW_KEY
MENUITEM SEPARATOR
MENUITEM "D&izi Değeri", ID_EDIT_NEW_STRINGVALUE
MENUITEM "D&ize Değeri", ID_EDIT_NEW_STRINGVALUE
MENUITEM "İ&kili Değer", ID_EDIT_NEW_BINARYVALUE
MENUITEM "&DWORD Değeri", ID_EDIT_NEW_DWORDVALUE
MENUITEM "&Çoklu Dize Değeri", ID_EDIT_NEW_MULTISTRINGVALUE
@ -199,8 +199,8 @@ BEGIN
END
POPUP ""
BEGIN
MENUITEM "&Kes", ID_HEXEDIT_CUT
MENUITEM "&Kopyala", ID_HEXEDIT_COPY
MENUITEM "&Kes", ID_HEXEDIT_CUT //FIXME: accelerator collision &K
MENUITEM "&Kopyala", ID_HEXEDIT_COPY //FIXME: accelerator collision &K
MENUITEM "&Yapıştır", ID_HEXEDIT_PASTE
MENUITEM "&Sil", ID_HEXEDIT_DELETE
MENUITEM SEPARATOR
@ -692,7 +692,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Tamam", IDOK, 107, 114, 50, 14
PUSHBUTTON "İptal", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Yer imlerini seçiniz.", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -692,7 +692,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14
PUSHBUTTON "Скасувати", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "Оберіть імена для видалення:", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -700,7 +700,7 @@ FONT 9, "宋体"
BEGIN
DEFPUSHBUTTON "确定", IDOK, 107, 114, 50, 14
PUSHBUTTON "取消", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "选择收藏(&S)", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -698,7 +698,7 @@ FONT 9, "新細明體"
BEGIN
DEFPUSHBUTTON "確定", IDOK, 107, 114, 50, 14
PUSHBUTTON "取消", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "選擇資料夾(&S)", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -699,7 +699,7 @@ FONT 9, "新細明體"
BEGIN
DEFPUSHBUTTON "確定", IDOK, 107, 114, 50, 14
PUSHBUTTON "取消", IDCANCEL, 7, 114, 50, 14
CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
CONTROL "", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER |
WS_TABSTOP, 7, 20, 150, 90
LTEXT "選擇收藏夾(&S)", IDC_STATIC, 7, 7, 99, 12
END

View File

@ -1222,6 +1222,7 @@ void ProcessPage_OnOpenFileLocation(void)
DWORD dwProcessId;
DWORD dwLength;
LPWSTR pszExePath;
static const WCHAR szCmdFormat[] = L"/select,\"%s\"";
LPWSTR pszCmdLine = NULL;
dwProcessId = GetSelectedProcessId();
@ -1240,14 +1241,18 @@ void ProcessPage_OnOpenFileLocation(void)
goto Cleanup;
/* Build the shell command line */
pszCmdLine = HeapAlloc(GetProcessHeap(), 0, (dwLength + CONST_STR_LEN(L"/select,\"\"")) * sizeof(WCHAR));
dwLength += CONST_STR_LEN(szCmdFormat) - CONST_STR_LEN(L"%s");
pszCmdLine = HeapAlloc(GetProcessHeap(), 0, dwLength * sizeof(WCHAR));
if (!pszCmdLine)
goto Cleanup;
StringCchPrintfW(pszCmdLine, dwLength + CONST_STR_LEN(L"/select,\"\""), L"/select,\"%s\"", pszExePath);
StringCchPrintfW(pszCmdLine, dwLength, szCmdFormat, pszExePath);
/* Call the shell to open the file location and select it */
ShellExecuteW(NULL, L"open", L"explorer.exe", pszCmdLine, NULL, SW_SHOWNORMAL);
/* Call the shell to open the file location and select it. If Explorer shell
* is not available, use ReactOS's alternative file browser instead. */
ShellExecuteW(NULL, L"open",
GetShellWindow() ? L"explorer.exe" : L"filebrowser.exe",
pszCmdLine, NULL, SW_SHOWNORMAL);
Cleanup:
HeapFree(GetProcessHeap(), 0, pszCmdLine);

View File

@ -2,7 +2,8 @@
* PROJECT: ReactOS Utility Manager Resources DLL (UManDlg.dll)
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Romanian resource file
* TRANSLATOR: Copyright 2019 George Bișoc <george.bisoc@reactos.org>
* TRANSLATORS: Copyright 2019 George Bișoc <george.bisoc@reactos.org>
* Copyright 2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@ -17,12 +18,12 @@ BEGIN
CONTROL "", IDC_GROUPBOX, "Button", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 3, 62, 275, 92
CONTROL "Start", IDC_START, "Button", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 14, 76, 45, 16
CONTROL "Oprire", IDC_STOP, "Button", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 69, 76, 45, 16
CONTROL "Pornire automată la Log in", IDC_START_LOG_IN, "Button", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 12, 101, 206, 14
CONTROL "Pornire automată la blocarea spațiului de lucru", IDC_START_DESKTOP, "Button", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 12, 118, 212, 14
CONTROL "Pornire automată la pornirea Managerului utilități", IDC_START_UTILMAN, "Button", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 12, 134, 212, 13
CONTROL "&OK", IDC_OK, "Button", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 160, 161, 50, 14
CONTROL "&Revocare", IDC_CANCEL, "Button", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 221, 161, 50, 14
CONTROL "&Ajutor", IDC_HELP_TOPICS, "Button", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 98, 161, 50, 14
CONTROL "Pornire automată la &Log in", IDC_START_LOG_IN, "Button", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 12, 101, 206, 14
CONTROL "Pornire automată la blocarea &desktopului", IDC_START_DESKTOP, "Button", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 12, 118, 212, 14
CONTROL "Pornire automată la pornirea Managerului &utilităţi", IDC_START_UTILMAN, "Button", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 12, 134, 212, 13
CONTROL "OK", IDC_OK, "Button", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 160, 161, 50, 14
CONTROL "Revocare", IDC_CANCEL, "Button", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 221, 161, 50, 14
CONTROL "Ajutor", IDC_HELP_TOPICS, "Button", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 98, 161, 50, 14
END
STRINGTABLE
@ -40,7 +41,7 @@ END
STRINGTABLE
BEGIN
IDM_ABOUT "Despre Managerul utilitare..."
IDM_ABOUT "Despre Managerul utilitare"
IDS_APP_NAME "Manager utilitare"
IDS_AUTHORS "Drept de autor 2019 George Bișoc, Hermes Belusca-Maito"
END

View File

@ -459,7 +459,7 @@ public:
/* Enumerate all bands */
while (SUCCEEDED(m_BandSite->EnumBands(uBand, &dwBandID)))
{
if (SUCCEEDED(m_BandSite->GetBandObject(dwBandID, IID_PPV_ARG(IPersist, &pBand))))
if (dwBandID && SUCCEEDED(m_BandSite->GetBandObject(dwBandID, IID_PPV_ARG(IPersist, &pBand))))
{
if (SUCCEEDED(pBand->GetClassID(&BandCLSID)))
{

View File

@ -274,3 +274,11 @@ LPVOID *ppv)
return ShellObjectCreatorInit<CRShellClassFactory>(rclsid, riid, ppv);
}
VOID WINAPI ShowFolderOptionsDialog(UINT Page, BOOL Async)
{
char buf[MAX_PATH];
wsprintfA(buf, "rundll32.exe shell32.dll,Options_RunDLL %u", Page);
WinExec(buf, SW_SHOW);
}

View File

@ -64,36 +64,24 @@
; DarkGray, LightBlue, LightGreen, LightCyan, LightRed, LightMagenta,
; Yellow, White, Default.
;
; Default color is the one that is being used by BIOS firmware by default.
; Default color is the one that is being used by the firmware by default.
; On PC/AT-compatible machines it's Gray, and on NEC PC-98 series it's White.
; [OS-General] Section Commands:
;
; BootType - Specifies the boot type: Windows, WindowsNT40, Windows2003,
; ReactOSSetup, Linux, BootSector, Partition, Drive
; BootType - Specifies the boot type: BootSector, Linux,
; Windows, WindowsNT40, Windows2003, ReactOSSetup.
;
; BootPath - ARC path, e.g. multi(0)disk(0)rdisk(x)partition(y)
; DriveMap - Maps a BIOS drive number to another (i.e. DriveMap=hd1,hd0
; maps harddisk1 to harddisk0; or DriveMap=fd1,fd0).
; ["Drive" OSType] Section Commands:
;
; BootDrive - BIOS drive number to be used.
;
; REMARK: If a "BootPath" ARC path is specified, its value takes precedence
; over the "BootDrive" value.
; ["Partition" OSType] Section Commands:
;
; BootDrive - BIOS drive number to be used.
; BootPartition - Partition number to be used (default: 0).
;
; REMARK: If a "BootPath" ARC path is specified, its value takes precedence
; over both the "BootDrive" and "BootPartition" values.
; DriveMap - For BIOS-based PCs, maps a BIOS drive number to another
; (i.e. DriveMap=hd1,hd0 maps hard-disk 1 to hard-disk 0;
; or DriveMap=fd1,fd0 for mapping floppy disks).
; ["BootSector" OSType] Section Commands:
;
; BootDrive - BIOS drive number to be used.
; BootPartition - Partition number to be used (cannot be 0).
; BootPartition - Partition number to be used (optional).
;
; REMARK: If a "BootPath" ARC path is specified, its value takes precedence
; over both the "BootDrive" and "BootPartition" values.
@ -102,7 +90,11 @@
; If none of them are given and a relative file path is specified by the
; "BootSectorFile" value, the default boot partition will be used instead.
;
; BootSectorFile - File name of the bootsector to be loaded.
; When a non-zero partition is specified (either via "BootPartition" or
; via the "BootPath" ARC path), the drive is accessed in partitioned mode,
; and the "BootSectorFile" option is checked for its presence.
;
; BootSectorFile - File name of the boot sector to be loaded.
; It can be either relative to "BootDrive" and "BootPartition"
; (or to "BootPath"), or be an absolute ARC path, in which case
; the "BootDrive" and "BootPartition" (or "BootPath") values
@ -195,6 +187,7 @@ SpecialEffects=Yes
[Operating Systems]
ReactOSHD="ReactOS (HardDrive)"
;ReactOS_Debug="ReactOS (Debug)"
ReactOSFloppy="ReactOS (Floppy)"
Linux="Debian Linux"
Floppy="3 1/2 Floppy (A:)"
@ -209,6 +202,13 @@ Options=/DEBUGPORT=SCREEN
Kernel=\REACTOS\SYSTEM32\NTOSKRNL.EXE
Hal=\REACTOS\SYSTEM32\HAL.DLL
;[ReactOS_Debug]
;BootType=Windows2003
;SystemPath=multi(0)disk(0)rdisk(0)partition(1)\reactos
;Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=19200
;Kernel=\NTOSKRNL.EXE
;Hal=\HAL.DLL
; Load ReactOS from floppy (drive A:)
[ReactOSFloppy]
BootType=Windows2003
@ -217,13 +217,6 @@ Options=/DEBUGPORT=SCREEN
Kernel=\reactos\NTOSKRNL.EXE
Hal=\reactos\HAL.DLL
;[ReactOS (Debug)]
;BootType=Windows2003
;SystemPath=multi(0)disk(0)rdisk(0)partition(1)\reactos
;Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=19200
;Kernel=\NTOSKRNL.EXE
;Hal=\HAL.DLL
[Linux]
BootType=Linux
BootPath=multi(0)disk(0)rdisk(1)partition(1)
@ -232,16 +225,16 @@ Initrd=/initrd.img
CommandLine="root=/dev/sdb1"
[Floppy]
BootType=Drive
BootType=BootSector
BootDrive=fd0
[MSWinders]
BootType=Partition
BootType=BootSector
BootPath=multi(0)disk(0)rdisk(0)partition(1)
;DriveMap=hd1,hd0
;DriveMap=hd2,hd0
;DriveMap=hd3,hd0
[DriveD]
BootType=Partition
BootType=BootSector
BootPath=multi(0)disk(0)rdisk(1)partition(1)

View File

@ -1,5 +1,6 @@
#include <asm.inc>
#include <ksamd64.inc>
#include <arch/pc/x86common.h>
#include <arch/pc/pcbios.h>
@ -38,6 +39,18 @@ ContinueAddress:
FrldrStartup:
/* Set up CR0 for SSE */
mov rax, cr0
and eax, not CR0_EM // Clear coprocessor emulation CR0.EM CR0.EM (bit 2)
or rax, CR0_MP // Set coprocessor monitoring CR0.MP (bit 1)
mov cr0, rax
/* Set up CR4 for SSE */
mov rax, cr4
or eax, CR4_FXSR // Enable fx save/restore CR4.OSFXSR (bit 9)
or eax, CR4_XMMEXCPT // Enable XMMI exceptions CR4.OSXMMEXCPT (bit 10)
mov cr4, rax
/* Store BootDrive and BootPartition */
mov al, byte ptr [BSS_BootDrive]
mov byte ptr [FrldrBootDrive], al

View File

@ -23,8 +23,6 @@
EXTERN DiskStopFloppyMotor:PROC
EXTERN Relocator16Boot:PROC
EXTERN FrldrBootDrive:BYTE
EXTERN FrldrBootPartition:DWORD
.code64
@ -32,12 +30,11 @@ Regs:
.space REGS_SIZE
/*
* VOID __cdecl BootLinuxKernel(
* IN ULONG KernelSize<ecx>,
* IN PVOID KernelCurrentLoadAddress<rdx>,
* IN PVOID KernelTargetLoadAddress<r8>,
* IN UCHAR DriveNumber<r9b>,
* IN ULONG PartitionNumber<rsp+40>);
* VOID __cdecl
* BootLinuxKernel(
* _In_ ULONG KernelSize<ecx>,
* _In_ PVOID KernelCurrentLoadAddress<rdx>,
* _In_ PVOID KernelTargetLoadAddress<r8>);
*/
PUBLIC BootLinuxKernel
BootLinuxKernel:
@ -47,7 +44,6 @@ BootLinuxKernel:
mov dword ptr [r11 + 8], ecx
mov qword ptr [r11 + 16], rdx
mov qword ptr [r11 + 24], r8
mov byte ptr [r11 + 32], r9b
/* Save non-volatile registers */
push rsi
@ -67,25 +63,6 @@ BootLinuxKernel:
mov word ptr [Regs + REGS_FS], ax
mov word ptr [Regs + REGS_GS], ax
/* Set the boot drive */
xor edx, edx
mov dl, byte ptr [r11 + 32]
test dl, dl
jnz set_part
mov dl, byte ptr /*ds:*/[FrldrBootDrive]
/* Set the boot partition */
set_part:
mov eax, dword ptr [r11 + 40]
test eax, eax
jnz continue
mov eax, dword ptr /*ds:*/[FrldrBootPartition]
continue:
/* Store the 1-byte truncated partition number in DH */
mov dh, al
mov dword ptr [Regs + REGS_EDX], edx
/*
* Relocate the kernel image to its final destination (can be as low as 0x10000).
* The reason we can overwrite low memory is because this code executes

View File

@ -23,8 +23,6 @@
EXTERN _DiskStopFloppyMotor:PROC
EXTERN _Relocator16Boot:PROC
EXTERN _FrldrBootDrive:BYTE
EXTERN _FrldrBootPartition:DWORD
.code32
@ -32,12 +30,11 @@ Regs:
.space REGS_SIZE
/*
* VOID __cdecl BootLinuxKernel(
* IN ULONG KernelSize,
* IN PVOID KernelCurrentLoadAddress,
* IN PVOID KernelTargetLoadAddress,
* IN UCHAR DriveNumber,
* IN ULONG PartitionNumber);
* VOID __cdecl
* BootLinuxKernel(
* _In_ ULONG KernelSize,
* _In_ PVOID KernelCurrentLoadAddress,
* _In_ PVOID KernelTargetLoadAddress);
*/
PUBLIC _BootLinuxKernel
_BootLinuxKernel:
@ -52,25 +49,6 @@ _BootLinuxKernel:
mov word ptr [Regs + REGS_FS], ax
mov word ptr [Regs + REGS_GS], ax
/* Set the boot drive */
xor edx, edx
mov dl, byte ptr [esp + 16]
test dl, dl
jnz set_part
mov dl, byte ptr ds:[_FrldrBootDrive]
/* Set the boot partition */
set_part:
mov eax, dword ptr [esp + 20]
test eax, eax
jnz continue
mov eax, dword ptr ds:[_FrldrBootPartition]
continue:
/* Store the 1-byte truncated partition number in DH */
mov dh, al
mov dword ptr [Regs + REGS_EDX], edx
/*
* Relocate the kernel image to its final destination (can be as low as 0x10000).
* The reason we can overwrite low memory is because this code executes

View File

@ -322,9 +322,8 @@ ExitToLongMode:
mov word ptr ds:[stack16], sp
/* Set PAE and PGE: 10100000b */
// mov eax, cr4
// or eax, HEX(00A0)
mov eax, HEX(00A0)
mov eax, cr4
or eax, HEX(00A0)
mov cr4, eax
/* Point cr3 at the PML4 */

View File

@ -58,21 +58,48 @@ OSLoadingMethods[] =
#if defined(_M_IX86) || defined(_M_AMD64)
#ifndef UEFIBOOT
{"Drive" , EditCustomBootDisk , LoadAndBootDevice},
{"Partition" , EditCustomBootPartition , LoadAndBootDevice},
{"BootSector" , EditCustomBootSectorFile, LoadAndBootDevice},
{"Linux" , EditCustomBootLinux, LoadAndBootLinux },
{"BootSector", EditCustomBootSector, LoadAndBootSector},
{"Linux" , EditCustomBootLinux , LoadAndBootLinux },
#endif
#endif
#ifdef _M_IX86
{"WindowsNT40" , EditCustomBootNTOS , LoadAndBootWindows},
{"WindowsNT40" , EditCustomBootNTOS, LoadAndBootWindows},
#endif
{"Windows" , EditCustomBootNTOS , LoadAndBootWindows},
{"Windows2003" , EditCustomBootNTOS , LoadAndBootWindows},
{"Windows" , EditCustomBootNTOS, LoadAndBootWindows},
{"Windows2003" , EditCustomBootNTOS, LoadAndBootWindows},
{"WindowsVista", EditCustomBootNTOS, LoadAndBootWindows},
};
/* FUNCTIONS ******************************************************************/
#ifdef HAS_DEPRECATED_OPTIONS
/**
* @brief Helper for dealing with DEPRECATED features.
**/
VOID
WarnDeprecated(
_In_ PCSTR MsgFmt,
...)
{
va_list ap;
CHAR msgString[300];
va_start(ap, MsgFmt);
RtlStringCbVPrintfA(msgString, sizeof(msgString),
MsgFmt, ap);
va_end(ap);
UiMessageBox(
" WARNING!\n"
"\n"
"%s\n"
"\n"
"Should you need assistance, please contact ReactOS developers\n"
"on the official ReactOS Mattermost server <chat.reactos.org>.",
msgString);
}
#endif // HAS_DEPRECATED_OPTIONS
static const OS_LOADING_METHOD*
GetOSLoadingMethod(
_In_ ULONG_PTR SectionId)
@ -89,28 +116,61 @@ GetOSLoadingMethod(
IniReadSettingByName(SectionId, "BootType", BootType, sizeof(BootType));
ASSERT(*BootType);
////
#ifdef HAS_DEPRECATED_OPTIONS
if ((_stricmp(BootType, "Drive") == 0) ||
(_stricmp(BootType, "Partition") == 0))
{
/* Display the deprecation warning message */
WarnDeprecated(
"The '%s' configuration you are booting into is no longer\n"
"supported and will be removed in future FreeLoader versions.\n"
"\n"
"Please edit FREELDR.INI to replace all occurrences of\n"
"\n"
" %*s to:\n"
" BootType=%s ------> BootType=BootSector",
BootType,
strlen(BootType), "", // Indentation
BootType);
/* Type fixup */
strcpy(BootType, "BootSector");
if (!IniModifySettingValue(SectionId, "BootType", BootType))
{
ERR("Could not fixup the BootType entry for OS '%s', ignoring.\n",
((PINI_SECTION)SectionId)->SectionName);
}
}
#endif // HAS_DEPRECATED_OPTIONS
////
/* Find the suitable OS loading method */
for (i = 0; ; ++i)
{
if (i >= RTL_NUMBER_OF(OSLoadingMethods))
{
UiMessageBox("Unknown boot entry type '%s'", BootType);
return NULL;
}
if (_stricmp(BootType, OSLoadingMethods[i].BootType) == 0)
return &OSLoadingMethods[i];
}
UNREACHABLE;
}
/*
* This function converts the list of key=value options in the given operating
/**
* @brief
* This function converts the list of Key=Value options in the given operating
* system section into an ARC-compatible argument vector, providing in addition
* the extra mandatory Software Loading Environment Variables, following the
* ARC specification.
*/
**/
static PCHAR*
BuildArgvForOsLoader(
IN PCSTR LoadIdentifier,
IN ULONG_PTR SectionId,
OUT PULONG pArgc)
_In_ PCSTR LoadIdentifier,
_In_ ULONG_PTR SectionId,
_Out_ PULONG pArgc)
{
SIZE_T Size;
ULONG Count;
@ -124,7 +184,7 @@ BuildArgvForOsLoader(
ASSERT(SectionId != 0);
/* Validate the LoadIdentifier (to make tests simpler later) */
/* Normalize LoadIdentifier to make subsequent tests simpler */
if (LoadIdentifier && !*LoadIdentifier)
LoadIdentifier = NULL;
@ -134,19 +194,24 @@ BuildArgvForOsLoader(
/*
* The argument vector contains the program name, the SystemPartition,
* the LoadIdentifier (optional), and the items in the OS section.
* For POSIX compliance, a terminating NULL pointer (not counted in Argc)
* is appended, such that Argv[Argc] == NULL.
*/
Argc = 2 + (LoadIdentifier ? 1 : 0) + Count;
/* Calculate the total size needed for the string buffer of the argument vector */
Size = 0;
/* i == 0: Program name */
// TODO: Provide one in the future...
/* i == 1: SystemPartition : from where FreeLdr has been started */
Size += (strlen("SystemPartition=") + strlen(FrLdrBootPath) + 1) * sizeof(CHAR);
/* i == 2: LoadIdentifier : ASCII string that may be used to associate an identifier with a set of load parameters */
/* i == 2: LoadIdentifier : ASCII string that may be used
* to associate an identifier with a set of load parameters */
if (LoadIdentifier)
{
Size += (strlen("LoadIdentifier=") + strlen(LoadIdentifier) + 1) * sizeof(CHAR);
}
/* The section items */
for (i = 0; i < Count; ++i)
{
Size += IniGetSectionSettingNameSize(SectionId, i); // Counts also the NULL-terminator, that we transform into the '=' sign separator.
@ -155,15 +220,15 @@ BuildArgvForOsLoader(
Size += sizeof(ANSI_NULL); // Final NULL-terminator.
/* Allocate memory to hold the argument vector: pointers and string buffer */
Argv = FrLdrHeapAlloc(Argc * sizeof(PCHAR) + Size, TAG_STRING);
Argv = FrLdrHeapAlloc((Argc + 1) * sizeof(PCHAR) + Size, TAG_STRING);
if (!Argv)
return NULL;
/* Initialize the argument vector: loop through the section and copy the key=value options */
SettingName = (PCHAR)((ULONG_PTR)Argv + (Argc * sizeof(PCHAR)));
/* Initialize the argument vector: loop through the section and copy the Key=Value options */
SettingName = (PCHAR)((ULONG_PTR)Argv + ((Argc + 1) * sizeof(PCHAR)));
Args = Argv;
/* i == 0: Program name */
*Args++ = NULL;
*Args++ = NULL; // TODO: Provide one in the future...
/* i == 1: SystemPartition */
{
strcpy(SettingName, "SystemPartition=");
@ -181,6 +246,7 @@ BuildArgvForOsLoader(
*Args++ = SettingName;
SettingName += (strlen(SettingName) + 1);
}
/* The section items */
for (i = 0; i < Count; ++i)
{
Size = IniGetSectionSettingNameSize(SectionId, i);
@ -193,6 +259,8 @@ BuildArgvForOsLoader(
*Args++ = SettingName;
SettingName += (strlen(SettingName) + 1);
}
/* Terminating NULL pointer */
*Args = NULL;
#if DBG
/* Dump the argument vector for debugging */

View File

@ -24,21 +24,89 @@
/* GLOBALS ********************************************************************/
#if defined(_M_IX86) || defined(_M_AMD64)
const CHAR BootSectorFilePrompt[] = "Enter the boot sector file path.\n\nExamples:\n\\BOOTSECT.DOS\n/boot/bootsect.dos";
const CHAR LinuxKernelPrompt[] = "Enter the Linux kernel image path.\n\nExamples:\n/vmlinuz\n/boot/vmlinuz-2.4.18";
const CHAR LinuxInitrdPrompt[] = "Enter the initrd image path.\n\nExamples:\n/initrd.gz\n/boot/root.img.gz\n\nLeave blank for no initial ram disk.";
const CHAR LinuxCommandLinePrompt[] = "Enter the Linux kernel command line.\n\nExamples:\nroot=/dev/hda1\nroot=/dev/fd0 read-only\nroot=/dev/sdb1 init=/sbin/init";
static const PCSTR BootSectorFilePrompt =
"Enter the boot sector file path.\n"
"Leave blank for booting a disk or partition.\n"
"\n"
"Examples:\n"
"\\BOOTSECT.DOS\n"
"/boot/bootsect.dos";
static const PCSTR LinuxKernelPrompt =
"Enter the Linux kernel image path.\n"
"\n"
"Examples:\n"
"/vmlinuz\n"
"/boot/vmlinuz-2.4.18";
static const PCSTR LinuxInitrdPrompt =
"Enter the initrd image path.\n"
"Leave blank for no initial ramdisk.\n"
"\n"
"Examples:\n"
"/initrd.gz\n"
"/boot/root.img.gz";
static const PCSTR LinuxCommandLinePrompt =
"Enter the Linux kernel command line.\n"
"\n"
"Examples:\n"
"root=/dev/hda1\n"
"root=/dev/fd0 read-only\n"
"root=/dev/sdb1 init=/sbin/init";
#endif /* _M_IX86 || _M_AMD64 */
const CHAR BootDrivePrompt[] = "Enter the boot drive.\n\nExamples:\nfd0 - first floppy drive\nhd0 - first hard drive\nhd1 - second hard drive\ncd0 - first CD-ROM drive.\n\nBIOS drive numbers may also be used:\n0 - first floppy drive\n0x80 - first hard drive\n0x81 - second hard drive";
const CHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition.";
const CHAR ARCPathPrompt[] = "Enter the boot ARC path.\n\nExamples:\nmulti(0)disk(0)rdisk(0)partition(1)\nmulti(0)disk(0)fdisk(0)";
const CHAR ReactOSSystemPathPrompt[] = "Enter the path to your ReactOS system directory.\n\nExamples:\n\\REACTOS\n\\ROS";
const CHAR ReactOSOptionsPrompt[] = "Enter the load options you want passed to the kernel.\n\nExamples:\n/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200\n/FASTDETECT /SOS /NOGUIBOOT\n/BASEVIDEO /MAXMEM=64\n/KERNEL=NTKRNLMP.EXE /HAL=HALMPS.DLL";
const CHAR ReactOSSetupOptionsPrompt[] = "Enter additional load options you want passed to the ReactOS Setup.\nThese options will supplement those obtained from the TXTSETUP.SIF\nfile, unless you also specify the /SIFOPTIONSOVERRIDE option switch.\n\nExample:\n/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /NOGUIBOOT";
const CHAR CustomBootPrompt[] = "Press ENTER to boot your custom boot setup.";
static const PCSTR BootDrivePrompt =
"Enter the boot drive.\n"
"\n"
"Examples:\n"
"fd0 - first floppy drive\n"
"hd0 - first hard drive\n"
"hd1 - second hard drive\n"
"cd0 - first CD-ROM drive.\n"
"\n"
"BIOS drive numbers may also be used:\n"
"0 - first floppy drive\n"
"0x80 - first hard drive\n"
"0x81 - second hard drive";
static const PCSTR BootPartitionPrompt =
"Enter the boot partition.\n";
// "\n"
// "Enter 0 for the active (bootable) partition.";
/* NOTE: "Active"/bootable partition is a per-platform concept,
* and may not really exist. In addition, partition(0) in ARC
* means the whole disk (in non-partitioned access).
* Commit f2854a864 (r17736) and CORE-156 are thus inaccurate
* in this regard. */
static const PCSTR ARCPathPrompt =
"Enter the boot ARC path.\n"
"\n"
"Examples:\n"
"multi(0)disk(0)rdisk(0)partition(1)\n"
"multi(0)disk(0)fdisk(0)";
static const PCSTR ReactOSSystemPathPrompt =
"Enter the path to your ReactOS system directory.\n"
"\n"
"Examples:\n"
"\\REACTOS\n"
"\\ROS";
static const PCSTR ReactOSOptionsPrompt =
"Enter the load options you want passed to the kernel.\n"
"\n"
"Examples:\n"
"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200\n"
"/FASTDETECT /SOS /NOGUIBOOT\n"
"/BASEVIDEO /MAXMEM=64\n"
"/KERNEL=NTKRNLMP.EXE /HAL=HALMPS.DLL";
static const PCSTR ReactOSSetupOptionsPrompt =
"Enter additional load options you want passed to the ReactOS Setup.\n"
"These options will supplement those obtained from the TXTSETUP.SIF\n"
"file, unless you also specify the /SIFOPTIONSOVERRIDE option switch.\n"
"\n"
"Example:\n"
"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /NOGUIBOOT";
static const PCSTR CustomBootPrompt =
"Press ENTER to boot your custom boot setup.";
/* FUNCTIONS ******************************************************************/
@ -48,9 +116,7 @@ VOID OptionMenuCustomBoot(VOID)
{
PCSTR CustomBootMenuList[] = {
#if defined(_M_IX86) || defined(_M_AMD64)
"Disk",
"Partition",
"Boot Sector File",
"Boot Sector (Disk/Partition/File)",
"Linux",
#endif
"ReactOS",
@ -77,22 +143,16 @@ VOID OptionMenuCustomBoot(VOID)
switch (SelectedMenuItem)
{
#if defined(_M_IX86) || defined(_M_AMD64)
case 0: // Disk
EditCustomBootDisk(&OperatingSystem);
case 0: // Boot Sector (Disk/Partition/File)
EditCustomBootSector(&OperatingSystem);
break;
case 1: // Partition
EditCustomBootPartition(&OperatingSystem);
break;
case 2: // Boot Sector File
EditCustomBootSectorFile(&OperatingSystem);
break;
case 3: // Linux
case 1: // Linux
EditCustomBootLinux(&OperatingSystem);
break;
case 4: // ReactOS
case 2: // ReactOS
EditCustomBootReactOS(&OperatingSystem, FALSE);
break;
case 5: // ReactOS Setup
case 3: // ReactOS Setup
EditCustomBootReactOS(&OperatingSystem, TRUE);
break;
#else
@ -118,103 +178,8 @@ VOID OptionMenuCustomBoot(VOID)
#if defined(_M_IX86) || defined(_M_AMD64)
VOID
EditCustomBootDisk(
IN OUT OperatingSystemItem* OperatingSystem)
{
TIMEINFO* TimeInfo;
ULONG_PTR SectionId = OperatingSystem->SectionId;
CHAR SectionName[100];
/* This construct is a trick for saving some stack space */
union
{
struct
{
CHAR Guard1;
CHAR Drive[20];
CHAR Guard2;
};
CHAR ArcPath[200];
} BootStrings;
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(&BootStrings, sizeof(BootStrings));
if (SectionId != 0)
{
/* Load the settings */
/* Check whether we have a "BootPath" value (takes precedence over "BootDrive") */
*BootStrings.ArcPath = ANSI_NULL;
IniReadSettingByName(SectionId, "BootPath", BootStrings.ArcPath, sizeof(BootStrings.ArcPath));
if (!*BootStrings.ArcPath)
{
/* We don't, retrieve the boot drive value instead */
IniReadSettingByName(SectionId, "BootDrive", BootStrings.Drive, sizeof(BootStrings.Drive));
}
}
if (!*BootStrings.ArcPath)
{
if (!UiEditBox(BootDrivePrompt, BootStrings.Drive, sizeof(BootStrings.Drive)))
return;
}
if (!*BootStrings.Drive)
{
if (!UiEditBox(ARCPathPrompt, BootStrings.ArcPath, sizeof(BootStrings.ArcPath)))
return;
}
/* Modify the settings values and return if we were in edit mode */
if (SectionId != 0)
{
/* Modify the BootPath if we have one */
if (*BootStrings.ArcPath)
{
IniModifySettingValue(SectionId, "BootPath", BootStrings.ArcPath);
}
else if (*BootStrings.Drive)
{
/* Otherwise, modify the BootDrive */
IniModifySettingValue(SectionId, "BootDrive", BootStrings.Drive);
}
return;
}
/* Generate a unique section name */
TimeInfo = ArcGetTime();
RtlStringCbPrintfA(SectionName, sizeof(SectionName),
"CustomBootDisk%u%u%u%u%u%u",
TimeInfo->Year, TimeInfo->Day, TimeInfo->Month,
TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second);
/* Add the section */
if (!IniAddSection(SectionName, &SectionId))
return;
/* Add the BootType */
if (!IniAddSettingValueToSection(SectionId, "BootType", "Drive"))
return;
/* Add the BootPath if we have one */
if (*BootStrings.ArcPath)
{
if (!IniAddSettingValueToSection(SectionId, "BootPath", BootStrings.ArcPath))
return;
}
else if (*BootStrings.Drive)
{
/* Otherwise, add the BootDrive */
if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootStrings.Drive))
return;
}
OperatingSystem->SectionId = SectionId;
OperatingSystem->LoadIdentifier = NULL;
}
VOID
EditCustomBootPartition(
IN OUT OperatingSystemItem* OperatingSystem)
EditCustomBootSector(
_Inout_ OperatingSystemItem* OperatingSystem)
{
TIMEINFO* TimeInfo;
ULONG_PTR SectionId = OperatingSystem->SectionId;
@ -231,9 +196,11 @@ EditCustomBootPartition(
};
CHAR ArcPath[200];
} BootStrings;
CHAR BootSectorFile[200];
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(&BootStrings, sizeof(BootStrings));
RtlZeroMemory(BootSectorFile, sizeof(BootSectorFile));
if (SectionId != 0)
{
@ -251,6 +218,9 @@ EditCustomBootPartition(
IniReadSettingByName(SectionId, "BootDrive", BootStrings.Drive, sizeof(BootStrings.Drive));
IniReadSettingByName(SectionId, "BootPartition", BootStrings.Partition, sizeof(BootStrings.Partition));
}
/* Always load the file name; it will only be handled later if a partition has been specified */
IniReadSettingByName(SectionId, "BootSectorFile", BootSectorFile, sizeof(BootSectorFile));
}
if (!*BootStrings.ArcPath)
@ -270,122 +240,15 @@ EditCustomBootPartition(
return;
}
/* Modify the settings values and return if we were in edit mode */
if (SectionId != 0)
/* Edit the file name only if a partition has been specified */
if ((!*BootStrings.ArcPath && atoi(BootStrings.Partition) != 0) ||
(*BootStrings.ArcPath && !strstr(BootStrings.ArcPath, ")partition()") &&
!strstr(BootStrings.ArcPath, ")partition(0)")))
{
/* Modify the BootPath if we have one */
if (*BootStrings.ArcPath)
{
IniModifySettingValue(SectionId, "BootPath", BootStrings.ArcPath);
}
else if (*BootStrings.Drive)
{
/* Otherwise, modify the BootDrive and BootPartition */
IniModifySettingValue(SectionId, "BootDrive", BootStrings.Drive);
IniModifySettingValue(SectionId, "BootPartition", BootStrings.Partition);
}
return;
}
/* Generate a unique section name */
TimeInfo = ArcGetTime();
RtlStringCbPrintfA(SectionName, sizeof(SectionName),
"CustomBootPartition%u%u%u%u%u%u",
TimeInfo->Year, TimeInfo->Day, TimeInfo->Month,
TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second);
/* Add the section */
if (!IniAddSection(SectionName, &SectionId))
return;
/* Add the BootType */
if (!IniAddSettingValueToSection(SectionId, "BootType", "Partition"))
return;
/* Add the BootPath if we have one */
if (*BootStrings.ArcPath)
{
if (!IniAddSettingValueToSection(SectionId, "BootPath", BootStrings.ArcPath))
return;
}
else if (*BootStrings.Drive)
{
/* Otherwise, add the BootDrive and BootPartition */
if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootStrings.Drive))
return;
if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootStrings.Partition))
if (!UiEditBox(BootSectorFilePrompt, BootSectorFile, sizeof(BootSectorFile)))
return;
}
OperatingSystem->SectionId = SectionId;
OperatingSystem->LoadIdentifier = NULL;
}
VOID
EditCustomBootSectorFile(
IN OUT OperatingSystemItem* OperatingSystem)
{
TIMEINFO* TimeInfo;
ULONG_PTR SectionId = OperatingSystem->SectionId;
CHAR SectionName[100];
/* This construct is a trick for saving some stack space */
union
{
struct
{
CHAR Guard1;
CHAR Drive[20];
CHAR Partition[20];
CHAR Guard2;
};
CHAR ArcPath[200];
} BootStrings;
CHAR BootSectorFileString[200];
RtlZeroMemory(SectionName, sizeof(SectionName));
RtlZeroMemory(&BootStrings, sizeof(BootStrings));
RtlZeroMemory(BootSectorFileString, sizeof(BootSectorFileString));
if (SectionId != 0)
{
/* Load the settings */
/*
* Check whether we have a "BootPath" value (takes precedence
* over both "BootDrive" and "BootPartition").
*/
*BootStrings.ArcPath = ANSI_NULL;
IniReadSettingByName(SectionId, "BootPath", BootStrings.ArcPath, sizeof(BootStrings.ArcPath));
if (!*BootStrings.ArcPath)
{
/* We don't, retrieve the boot drive and partition values instead */
IniReadSettingByName(SectionId, "BootDrive", BootStrings.Drive, sizeof(BootStrings.Drive));
IniReadSettingByName(SectionId, "BootPartition", BootStrings.Partition, sizeof(BootStrings.Partition));
}
IniReadSettingByName(SectionId, "BootSectorFile", BootSectorFileString, sizeof(BootSectorFileString));
}
if (!*BootStrings.ArcPath)
{
if (!UiEditBox(BootDrivePrompt, BootStrings.Drive, sizeof(BootStrings.Drive)))
return;
if (*BootStrings.Drive)
{
if (!UiEditBox(BootPartitionPrompt, BootStrings.Partition, sizeof(BootStrings.Partition)))
return;
}
}
if (!*BootStrings.Drive)
{
if (!UiEditBox(ARCPathPrompt, BootStrings.ArcPath, sizeof(BootStrings.ArcPath)))
return;
}
if (!UiEditBox(BootSectorFilePrompt, BootSectorFileString, sizeof(BootSectorFileString)))
return;
/* Modify the settings values and return if we were in edit mode */
if (SectionId != 0)
@ -404,22 +267,23 @@ EditCustomBootSectorFile(
else
{
/*
* Otherwise, zero out all values: BootSectorFile will be
* relative to the default system partition.
* Otherwise, reset all values: BootSectorFile
* will be relative to the default system partition.
*/
IniModifySettingValue(SectionId, "BootPath", "");
IniModifySettingValue(SectionId, "BootDrive", "");
IniModifySettingValue(SectionId, "BootPartition", "");
}
IniModifySettingValue(SectionId, "BootSectorFile", BootSectorFileString);
/* Always write back the file name */
IniModifySettingValue(SectionId, "BootSectorFile", BootSectorFile);
return;
}
/* Generate a unique section name */
TimeInfo = ArcGetTime();
RtlStringCbPrintfA(SectionName, sizeof(SectionName),
"CustomBootSectorFile%u%u%u%u%u%u",
"CustomBootSector%u%u%u%u%u%u",
TimeInfo->Year, TimeInfo->Day, TimeInfo->Month,
TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second);
@ -447,9 +311,12 @@ EditCustomBootSectorFile(
return;
}
/* Add the BootSectorFile */
if (!IniAddSettingValueToSection(SectionId, "BootSectorFile", BootSectorFileString))
return;
/* Add the BootSectorFile if any */
if (*BootSectorFile)
{
if (!IniAddSettingValueToSection(SectionId, "BootSectorFile", BootSectorFile))
return;
}
OperatingSystem->SectionId = SectionId;
OperatingSystem->LoadIdentifier = NULL;
@ -549,8 +416,8 @@ EditCustomBootLinux(
else
{
/*
* Otherwise, zero out all values: BootSectorFile will be
* relative to the default system partition.
* Otherwise, reset all values: the files will
* be relative to the default system partition.
*/
IniModifySettingValue(SectionId, "BootPath", "");
IniModifySettingValue(SectionId, "BootDrive", "");

View File

@ -1,8 +1,8 @@
/*
* PROJECT: FreeLoader
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Generic ARC Support Functions
* COPYRIGHT: Copyright 2019 Hermes Belusca-Maito
* COPYRIGHT: Copyright 2019-2024 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
*/
#pragma once
@ -10,19 +10,21 @@
typedef
ARC_STATUS
(__cdecl *ARC_ENTRY_POINT)(
IN ULONG Argc,
IN PCHAR Argv[],
IN PCHAR Envp[]);
_In_ ULONG Argc,
_In_ PCHAR Argv[],
_In_ PCHAR Envp[]);
PCHAR
PSTR
GetNextArgumentValue(
IN ULONG Argc,
IN PCHAR Argv[],
IN OUT PULONG LastIndex OPTIONAL,
IN PCHAR ArgumentName);
_In_ ULONG Argc,
_In_ PCHAR Argv[],
_Inout_opt_ PULONG LastIndex,
_In_ PCSTR ArgumentName);
PCHAR
PSTR
GetArgumentValue(
IN ULONG Argc,
IN PCHAR Argv[],
IN PCHAR ArgumentName);
_In_ ULONG Argc,
_In_ PCHAR Argv[],
_In_ PCSTR ArgumentName);
/* EOF */

View File

@ -30,16 +30,8 @@ VOID OptionMenuCustomBoot(VOID);
#if defined(_M_IX86) || defined(_M_AMD64)
VOID
EditCustomBootDisk(
IN OUT OperatingSystemItem* OperatingSystem);
VOID
EditCustomBootPartition(
IN OUT OperatingSystemItem* OperatingSystem);
VOID
EditCustomBootSectorFile(
IN OUT OperatingSystemItem* OperatingSystem);
EditCustomBootSector(
_Inout_ OperatingSystemItem* OperatingSystem);
VOID
EditCustomBootLinux(

View File

@ -20,6 +20,10 @@
#ifndef __FREELDR_H
#define __FREELDR_H
/* Enabled for supporting the deprecated boot options
* that will be removed in a future FreeLdr version */
#define HAS_DEPRECATED_OPTIONS
#define UINT64_C(val) val##ULL
#define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m)))
@ -126,6 +130,13 @@
VOID __cdecl BootMain(IN PCCH CmdLine);
#ifdef HAS_DEPRECATED_OPTIONS
VOID
WarnDeprecated(
_In_ PCSTR MsgFmt,
...);
#endif
VOID
LoadOperatingSystem(
_In_ OperatingSystemItem* OperatingSystem);

View File

@ -129,18 +129,17 @@ typedef struct
#include <poppack.h>
// Implemented in linux.S
VOID __cdecl BootLinuxKernel(
IN ULONG KernelSize,
IN PVOID KernelCurrentLoadAddress,
IN PVOID KernelTargetLoadAddress,
IN UCHAR DriveNumber,
IN ULONG PartitionNumber);
VOID __cdecl
BootLinuxKernel(
_In_ ULONG KernelSize,
_In_ PVOID KernelCurrentLoadAddress,
_In_ PVOID KernelTargetLoadAddress);
ARC_STATUS
LoadAndBootLinux(
IN ULONG Argc,
IN PCHAR Argv[],
IN PCHAR Envp[]);
_In_ ULONG Argc,
_In_ PCHAR Argv[],
_In_ PCHAR Envp[]);
#endif /* _M_IX86 || _M_AMD64 */

View File

@ -22,9 +22,9 @@
#if defined(_M_IX86) || defined(_M_AMD64)
ARC_STATUS
LoadAndBootDevice(
IN ULONG Argc,
IN PCHAR Argv[],
IN PCHAR Envp[]);
LoadAndBootSector(
_In_ ULONG Argc,
_In_ PCHAR Argv[],
_In_ PCHAR Envp[]);
#endif /* _M_IX86 || _M_AMD64 */

View File

@ -20,7 +20,7 @@
#pragma once
/* Just some stuff */
#define VERSION "FreeLoader v3.0"
#define VERSION "FreeLoader v3.2"
#define COPYRIGHT "Copyright (C) 1996-" COPYRIGHT_YEAR " ReactOS Project"
#define AUTHOR_EMAIL "<www.reactos.org>"
#define BY_AUTHOR "by ReactOS Project"
@ -33,7 +33,7 @@
// If you add major functionality then you increment the major version and zero the minor & patch versions
//
#define FREELOADER_MAJOR_VERSION 3
#define FREELOADER_MINOR_VERSION 0
#define FREELOADER_MINOR_VERSION 2
#define FREELOADER_PATCH_VERSION 0
extern const PCSTR FrLdrVersionString;

View File

@ -1,8 +1,8 @@
/*
* PROJECT: FreeLoader
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Generic ARC Support Functions
* COPYRIGHT: Copyright 2019 Hermes Belusca-Maito
* COPYRIGHT: Copyright 2019-2024 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
*/
/* INCLUDES ******************************************************************/
@ -11,21 +11,22 @@
/* FUNCTIONS *****************************************************************/
PCHAR
PSTR
GetNextArgumentValue(
IN ULONG Argc,
IN PCHAR Argv[],
IN OUT PULONG LastIndex OPTIONAL,
IN PCHAR ArgumentName)
_In_ ULONG Argc,
_In_ PCHAR Argv[],
_Inout_opt_ PULONG LastIndex,
_In_ PCSTR ArgumentName)
{
ULONG i;
SIZE_T ArgNameLen = strlen(ArgumentName);
for (i = (LastIndex ? *LastIndex : 0); i < Argc; ++i)
{
if (strlen(Argv[i]) >= ArgNameLen + 1 /* Count the '=' sign */ &&
_strnicmp(Argv[i], ArgumentName, ArgNameLen) == 0 &&
Argv[i][ArgNameLen] == '=')
if (Argv[i] /* NULL pointer is a valid entry in Argv: skip it */ &&
(strlen(Argv[i]) >= ArgNameLen + 1 /* Count the '=' sign */) &&
(_strnicmp(Argv[i], ArgumentName, ArgNameLen) == 0) &&
(Argv[i][ArgNameLen] == '='))
{
/* Found it, return the value */
if (LastIndex) *LastIndex = i;
@ -37,11 +38,13 @@ GetNextArgumentValue(
return NULL;
}
PCHAR
PSTR
GetArgumentValue(
IN ULONG Argc,
IN PCHAR Argv[],
IN PCHAR ArgumentName)
_In_ ULONG Argc,
_In_ PCHAR Argv[],
_In_ PCSTR ArgumentName)
{
return GetNextArgumentValue(Argc, Argv, NULL, ArgumentName);
}
/* EOF */

View File

@ -20,6 +20,7 @@
/*
* The x86 Linux Boot Protocol is explained at:
* https://www.kernel.org/doc/Documentation/x86/boot.txt
* https://www.linux.it/~rubini/docs/boot/boot.html
*/
#if defined(_M_IX86) || defined(_M_AMD64)
@ -84,21 +85,29 @@ RemoveQuotes(
ARC_STATUS
LoadAndBootLinux(
IN ULONG Argc,
IN PCHAR Argv[],
IN PCHAR Envp[])
_In_ ULONG Argc,
_In_ PCHAR Argv[],
_In_ PCHAR Envp[])
{
ARC_STATUS Status;
PCSTR Description;
PCSTR ArgValue;
PCSTR BootPath;
UCHAR DriveNumber = 0;
ULONG PartitionNumber = 0;
ULONG LinuxKernel = 0;
ULONG LinuxInitrdFile = 0;
FILEINFORMATION FileInfo;
CHAR ArcPath[MAX_PATH];
#if DBG
/* Ensure the boot type is the one expected */
ArgValue = GetArgumentValue(Argc, Argv, "BootType");
if (!ArgValue || !*ArgValue || _stricmp(ArgValue, "Linux") != 0)
{
ERR("Unexpected boot type '%s', aborting\n", ArgValue ? ArgValue : "n/a");
return EINVAL;
}
#endif
Description = GetArgumentValue(Argc, Argv, "LoadIdentifier");
if (Description && *Description)
RtlStringCbPrintfA(LinuxBootDescription, sizeof(LinuxBootDescription), "Loading %s...", Description);
@ -125,10 +134,10 @@ LoadAndBootLinux(
ArgValue = GetArgumentValue(Argc, Argv, "BootDrive");
if (ArgValue && *ArgValue)
{
DriveNumber = DriveMapGetBiosDriveNumber(ArgValue);
UCHAR DriveNumber = DriveMapGetBiosDriveNumber(ArgValue);
/* Retrieve the boot partition (not optional and cannot be zero) */
PartitionNumber = 0;
ULONG PartitionNumber = 0;
ArgValue = GetArgumentValue(Argc, Argv, "BootPartition");
if (ArgValue && *ArgValue)
PartitionNumber = atoi(ArgValue);
@ -152,17 +161,6 @@ LoadAndBootLinux(
}
}
/* If we haven't retrieved the BIOS drive and partition numbers above, do it now */
if (PartitionNumber == 0)
{
/* Retrieve the BIOS drive and partition numbers */
if (!DissectArcPath(BootPath, NULL, &DriveNumber, &PartitionNumber))
{
/* This is not a fatal failure, but just an inconvenience: display a message */
TRACE("DissectArcPath(%s) failed to retrieve BIOS drive and partition numbers.\n", BootPath);
}
}
/* Get the kernel name */
LinuxKernelName = GetArgumentValue(Argc, Argv, "Kernel");
if (!LinuxKernelName || !*LinuxKernelName)
@ -240,9 +238,22 @@ LoadAndBootLinux(
goto LinuxBootFailed;
}
// If the default root device is set to FLOPPY (0000h), change to /dev/fd0 (0200h)
if (LinuxBootSector->RootDevice == 0x0000)
LinuxBootSector->RootDevice = 0x0200;
/*
* If the default root device is set to FLOPPY (0000h), change to /dev/fd0 (0200h).
* For a list of majors, see
* https://github.com/torvalds/linux/blob/master/include/uapi/linux/major.h
* For some examples of (decoded) root devices values, see
* https://github.com/torvalds/linux/blob/cc89c63e2/include/linux/root_dev.h
*
* NOTE: The RootDevice field is deprecated since commits
* https://github.com/torvalds/linux/commit/079f85e62
* https://github.com/torvalds/linux/commit/7448e8e5d
*/
#define NODEV 0
#define FLOPPY_MAJOR 2
#define makedev(maj, min) (((maj) << 8) | (min))
if (LinuxBootSector->RootDevice == NODEV)
LinuxBootSector->RootDevice = makedev(FLOPPY_MAJOR, 0);
if (LinuxSetupSector->Version >= 0x0202)
{
@ -271,8 +282,7 @@ LoadAndBootLinux(
BootLinuxKernel(LinuxKernelSize, LinuxKernelLoadAddress,
(LinuxSetupSector->LoadFlags & LINUX_FLAG_LOAD_HIGH)
? (PVOID)LINUX_KERNEL_LOAD_ADDRESS /* == 0x100000 */
: (PVOID)0x10000,
DriveNumber, PartitionNumber);
: (PVOID)0x10000);
/* Must not return! */
return ESUCCESS;

View File

@ -23,26 +23,44 @@
#include <freeldr.h>
#include <debug.h>
DBG_DEFAULT_CHANNEL(DISK);
/* FUNCTIONS ******************************************************************/
static ARC_STATUS
LoadBootSector(
IN ULONG Argc,
IN PCHAR Argv[],
OUT PUCHAR DriveNumber,
OUT PULONG PartitionNumber)
/**
* @brief
* Loads and boots a disk MBR, a partition VBR or a file boot sector.
**/
ARC_STATUS
LoadAndBootSector(
_In_ ULONG Argc,
_In_ PCHAR Argv[],
_In_ PCHAR Envp[])
{
ARC_STATUS Status;
PCSTR ArgValue;
PCSTR BootPath;
PCSTR FileName;
UCHAR BiosDriveNumber = 0;
ULONG PartitionNumber = 0;
ULONG LoadAddress;
ULONG FileId;
ULONG BytesRead;
CHAR ArcPath[MAX_PATH];
ULONG LoadAddress;
*DriveNumber = 0;
*PartitionNumber = 0;
#if DBG
/* Ensure the boot type is the one expected */
ArgValue = GetArgumentValue(Argc, Argv, "BootType");
if (!ArgValue || !*ArgValue || _stricmp(ArgValue, "BootSector") != 0)
{
ERR("Unexpected boot type '%s', aborting\n", ArgValue ? ArgValue : "n/a");
return EINVAL;
}
#endif
/* Find all the message box settings and run them */
UiShowMessageBoxesInArgv(Argc, Argv);
/*
* Check whether we have a "BootPath" value (takes precedence
@ -57,24 +75,13 @@ LoadBootSector(
ArgValue = GetArgumentValue(Argc, Argv, "BootDrive");
if (ArgValue && *ArgValue)
{
*DriveNumber = DriveMapGetBiosDriveNumber(ArgValue);
BiosDriveNumber = DriveMapGetBiosDriveNumber(ArgValue);
/* Retrieve the boot partition (not optional and cannot be zero) */
*PartitionNumber = 0;
/* Retrieve the boot partition (optional, fall back to zero otherwise) */
PartitionNumber = 0;
ArgValue = GetArgumentValue(Argc, Argv, "BootPartition");
if (ArgValue && *ArgValue)
*PartitionNumber = atoi(ArgValue);
if (*PartitionNumber == 0)
{
UiMessageBox("Boot partition cannot be 0!");
return EINVAL;
}
/* Construct the corresponding ARC path */
ConstructArcPath(ArcPath, "", *DriveNumber, *PartitionNumber);
*strrchr(ArcPath, '\\') = ANSI_NULL; // Trim the trailing path separator.
BootPath = ArcPath;
PartitionNumber = atoi(ArgValue);
}
else
{
@ -83,268 +90,122 @@ LoadBootSector(
}
}
/* Retrieve the file name */
FileName = GetArgumentValue(Argc, Argv, "BootSectorFile");
if (!FileName || !*FileName)
{
UiMessageBox("Boot sector file not specified for selected OS!");
return EINVAL;
}
/* Open the boot sector file */
Status = FsOpenFile(FileName, BootPath, OpenReadOnly, &FileId);
if (Status != ESUCCESS)
{
UiMessageBox("Unable to open %s", FileName);
return Status;
}
#if defined(SARCH_PC98)
LoadAddress = Pc98GetBootSectorLoadAddress(*DriveNumber);
#else
LoadAddress = 0x7C00;
#endif
/* Now try to load the boot sector. If this fails then abort. */
Status = ArcRead(FileId, UlongToPtr(LoadAddress), 512, &BytesRead);
ArcClose(FileId);
if ((Status != ESUCCESS) || (BytesRead != 512))
{
UiMessageBox("Unable to load boot sector.");
return EIO;
}
/* Check for validity */
if (*(USHORT*)UlongToPtr(LoadAddress + 0x1FE) != 0xAA55)
{
UiMessageBox("Invalid boot sector magic (0xaa55)");
return ENOEXEC;
}
/* Reset the drive and partition numbers so as to use their default values */
*DriveNumber = 0;
*PartitionNumber = 0;
return ESUCCESS;
}
static ARC_STATUS
LoadPartitionOrDrive(
IN OUT PUCHAR DriveNumber,
IN OUT PULONG PartitionNumber,
IN PCSTR BootPath OPTIONAL)
{
ARC_STATUS Status;
ULONG FileId;
ULONG BytesRead;
CHAR ArcPath[MAX_PATH];
ULONG LoadAddress;
/*
* The ARC "BootPath" value takes precedence over
* both the DriveNumber and PartitionNumber options.
* both the BiosDriveNumber and PartitionNumber options.
*/
if (BootPath && *BootPath)
{
PCSTR FileName = NULL;
/*
* Retrieve the BIOS drive and partition numbers; verify also that the
* path is "valid" in the sense that it must not contain any file name.
*/
if (!DissectArcPath(BootPath, &FileName, DriveNumber, PartitionNumber) ||
FileName = NULL;
if (!DissectArcPath(BootPath, &FileName, &BiosDriveNumber, &PartitionNumber) ||
(FileName && *FileName))
{
UiMessageBox("Currently unsupported BootPath value:\n%s", BootPath);
return EINVAL;
}
}
else
{
/* We don't have one, so construct the corresponding ARC path */
ConstructArcPath(ArcPath, "", *DriveNumber, *PartitionNumber);
ConstructArcPath(ArcPath, "", BiosDriveNumber, PartitionNumber);
*strrchr(ArcPath, '\\') = ANSI_NULL; // Trim the trailing path separator.
BootPath = ArcPath;
}
/* Open the volume */
Status = ArcOpen((PSTR)BootPath, OpenReadOnly, &FileId);
FileName = NULL;
if (strstr(BootPath, ")partition()") || strstr(BootPath, ")partition(0)"))
{
/*
* The partition specifier is zero i.e. the device is accessed
* in an unpartitioned fashion, do not retrieve a file name.
*
* NOTE: If we access a floppy drive, we would not have a
* partition specifier, and PartitionNumber would be == 0,
* so don't check explicitly for PartitionNumber because
* we want to retrieve a file name.
*/
}
else
{
/* Retrieve the file name, if any, and normalize
* the pointer to make subsequent tests simpler */
FileName = GetArgumentValue(Argc, Argv, "BootSectorFile");
if (FileName && !*FileName)
FileName = NULL;
}
/* If we load a boot sector file, reset the drive number
* so as to use the original boot drive/partition */
if (FileName)
BiosDriveNumber = 0;
if (!BiosDriveNumber)
{
BiosDriveNumber = FrldrBootDrive;
PartitionNumber = FrldrBootPartition;
}
/* Open the boot sector file or the volume */
if (FileName)
Status = FsOpenFile(FileName, BootPath, OpenReadOnly, &FileId);
else
Status = ArcOpen((PSTR)BootPath, OpenReadOnly, &FileId);
if (Status != ESUCCESS)
{
UiMessageBox("Unable to open %s", BootPath);
UiMessageBox("Unable to open %s", FileName ? FileName : BootPath);
return Status;
}
#if defined(SARCH_PC98)
LoadAddress = Pc98GetBootSectorLoadAddress(*DriveNumber);
LoadAddress = Pc98GetBootSectorLoadAddress(BiosDriveNumber);
#else
LoadAddress = 0x7C00;
#endif
/*
* Now try to load the partition boot sector or the MBR (when PartitionNumber == 0).
* If this fails then abort.
* Now try to load the boot sector: disk MBR (when PartitionNumber == 0),
* partition VBR or boot sector file. If this fails, abort.
*/
Status = ArcRead(FileId, UlongToPtr(LoadAddress), 512, &BytesRead);
ArcClose(FileId);
if ((Status != ESUCCESS) || (BytesRead != 512))
{
if (*PartitionNumber != 0)
UiMessageBox("Unable to load partition's boot sector.");
PCSTR WhatFailed;
if (FileName)
WhatFailed = "boot sector file";
else if (PartitionNumber != 0)
WhatFailed = "partition's boot sector";
else
UiMessageBox("Unable to load MBR boot sector.");
WhatFailed = "MBR boot sector";
UiMessageBox("Unable to load %s.", WhatFailed);
return EIO;
}
/* Check for validity */
if (*(USHORT*)UlongToPtr(LoadAddress + 0x1FE) != 0xAA55)
{
UiMessageBox("Invalid boot sector magic (0xaa55)");
UiMessageBox("Invalid boot sector magic (0xAA55)");
return ENOEXEC;
}
return ESUCCESS;
}
static ARC_STATUS
LoadPartition(
IN ULONG Argc,
IN PCHAR Argv[],
OUT PUCHAR DriveNumber,
OUT PULONG PartitionNumber)
{
PCSTR ArgValue;
PCSTR BootPath;
*DriveNumber = 0;
*PartitionNumber = 0;
/*
* Check whether we have a "BootPath" value (takes precedence
* over both "BootDrive" and "BootPartition").
*/
BootPath = GetArgumentValue(Argc, Argv, "BootPath");
if (!BootPath || !*BootPath)
{
/* We don't have one */
/* Retrieve the boot drive */
ArgValue = GetArgumentValue(Argc, Argv, "BootDrive");
if (!ArgValue || !*ArgValue)
{
UiMessageBox("Boot drive not specified for selected OS!");
return EINVAL;
}
*DriveNumber = DriveMapGetBiosDriveNumber(ArgValue);
/* Retrieve the boot partition (optional, fall back to zero otherwise) */
*PartitionNumber = 0;
ArgValue = GetArgumentValue(Argc, Argv, "BootPartition");
if (ArgValue && *ArgValue)
*PartitionNumber = atoi(ArgValue);
}
return LoadPartitionOrDrive(DriveNumber, PartitionNumber, BootPath);
}
static ARC_STATUS
LoadDrive(
IN ULONG Argc,
IN PCHAR Argv[],
OUT PUCHAR DriveNumber,
OUT PULONG PartitionNumber)
{
PCSTR ArgValue;
PCSTR BootPath;
*DriveNumber = 0;
*PartitionNumber = 0;
/* Check whether we have a "BootPath" value (takes precedence over "BootDrive") */
BootPath = GetArgumentValue(Argc, Argv, "BootPath");
if (BootPath && *BootPath)
{
/*
* We have one, check that it does not contain any
* "partition()" specification, and fail if so.
*/
if (strstr(BootPath, ")partition("))
{
UiMessageBox("Invalid 'BootPath' value!");
return EINVAL;
}
}
else
{
/* We don't, retrieve the boot drive value instead */
ArgValue = GetArgumentValue(Argc, Argv, "BootDrive");
if (!ArgValue || !*ArgValue)
{
UiMessageBox("Boot drive not specified for selected OS!");
return EINVAL;
}
*DriveNumber = DriveMapGetBiosDriveNumber(ArgValue);
}
return LoadPartitionOrDrive(DriveNumber, PartitionNumber, BootPath);
}
ARC_STATUS
LoadAndBootDevice(
IN ULONG Argc,
IN PCHAR Argv[],
IN PCHAR Envp[])
{
ARC_STATUS Status;
PCSTR ArgValue;
UCHAR Type;
UCHAR DriveNumber = 0;
ULONG PartitionNumber = 0;
/* Retrieve the (mandatory) boot type */
ArgValue = GetArgumentValue(Argc, Argv, "BootType");
if (!ArgValue || !*ArgValue)
return EINVAL;
if (_stricmp(ArgValue, "Drive") == 0)
Type = 1;
else if (_stricmp(ArgValue, "Partition") == 0)
Type = 2;
else if (_stricmp(ArgValue, "BootSector") == 0)
Type = 3;
else
return EINVAL;
/* Find all the message box settings and run them */
UiShowMessageBoxesInArgv(Argc, Argv);
/* Load the corresponding device */
switch (Type)
{
case 1:
Status = LoadDrive(Argc, Argv, &DriveNumber, &PartitionNumber);
break;
case 2:
Status = LoadPartition(Argc, Argv, &DriveNumber, &PartitionNumber);
break;
case 3:
Status = LoadBootSector(Argc, Argv, &DriveNumber, &PartitionNumber);
break;
default:
return EINVAL;
}
if (Status != ESUCCESS)
return Status;
UiUnInitialize("Booting...");
IniCleanup();
#ifndef UEFIBOOT
/* Boot the loaded sector code */
ChainLoadBiosBootSectorCode(DriveNumber, PartitionNumber);
ChainLoadBiosBootSectorCode(BiosDriveNumber, PartitionNumber);
#endif
/* Must not return! */
return ESUCCESS;
}
#endif /* _M_IX86 || _M_AMD64 */
/* EOF */

View File

@ -346,7 +346,8 @@ Amd64SetupIdt(PVOID IdtBase)
}
VOID
WinLdrSetProcessorContext(void)
WinLdrSetProcessorContext(
_In_ USHORT OperatingSystemVersion)
{
TRACE("WinLdrSetProcessorContext\n");

View File

@ -249,7 +249,8 @@ MempAllocatePageTables(VOID)
}
VOID
WinLdrSetProcessorContext(VOID)
WinLdrSetProcessorContext(
_In_ USHORT OperatingSystemVersion)
{
ARM_CONTROL_REGISTER ControlRegister;
ARM_TTB_REGISTER TtbRegister;

View File

@ -245,7 +245,7 @@ MempSetupPaging(IN PFN_NUMBER StartPage,
}
PhysicalPT[Page & 0x3ff].PageFrameNumber = Page;
PhysicalPT[Page & 0x3ff].Valid = (Page != 0);
PhysicalPT[Page & 0x3ff].Valid = 1;
PhysicalPT[Page & 0x3ff].Write = (Page != 0);
if (KernelMapping)
@ -429,7 +429,8 @@ void WinLdrSetupMachineDependent(PLOADER_PARAMETER_BLOCK LoaderBlock)
VOID
WinLdrSetProcessorContext(void)
WinLdrSetProcessorContext(
_In_ USHORT OperatingSystemVersion)
{
GDTIDT GdtDesc, IdtDesc, OldIdt;
PKGDTENTRY pGdt;
@ -526,15 +527,19 @@ WinLdrSetProcessorContext(void)
* Longhorn/Vista reports LimitLow == 0x0fff == MM_PAGE_SIZE - 1, whereas
* Windows 7+ uses larger sizes there (not aligned on a page boundary).
*/
#if 1
/* Server 2003 way */
KiSetGdtEntryEx(KiGetGdtEntry(pGdt, KGDT_R0_PCR), (ULONG32)Pcr, 0x1,
TYPE_DATA, DPL_SYSTEM, TRUE, 2);
#else
/* Vista+ way */
KiSetGdtEntry(KiGetGdtEntry(pGdt, KGDT_R0_PCR), (ULONG32)Pcr, MM_PAGE_SIZE - 1,
TYPE_DATA, DPL_SYSTEM, 2);
#endif
if (OperatingSystemVersion < _WIN32_WINNT_VISTA)
{
/* Server 2003 way */
KiSetGdtEntryEx(KiGetGdtEntry(pGdt, KGDT_R0_PCR), (ULONG32)Pcr, 0x1,
TYPE_DATA, DPL_SYSTEM, TRUE, 2);
}
else
{
/* Vista+ way */
KiSetGdtEntry(KiGetGdtEntry(pGdt, KGDT_R0_PCR), (ULONG32)Pcr, MM_PAGE_SIZE - 1,
TYPE_DATA, DPL_SYSTEM, 2);
}
// DumpGDTEntry(GdtDesc.Base, KGDT_R0_PCR);
/* KGDT_R3_TEB (0x38) Thread Environment Block Selector (Ring 3) */

View File

@ -255,6 +255,15 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
// FIXME: Extension->AcpiTableSize;
}
if (VersionToBoot >= _WIN32_WINNT_VISTA)
{
Extension->BootViaWinload = 1;
Extension->LoaderPerformanceData = PaToVa(&WinLdrSystemBlock->LoaderPerformanceData);
InitializeListHead(&Extension->BootApplicationPersistentData);
List_PaToVa(&Extension->BootApplicationPersistentData);
}
#ifdef _M_IX86
/* Set headless block pointer */
if (WinLdrTerminalConnected)
@ -999,6 +1008,10 @@ LoadAndBootWindows(
{
OperatingSystemVersion = _WIN32_WINNT_NT4;
}
else if (_stricmp(ArgValue, "WindowsVista") == 0)
{
OperatingSystemVersion = _WIN32_WINNT_VISTA;
}
else
{
ERR("Unknown 'BootType' value '%s', aborting!\n", ArgValue);
@ -1245,7 +1258,7 @@ LoadAndBootWindowsCommon(
WinLdrSetupMemoryLayout(LoaderBlock);
/* Set processor context */
WinLdrSetProcessorContext();
WinLdrSetProcessorContext(OperatingSystemVersion);
/* Save final value of LoaderPagesSpanned */
LoaderBlock->Extension->LoaderPagesSpanned = LoaderPagesSpanned;

View File

@ -58,6 +58,7 @@ typedef struct _LOADER_SYSTEM_BLOCK
CHAR NtBootPathName[MAX_PATH+1];
CHAR NtHalPathName[MAX_PATH+1];
ARC_DISK_INFORMATION ArcDiskInformation;
LOADER_PERFORMANCE_DATA LoaderPerformanceData;
} LOADER_SYSTEM_BLOCK, *PLOADER_SYSTEM_BLOCK;
extern PLOADER_SYSTEM_BLOCK WinLdrSystemBlock;
@ -164,7 +165,8 @@ VOID
WinLdrSetupMachineDependent(PLOADER_PARAMETER_BLOCK LoaderBlock);
VOID
WinLdrSetProcessorContext(VOID);
WinLdrSetProcessorContext(
_In_ USHORT OperatingSystemVersion);
// arch/xxx/winldr.c
BOOLEAN

View File

@ -185,7 +185,7 @@ WinLdrSetupMemoryLayout(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock)
PPAGE_LOOKUP_TABLE_ITEM MemoryMap;
ULONG LastPageType;
//PKTSS Tss;
//BOOLEAN Status;
BOOLEAN Status;
/* Cleanup heap */
FrLdrHeapCleanupAll();
@ -229,15 +229,14 @@ WinLdrSetupMemoryLayout(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock)
MemoryMapSizeInPages = (NoEntries * sizeof(PAGE_LOOKUP_TABLE_ITEM) + MM_PAGE_SIZE - 1) / MM_PAGE_SIZE;
TRACE("Got memory map with %d entries\n", NoEntries);
#if 0
// Always contiguously map low 1Mb of memory
Status = MempSetupPaging(0, 0x100, FALSE);
// Always map first page of memory
Status = MempSetupPaging(0, 1, FALSE);
if (!Status)
{
ERR("Error during MempSetupPaging of low 1Mb\n");
ERR("Error during MempSetupPaging of first page\n");
return FALSE;
}
#endif
/* Before creating the map, we need to map pages to kernel mode */
LastPageIndex = 1;

View File

@ -359,52 +359,50 @@ VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar
VOID TuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom)
{
PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer;
ULONG Idx;
ULONG i;
BOOLEAN RightShadow = (Right < (UiScreenWidth - 1));
BOOLEAN DoubleRightShadow = ((Right + 1) < (UiScreenWidth - 1));
BOOLEAN BottomShadow = (Bottom < (UiScreenHeight - 1));
BOOLEAN DoubleWidth = (UiScreenHeight < 34);
/* Cap the right and bottom borders */
Right = min(Right, UiScreenWidth - 1);
Bottom = min(Bottom, UiScreenHeight - 1);
/* Shade the bottom of the area */
if (Bottom < (UiScreenHeight - 1))
if (BottomShadow)
{
if (UiScreenHeight < 34)
Idx = Left + 2;
else
Idx = Left + 1;
for (; Idx <= Right; ++Idx)
i = Left + (DoubleWidth ? 2 : 1);
for (; i <= Right; ++i)
{
ScreenMemory[(((Bottom+1)*2)*UiScreenWidth)+(Idx*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
ScreenMemory[(((Bottom+1)*2)*UiScreenWidth)+(i*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
}
}
/* Shade the right of the area */
if (Right < (UiScreenWidth - 1))
if (RightShadow)
{
for (Idx=Top+1; Idx<=Bottom; Idx++)
for (i = Top + 1; i <= Bottom; ++i)
{
ScreenMemory[((Idx*2)*UiScreenWidth)+((Right+1)*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
ScreenMemory[((i*2)*UiScreenWidth)+((Right+1)*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
}
}
if (UiScreenHeight < 34)
if (DoubleWidth && DoubleRightShadow)
{
if ((Right + 1) < (UiScreenWidth - 1))
for (i = Top + 1; i <= Bottom; ++i)
{
for (Idx=Top+1; Idx<=Bottom; Idx++)
{
ScreenMemory[((Idx*2)*UiScreenWidth)+((Right+2)*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
}
ScreenMemory[((i*2)*UiScreenWidth)+((Right+2)*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
}
}
/* Shade the bottom right corner */
if ((Right < (UiScreenWidth - 1)) && (Bottom < (UiScreenHeight - 1)))
if (RightShadow && BottomShadow)
{
ScreenMemory[(((Bottom+1)*2)*UiScreenWidth)+((Right+1)*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
}
if (UiScreenHeight < 34)
if (DoubleWidth && DoubleRightShadow && BottomShadow)
{
if (((Right + 1) < (UiScreenWidth - 1)) && (Bottom < (UiScreenHeight - 1)))
{
ScreenMemory[(((Bottom+1)*2)*UiScreenWidth)+((Right+2)*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
}
ScreenMemory[(((Bottom+1)*2)*UiScreenWidth)+((Right+2)*2)+1] = ATTR(COLOR_GRAY, COLOR_BLACK);
}
}
@ -603,7 +601,7 @@ VOID TuiUpdateDateTime(VOID)
/* Build the time string in format: "h:mm:ss tt" */
RtlStringCbPrintfA(Buffer, sizeof(Buffer),
" %d:%02d:%02d %s",
" %d:%02d:%02d %s",
TimeInfo->Hour,
TimeInfo->Minute,
TimeInfo->Second,
@ -666,7 +664,7 @@ TuiDrawMsgBoxCommon(
_Out_ PSMALL_RECT MsgBoxRect)
{
INT width = 8;
ULONG height = 1;
INT height = 1;
INT curline = 0;
INT k;
size_t i, j;
@ -696,11 +694,26 @@ TuiDrawMsgBoxCommon(
j++;
}
/* Calculate box area */
x1 = (UiScreenWidth - (width+2))/2;
x2 = x1 + width + 3;
y1 = ((UiScreenHeight - height - 2)/2) + 1;
y2 = y1 + height + 4;
/* Account for the message box margins & bottom button/edit box */
width += 4; // Border & space on left and right.
height += 5; // Border on top and bottom, plus 3 lines for button/edit box.
/* Calculate the centered box area, also ensuring that the top-left
* corner is always visible if the borders are partly off-screen */
x1 = (UiScreenWidth - min(width, UiScreenWidth)) / 2;
if (UiCenterMenu && (height <= UiScreenHeight - TUI_TITLE_BOX_CHAR_HEIGHT - 1))
{
/* Exclude the header and the status bar */
// y1 = (UiScreenHeight - TUI_TITLE_BOX_CHAR_HEIGHT - 1 - height) / 2
// + TUI_TITLE_BOX_CHAR_HEIGHT;
y1 = (UiScreenHeight + TUI_TITLE_BOX_CHAR_HEIGHT - 1 - height) / 2;
}
else
{
y1 = (UiScreenHeight - min(height, UiScreenHeight)) / 2;
}
x2 = x1 + width - 1;
y2 = y1 + height - 1;
MsgBoxRect->Left = x1; MsgBoxRect->Right = x2;
MsgBoxRect->Top = y1; MsgBoxRect->Bottom = y2;

View File

@ -151,7 +151,6 @@ TuiCalcMenuBoxSize(
/* Height is the menu item count plus 2 (top border & bottom border) */
Height = MenuInfo->MenuItemCount + 2;
Height -= 1; // Height is zero-based
/* Loop every item */
for (i = 0; i < MenuInfo->MenuItemCount; ++i)
@ -160,20 +159,30 @@ TuiCalcMenuBoxSize(
if (MenuInfo->MenuItemList[i])
{
Length = (ULONG)strlen(MenuInfo->MenuItemList[i]);
if (Length > Width) Width = Length;
Width = max(Width, Length);
}
}
/* Allow room for left & right borders, plus 8 spaces on each side */
Width += 18;
/* Allow room for left & right borders, plus 4 spaces on each side */
Width += 10;
/* Check if we're drawing a centered menu */
if (UiCenterMenu)
{
/* Calculate the menu box area for a centered menu */
MenuInfo->Left = (UiScreenWidth - Width) / 2;
MenuInfo->Top = (((UiScreenHeight - TUI_TITLE_BOX_CHAR_HEIGHT) -
Height) / 2) + TUI_TITLE_BOX_CHAR_HEIGHT;
/* Calculate the centered menu box area, also ensuring that the top-left
* corner is always visible if the borders are partly off-screen */
MenuInfo->Left = (UiScreenWidth - min(Width, UiScreenWidth)) / 2;
if (Height <= UiScreenHeight - TUI_TITLE_BOX_CHAR_HEIGHT - 1)
{
/* Exclude the header and the status bar */
// MenuInfo->Top = (UiScreenHeight - TUI_TITLE_BOX_CHAR_HEIGHT - 1 - Height) / 2
// + TUI_TITLE_BOX_CHAR_HEIGHT;
MenuInfo->Top = (UiScreenHeight + TUI_TITLE_BOX_CHAR_HEIGHT - 1 - Height) / 2;
}
else
{
MenuInfo->Top = (UiScreenHeight - min(Height, UiScreenHeight)) / 2;
}
}
else
{
@ -183,8 +192,8 @@ TuiCalcMenuBoxSize(
}
/* The other margins are the same */
MenuInfo->Right = MenuInfo->Left + Width;
MenuInfo->Bottom = MenuInfo->Top + Height;
MenuInfo->Right = MenuInfo->Left + Width - 1;
MenuInfo->Bottom = MenuInfo->Top + Height - 1;
}
VOID

View File

@ -360,10 +360,10 @@ UiMessageBox(
_In_ PCSTR Format, ...)
{
va_list ap;
CHAR Buffer[256];
CHAR Buffer[1024];
va_start(ap, Format);
vsnprintf(Buffer, sizeof(Buffer) - sizeof(CHAR), Format, ap);
_vsnprintf(Buffer, sizeof(Buffer) - sizeof(CHAR), Format, ap);
UiVtbl.MessageBox(Buffer);
va_end(ap);
}

View File

@ -62,6 +62,9 @@ set_subsystem(ntdll console)
################# END HACK #################
target_link_libraries(ntdll csrlib rtl rtl_um rtl_vista ntdllsys libcntpr uuid ${PSEH_LIB})
if(DLL_EXPORT_VERSION GREATER_EQUAL 0x600)
target_link_libraries(ntdll cryptlib)
endif()
if (STACK_PROTECTOR)
target_sources(ntdll PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>)

View File

@ -10,9 +10,9 @@
@ stdcall -arch=i386 ExpInterlockedPopEntrySListEnd()
@ stdcall -arch=i386 ExpInterlockedPopEntrySListFault()
@ stdcall -arch=i386 ExpInterlockedPopEntrySListResume()
@ stdcall -stub -version=0x600+ A_SHAFinal(ptr ptr)
@ stdcall -stub -version=0x600+ A_SHAInit(ptr)
@ stdcall -stub -version=0x600+ A_SHAUpdate(ptr ptr long)
@ stdcall -version=0x600+ A_SHAFinal(ptr ptr)
@ stdcall -version=0x600+ A_SHAInit(ptr)
@ stdcall -version=0x600+ A_SHAUpdate(ptr ptr long)
@ stdcall -stub -version=0x600+ AlpcAdjustCompletionListConcurrencyCount(ptr long)
@ stdcall -stub -version=0x600+ AlpcFreeCompletionListMessage(ptr ptr)
@ stdcall -stub -version=0x600+ AlpcGetCompletionListLastMessageInformation(ptr ptr ptr)
@ -191,12 +191,12 @@
@ stub -version=0x600+ LdrpResGetMappingSize
@ stub -version=0x600+ LdrpResGetRCConfig
@ stub -version=0x600+ LdrpResGetResourceDirectory
@ stdcall -stub -version=0x600+ MD4Final(ptr)
@ stdcall -stub -version=0x600+ MD4Init(ptr)
@ stdcall -stub -version=0x600+ MD4Update(ptr ptr long)
@ stdcall -stub -version=0x600+ MD5Final(ptr)
@ stdcall -stub -version=0x600+ MD5Init(ptr)
@ stdcall -stub -version=0x600+ MD5Update(ptr ptr long)
@ stdcall -version=0x600+ MD4Final(ptr)
@ stdcall -version=0x600+ MD4Init(ptr)
@ stdcall -version=0x600+ MD4Update(ptr ptr long)
@ stdcall -version=0x600+ MD5Final(ptr)
@ stdcall -version=0x600+ MD5Init(ptr)
@ stdcall -version=0x600+ MD5Update(ptr ptr long)
@ extern NlsAnsiCodePage
@ extern NlsMbCodePageTag
@ extern NlsMbOemCodePageTag

View File

@ -27,6 +27,9 @@
#ifndef _MSC_VER
#ifdef __REACTOS__
#define __cpuidex __cpuidex_ // prevent redeclaration
#endif
#include <cpuid.h>
#else
#include <intrin.h>

View File

@ -3,7 +3,7 @@
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2018 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
* Copyright 2023-2024 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_DEFAULT
@ -11,50 +11,50 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_DEFAULT
IDD_POWER_METER DIALOGEX 0, 0, 252, 218
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Consum de energie"
CAPTION "Contor"
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "Stare", 1001, "Button", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 9, 20, 234, 189
CONTROL "&Afișează pictogramă în bara de activități.", 1002, "Button", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 6, 6, 120, 10
CONTROL "Afișează detalii pentru fiecare &baterie.", 1003, "Button", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 135, 6, 120, 8
CONTROL "Stare încărcare", 1001, "Button", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 9, 20, 234, 189
CONTROL "&Afişare pictograme pe bara de activităţi.", 1002, "Button", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 6, 6, 120, 10
CONTROL "Se afişează detalii pentru fiecare &baterie.", 1003, "Button", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 135, 6, 120, 8
CONTROL "", 1000, "Static", SS_LEFT | WS_CHILD | WS_GROUP, 11, 29, 229, 178
END
STRINGTABLE
BEGIN
//Power related strings
IDS_PWR_PROPERTIES "&Ajustare proprietăți de consum energie"
IDS_PWR_METER "&Deschide Contor de energie"
IDS_PWR_PROPERTIES "&Reglare proprietăţi alimentare"
IDS_PWR_METER "&Deschidere Contor"
IDS_PWR_RUN "shell32.dll,Control_RunDLL PowerCfg.cpl"
IDS_PWR_PERCENT_REMAINING "Au mai rămas %u%%"
IDS_PWR_CHARGING "%u%% and charging"
IDS_PWR_UNKNOWN_REMAINING "Nu este disponibil cât a mai rămas"
IDS_PWR_AC "În rețea de CA"
IDS_PWR_HOURS_REMAINING "Au mai rămas %1!u!:%2!02u! ore (%3!u!%%)"
IDS_PWR_MINUTES_REMAINING "Au mai rămas %1!u! min (%2!u!%%)"
IDS_PWR_PERCENT_REMAINING "%u%% rămase"
IDS_PWR_CHARGING "%u%% și se încarcă"
IDS_PWR_UNKNOWN_REMAINING "Nu se ştie cât a mai rămas"
IDS_PWR_AC "Când există sursă CA"
IDS_PWR_HOURS_REMAINING "%1!u!:%2!02u! ore (%3!u!%%) rămase"
IDS_PWR_MINUTES_REMAINING "%1!u! minute (%2!u!%%) rămase"
//Hotplug related strings
IDS_HOTPLUG_REMOVE_1 "Scoate în siguranță acest dispozitiv"
IDS_HOTPLUG_REMOVE_2 "S&coate în siguranță acest dispozitiv"
IDS_HOTPLUG_REMOVE_3 "Scoate în siguranță %s"
IDS_HOTPLUG_REMOVE_1 "Eliminarea în siguranţă a unui dispozitiv hardware"
IDS_HOTPLUG_REMOVE_2 "&Eliminarea în siguranţă a unui dispozitiv hardware"
IDS_HOTPLUG_REMOVE_3 "Eliminare în siguranţă a %s"
IDS_HOTPLUG_RUN "shell32.dll,Control_RunDLL hotplug.dll"
IDS_HOTPLUG_COMMA ", "
IDS_HOTPLUG_DRIVE " - unitate (%s)"
IDS_HOTPLUG_DRIVES " - unități (%s)"
IDS_HOTPLUG_DRIVE " - Unitatea(%s)"
IDS_HOTPLUG_DRIVES " - Unităţile(%s)"
IDS_HOTPLUG_A "A:"
IDS_HOTPLUG_REQUIRES "Acest dispozitiv necesită „Scoatere în siguranță”"
IDS_HOTPLUG_CLICK "Înainte de a scoate acest dispozitiv, apăsați pe această pictogramă și selectați dispozitivul pe care doriți să-l scoateți."
IDS_HOTPLUG_REQUIRES "Acest dispozitiv hardware necesită ""Eliminare în siguranţă"""
IDS_HOTPLUG_CLICK "Înainte de a elimina acest dispozitiv hardware, faceţi clic pe această pictogramă şi selectaţi dispozitivul hardware pe care îl eliminaţi."
//Volume related strings
IDS_VOL_VOLUME "Volum"
IDS_VOL_ADJUST "&Ajustează proprietăți audio"
IDS_VOL_OPEN "&Deschide control de volum"
IDS_VOL_ADJUST "&Reglare proprietăţi audio"
IDS_VOL_OPEN "&Deschidere control volum"
IDS_VOL_RUN "SNDVOL32.EXE"
IDS_VOL_MUTED "Volum (mut)"
//Keyboard-Mouse related strings
IDS_KEYS_STICKY "TasteLipicioase"
IDS_KEYS_MOUSE "TasteMouse"
IDS_KEYS_FILTER "FiltruTaste"
IDS_KEYS_STICKY "TasteAdezive"
IDS_KEYS_MOUSE "TasteMaus"
IDS_KEYS_FILTER "TasteFiltrare"
END

Some files were not shown because too many files have changed in this diff Show More