Commit graph

2977 commits

Author SHA1 Message Date
Victor Perevertkin aa05649902
[SETUPAPI] Do not use strlen on buffers which may possibly contain REG_MULTI_SZ
CORE-14187
2020-12-06 19:49:57 +03:00
Riley Bell 3014417919 [SHELL32] Hide "This version of ReactOS is registered to:" text on condition (#3325)
When the system is not installed yet (e.g. LiveCD or 2nd installation stage)
there is no registered user and organization, so no need to show this text
label in the shell about dialog.

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2020-11-30 03:12:32 +03:00
Oleg Dubinskiy 6bf7f83b2a
[MSGINA] Improve exports for all stubbed functions (#3256)
Since they are completely undocumented and unlikely will be implemented in ROS,
stubbing them only in spec file seems to be a better solution than adding wrong
prototypes.

Use `stdcall -stub` instead of `stub` and enable parameters of the functions.
This allows to properly load our msgina.dll in Windows XP/2003.

Although it still doesn't boot to desktop with dll replaced, but nevertheless
the system crash that was caused by stubbed functions does no longer happen.
2020-11-28 17:32:53 +03:00
Oleg Dubinskiy c0d2cd508f
[MSGINA] Implement ShellTurnOffDialog (#3254)
Based on the following prototype: http://diendan.congdongcviet.com/threads/t13622::tim-handle-cua-cua-so-tat-may-tren-windows-nhu-the-nao.cpp?p=69284#post69284 (line 32) and return ShellShutdownDialog from it with all required parameters.
It allows to open the shutdown dialog properly from the Start menu with shell32.dll from Windows Server 2003 SP2 (when installing ReactOS as Workstation).

CORE-17313
2020-11-28 17:22:46 +03:00
Hermès Bélusca-Maïto 8d3e80e437
[FSLIB][FMIFS][AUTOCHK][SETUPLIB] Use more Windows-compatible (but not fully compatible yet) Format() and Chkdsk() ULIB functions.
[AUTOCHK] Add also support for scanning FATX volumes.

The Format(), FormatEx(), Chkdsk(), ChkdskEx() functions exposed by the
U*.DLL user-mode FS library dlls are different (and have different
prototypes) than the similarly-named functions exported by FMIFS.DLL .

In particular, what we used to call "xxxChkdskEx()" and "xxxFormatEx()"
in our U*.DLL libraries actually correspond more, from their arguments,
to the "Chkdsk()" and "Format()" functions in Windows' U*.DLL . Their
*Ex() counterparts instead take most of the parameters through a
structure passed by pointer.

On FMIFS.DLL side, while FMIFS!Chkdsk() calls U*.DLL!Chkdsk() and
FMIFS!ChkdskEx() calls U*.DLL!ChkdskEx() (and we do not implement these
*Ex() functions at the moment), both FMIFS!Format() and FMIFS!FormatEx()
call U*.DLL!Format() instead, while FMIFS!FormatEx2() calls
U*.DLL!FormatEx() (that we do not implement yet either) !!

To improve that, refactor the calls to these U*.DLL functions so as to
respect the more compatible prototypes: They contain the correct number
of parameters in a compatible order. However, some of the parameters do
not have the same types yet: the strings are kept here in PUNICODE_STRINGS,
while on Windows they are passed via an undocumented DSTRING struct, and
the FMIFS callback is instead a MESSAGE struct/class on Windows.
Finally, the MEDIA_TYPE parameter in U*.DLL!Format() is equivalent, yet
not fully 100% in 1-to-1 correspondence, with the FMIFS_MEDIA_FLAG used
in the corresponding FMIFS.DLL functions.

One thing to notice is that the U*.DLL!Format() (and the Ex) functions
support a BOOLEAN (a flag resp.) for telling that a backwards-compatible
FS version should be used instead of the (default) latest FS version.
This is used e.g. by the FAT FS, where by default FAT32 is selected
(depending also on other constraints like, the disk and the partition
sizes), unless that bit is set in which case, FAT16 (or 12) is used.
2020-11-22 21:57:07 +01:00
Tibor Lajos Füzi 07cc0b5a2b
[TRANSLATION] Hungarian translation update for credui, devmgr, netid, sysdm (#3285) 2020-11-21 18:07:48 +01:00
Aobi Chan CL fc3ccb3948
[TRANSLATION] Improve zh-TW translation (#3218)
- Added zh-TW translation for the following modules: credui, crypt32, getuname, mapi32, themeui, shlwapi.
- Modify zh-TW translation for other files.
- Moving Traditional Chinese translation back to Zh.rc for files came from Wine (comdlg32).

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-11-21 18:03:37 +01:00
Jérôme Gardou 2c4c25e468 [MSVCRT] make some functions static 2020-11-16 16:58:10 +01:00
Serge Gautherie b59bad8d10
[SAMSRV] SamIFree_SAMPR_USER_INFO_BUFFER: Add missing breaks. CORE-17355
Addendum to fda13e (r58742).
2020-11-14 15:23:41 +01:00
Serge Gautherie 3c4d6b0f9e
[SAMSRV] SamrQueryInformationUser: Add missing break. CORE-17355
Addendum to 2f6a92c (r56820).
2020-11-14 15:22:05 +01:00
Timo Kreuzer 8df1bd612a [KERNEL32] Fix register initialization in BaseInitializeContext
Get rid of BaseThreadStartupThunk and BaseProcessStartThunk asm wrappers and go to the C functions directly (home space is allocated on the stack by the kernel)
2020-11-07 18:33:02 +01:00
Timo Kreuzer 2c2c570317 [PSAPI] Fix and simplify FindDeviceDriver
The previous version was miscalculating the buffer size on x64 (due to alignment) and always using a too small buffer.
The new version removes the size calculation entirely and uses the required size returned by NtQuerySystemInformation.
2020-11-07 17:39:42 +01:00
Jose Carlos Jesus 47a350c4db
[SHELL32][SHELLEXT] Portuguese (PT) translation improvements and object adjustements (#3186)
- SHELL32: Improve Portuguese (PT) translation.
Minor objects adjustments to the text
and minor improvements to translation.

- SHELLEXT: Improve Portuguese (PT) translation to acppage rc file.
2020-11-07 17:30:36 +01:00
Hermès Bélusca-Maïto d829bcc629
[WINDOWSCODECS] It turns out that /wd4133 is not enough to demote the error; we need to use remove_target_compile_option() to completely remove the /we4133 flag.
Addendum to commits 7e116f0e and 00ed72d7.

This removes the "error C4133: 'function': incompatible types - from
'WICPixelFormatNumericRepresentation *' to 'DWORD *'"
message that still remains even when using /wd4133 .
2020-11-06 01:06:13 +01:00
Hermès Bélusca-Maïto 3c722e35b1
[CMD][SERVMAN][SHELL32][WINSPOOL][ROSAPPS][NTOS:PNP] Fix my build. 2020-11-06 01:06:11 +01:00
Victor Perevertkin da4ee18cc9
[STORPROP][CDROM_NEW][DISK_NEW] Improve disk and cdrom device installation
- Take a proper inf file for disk.sys
- Add class information into cdrom.inf
- Make a correct stub for storprop!DvdClassInstaller
2020-11-03 23:12:40 +03:00
Timo Kreuzer 2a8c680dbe [NTOS:KE:X64][NTDLL:X64] Implement KiUserExceptionDispatcher and fix KiDispatchExceptionToUser 2020-10-31 14:23:16 +01:00
Timo Kreuzer fdc1261fb7 [NTOS:KE:X64][NTDLL:X64] Implement x64 version of user callback code 2020-10-31 14:23:16 +01:00
Carlo Bramini 4ffd9fb3a0
[DBGHELP] Add missing support for AMD64. (#3083)
See:
https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-context
2020-10-25 12:30:37 +01:00
Oleg Dubinskiy cdb48b8219
[SHELL32] Stub SHGetShellStyleHInstance and SHGetAttributesFromDataObject CORE-17337 (#3295)
They are required by MS Picture and Fax Viewer (shimgvw.dll), together with MS browseui.dll.
CORE-17337
2020-10-24 18:04:54 +03:00
Oleg Dubinskiy d0a7df49fa
[BROWSEUI] CCommonBrowser class should support aggregation (#3308)
It will remove the following error from the log when use MS shell32.dll in ReactOS:
`fixme:(dll/win32/ole32/compobj.c:3454) Class {af604efe-8897-11d1-b944-00a0c90312e1} does not support aggregation`.
References:
https://www.geoffchappell.com/studies/windows/ie/browseui/classes/ccommonbrowser.htm
https://docs.microsoft.com/en-us/cpp/atl/reference/aggregation-and-class-factory-macros?view=vs-2019
CORE-17345
2020-10-24 18:02:18 +03:00
Piotr Hetnarowicz 16d8190f51 [SHELL32] PL-pl Dialogs fix v2
shell32.dll PL-pl
-FIXED: invisible icon,text & description
2020-10-24 10:20:59 +02:00
Serge Gautherie be08d69bc3 [MLANG] Fix scripts values in fnIMLangFontLink2_GetScriptFontInfo()
MSVC:
'...\mlang.c(3568): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)'

Import
2dc0758b5d
2020-10-24 10:17:05 +02:00
Jérôme Gardou 23e04ae1ee [CMAKE] Use an INTERFACE library to perform the msvcrt <-> msvcrtex binding 2020-10-22 18:07:27 +02:00
Jérôme Gardou bada20a361 [APISETS] Declare them as modules instead of win32dll 2020-10-22 18:07:27 +02:00
Jérôme Gardou c321d3e88b [CRTDLL] Make this a stand-alone CRT DLL
Because CRTs must be isolated from each other.
This basically reverts commit f0c91ae
2020-10-22 18:07:27 +02:00
Victor Perevertkin 953c03c336
[DEVMGR] Avoid buffer overflow when device reg key size is > 100 chars 2020-10-22 14:38:55 +03:00
Katayama Hirofumi MZ 6cb3b62b4c [APISETS] Revert 'Try to fix build of both case of MSVC AND CLANG' 2020-10-22 09:18:32 +09:00
Katayama Hirofumi MZ 926ada989c [APISETS] Try to fix build of both case of MSVC AND CLANG 2020-10-22 09:07:15 +09:00
Katayama Hirofumi MZ de8d156e2c
[SHELL32] Resizable for SHBrowseForFolder (#3299)
Make the dialog box of SHBrowseForFolder function resizable. CORE-17341
2020-10-21 22:25:16 +09:00
Jérôme Gardou ab825334dd Apply suggestions from code review
Beautification and clarity

Co-authored-by: Victor Perevertkin <victor@perevertkin.ru>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-10-20 21:44:54 +02:00
Jérôme Gardou c004b53d77 Apply suggestions from code review
Style fixes

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Co-authored-by: Victor Perevertkin <victor@perevertkin.ru>
2020-10-20 21:44:54 +02:00
Jérôme Gardou 00ed72d7e8 [CMAKE] Get rid of add_compile_flags
Use add_compile_options and the like instead
2020-10-20 21:44:54 +02:00
Jérôme Gardou ed61512236 [CMAKE] Get rid of add_compile_flags_language macro
in favor of add_compile_options and the like with generator expressions
Also take this as an opportunity to remove the C++11 standard hack, GCC 8 now defaults to C++14
2020-10-20 21:44:54 +02:00
Jérôme Gardou 7e116f0ef3 [CMAKE] Get rid of replace_compile_flags
Introduce a finer-grained remove_target_compile_option instead
2020-10-20 21:44:54 +02:00
Jérôme Gardou 907025a018 [CMAKE] Introduce the atl_classes interface library
This takes care of adding the relvant include directory and the _ATL_NO_EXCEPTIONS define, if needed
2020-10-20 21:44:54 +02:00
Jérôme Gardou d6ea8659c8 [CMAKE] Get rid of the set_cpp macro
Instead of messing with global variables and the like, we introduce two target properties:
 - WITH_CXX_EXCEPTIONS: if you want to use C++ exceptions
 - WITH_CXX_RTTI: if you need RTTI in your module
You can use the newly introduced set_target_cpp_properties function, with WITH_EXCEPTIONS and WITH_RTTI arguments
We also introduce two libraries :
 - cpprt: for C++ runtime routines
 - cppstl: for the C++ standard template library

NB: On GCC, this requires to create imported libraries with the related built-in libraries:libsupc++, limingwex, libstdc++

Finally, we manage the relevant flags with the ad-hoc generator expressions

So, if you don't need exceptions, nor RTTI, nor use any runtime at all: you simply have nothing else to do than add your C++ file to your module
2020-10-20 21:44:54 +02:00
Katayama Hirofumi MZ 24833a6dde
[BROWSEUI] Implement CLSID_ACListISF (#3298)
Implement enumeration of IShellFolder items of auto-completion. CORE-9281
2020-10-17 17:49:24 +09:00
Jérôme Gardou 68dcd87d38 [WINED3D] Fix build with lower optimization levels 2020-10-15 11:36:01 +02:00
Serge Gautherie ad4c174eb6
[SYSSETUP] fr-FR: Change keyboard accelerator for Owner Organization field (#3282)
'S' is already used for Next ('Suivant') button.
2020-10-08 22:41:33 +02:00
Katayama Hirofumi MZ 957d07436b
[BROWSEUI] Remove '\1' from AutoComplete list (#3264)
Delete "backslash one" (indicates SW_ values) from auto-completion list. CORE-9281
2020-10-06 17:44:20 +09:00
Hermès Bélusca-Maïto d86301f72b
[NTDLL:CSR] Perform more thorough validation of the parameters in CsrAllocateCaptureBuffer().
Complements commit 7e2db773.

- Validate the argument count.

- Validate the total buffer size: the total size of the header plus
  the pointer-offset array and the provided buffer, together with
  the alignment padding for each argument, must be less than MAXLONG
  aligned to 4-byte boundary.
2020-10-05 02:22:45 +02:00
Hermès Bélusca-Maïto b3fa53f818
[NTDLL:CSR] Fix a bug in the calculation of the capture buffer size in CsrAllocateCaptureBuffer().
Take the alignment padding for each argument into account, **BEFORE**
doing the final size alignment on a 4-byte boundary. Thus, the capture
buffer size value is properly aligned, and passes the validation tests
on the server side (in CSRSRV!CsrCaptureArguments), see commit 7e2db773.

This bug was put in evidence in x64 builds where the memory alignments
were more tight than in the x86 builds.
2020-10-05 02:22:43 +02:00
Hirofumi Katayama 14c18657bc [BROWSEUI] Fix assertion in CACLCustomMRU::AddMRUString
CORE-9281
2020-10-05 08:49:42 +09:00
Hirofumi Katayama 179da0b237 [SHLWAPI] Fix parameter ordering at call of AutoComplete_AdaptFlags
CORE-9281
2020-10-05 08:47:21 +09:00
Mark Jansen bac45efe5d [SHELL32][BROWSEUI] Fix usage of ILGetDisplayNameEx 2020-10-04 19:34:20 +02:00
Mark Jansen b3f2ba0522 [BROWSEUI] Show virtual folders in the log for SHOpenFolderWindow 2020-10-04 19:34:20 +02:00
Mark Jansen ca087b6a18 [BROWSEUI] Update the current directory before creating a view
This way, when the view asks for a directory _during creation_ it
does not get either an old, or an invalid directory
CORE-17270
2020-10-04 19:34:20 +02:00
Mark Jansen 7b17d8d900 [BROWSEUI] Remove refactoring leftovers 2020-10-04 19:34:20 +02:00
Joachim Henze 5bb36e92c5 [WDMAUD.DRV] Revert "Workaround multiple issues with AC97 driver from rapps"
This reverts commit 0.4.15-dev-791-g
6d7ebc2048

It was a workaround just. To bypass sysaudio. It had a very positive effect on
our playback performance, but using the different codepaths did also lead to
regressions, that I have no idea how to address, therefore I think it's my
personal responsibility to revert it. I guess it's better to improve on the
code-paths that we intend to use finally, instead of fixing what will
be dead paths in the future.

The revert will fix:
- CORE-17277 crash of dsound:duplex on "GCCLin_x86 on Test VBox"
- CORE-17278 crash of dsound:capture on "GCCLin_x86 on Test VBox"
- CORE-17285 Realtek HD Audio does no longer work in ReactOS

But ofc now we will suffer again from very severe things that the hack could workaround:
- CORE-13202 Unhandled exception from wdmaud.drv when recording sound in Scratch 1.4 leads to app-crash
- CORE-13488 A deadlock in "DiabloII" character selection screen and "The Lion King II"
- CORE-8726/CORE-9986/CORE-16564 AC97 driver from rapps will need reboot-orgies again, does not longer
  work in the same session that we installed the driver
- CORE-9981 "DosBox + Commander Keen6" totally garbled sound output instead of music
    "ScummVM 2.0 with Monkey Island 2" totally garbled sound output instead of music
- the test execution times of "GCCLin_x86 on Test VBox" will almost double
2020-10-03 16:39:13 +02:00