Commit graph

73132 commits

Author SHA1 Message Date
Eric Kohl e4d79e514a [SCHEDSVC] Improvements to the scheduler service
Use WaitForMultipleObjects in the mail scheduler loop:
- Use events to signal service stop and job update events to the main loop.
- Use the timeout timer to start the next job.
2018-10-28 00:04:20 +02:00
Pierre Schweitzer 03294dd097
[NTOSKRNL] Rewrite IoCheckEaBufferValidity() so that it's less magic
And make its coding style consistent with our rules
2018-10-27 22:16:37 +02:00
Katayama Hirofumi MZ 43c78d4b75
[WIN32SS][NTGDI] Refactoring PATH_WidenPath (#888)
Preparation to support pen width.
Split IntGdiWidenPath function from PATH_WidenPath function.
IntGdiWidenPath is independent from DC.
CORE-2527, CORE-13534
2018-10-28 05:13:08 +09:00
Hermès Bélusca-Maïto 7af2f717bc
[SETUPLIB][USETUP] Move the settings code from usetup to setuplib.
This code is moved ther since it'll be needed for 1st-stage GUI
installer as well.

The code dealing with keyboard layouts is however not moved yet,
since it uses MUI* functions from usetup.
I'll try to think how to include that in setuplib...

svn path=/branches/setup_improvements/; revision=75701
2018-10-27 22:09:35 +02:00
Hermès Bélusca-Maïto 6f19c83b96
[SETUPLIB] Move the files that implement utility functions into their own subdirectory. The files remaining in the main directory implement setup procedures that use the utility functions.
svn path=/branches/setup_improvements/; revision=75695
2018-10-27 22:09:34 +02:00
Hermès Bélusca-Maïto 95a34ef6fc
[USETUP][SETUPLIB] Move the bootsup.c code into the setuplib, and perform the necessary adjustments.
Move the bootsup.c code into the setuplib, as the code is generic
enough to be used by both USETUP and the 1st-stage GUI installer.

svn path=/branches/setup_improvements/; revision=75674
2018-10-27 22:09:32 +02:00
Katayama Hirofumi MZ 5467cc9493
[NTUSER] NtUserxSwitchToThisWindow 2nd argument is fAltTab (#989)
Fix the 2nd parameter name of NtUserxSwitchToThisWindow. #988 similiarly.
CORE-15165
2018-10-28 03:27:49 +09:00
Katayama Hirofumi MZ 1f3353ac3b
[WIN32SS] SwitchToThisWindow 2nd argument is fAltTab (#988)
https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-switchtothiswindow
CORE-15165
2018-10-28 03:14:04 +09:00
Katayama Hirofumi MZ 4bd0166e63
[WIN32SS] Move SwitchToThisWindow codes to win32k (#987)
- Implement user32!SwitchToThisWindow by NtUserCallTwoParam TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW.
- Improve user32!CloseWindow with using SetActiveWindow and ShowWindow (synchronized).
CORE-15165
2018-10-28 02:56:16 +09:00
Pierre Schweitzer 07e6af6aa1
[NTOSKRNL] Properly handle "big" security descriptors in ObpCaptureObjectCreateInformation() 2018-10-27 19:36:15 +02:00
Pierre Schweitzer 2ce071d19a
[NTOSKRNL] Implement SeComputeQuotaInformationSize() 2018-10-27 19:36:14 +02:00
Eric Kohl 19cabfc763 [WKSSVC][IDL] Add names of unsupported functions 2018-10-27 19:04:31 +02:00
Eric Kohl 0ce15a8faa [LSASRV][IDL] The first parameter of the Credr* functions is a PLSAPR_SERVER_NAME. 2018-10-27 18:17:35 +02:00
Hermès Bélusca-Maïto 8f2c4f7a6d
[USETUP] Add an AddEntriesFromInfSection() helper that enumerates the entries of a given INF section, and adds these into a (user-allocated) GENERIC_LIST after some pre-processing.
This helper is inspired by the reactos/reactos.c!LoadGenEntry() function.
Use this helper in the different Create*List() functions.

svn path=/branches/setup_improvements/; revision=75700
2018-10-27 18:13:45 +02:00
Hermès Bélusca-Maïto 58e402e08e
[USETUP] Simplify code.
svn path=/branches/setup_improvements/; revision=75698
2018-10-27 18:13:44 +02:00
Hermès Bélusca-Maïto acd933faa0
[USETUP] Formatting fixes only.
svn path=/branches/setup_improvements/; revision=75697
svn path=/branches/setup_improvements/; revision=75699
2018-10-27 18:13:44 +02:00
Hermès Bélusca-Maïto e2a92634e1
[USETUP] Add few checks to forbid the user to attempt installing ReactOS in the installation source directory, or a subdirectory thereof, or to delete the partition containing the installation source.
This is needed because the ReactOS installer can also be present from within a HDD partition!

svn path=/branches/setup_improvements/; revision=75669
2018-10-27 18:13:43 +02:00
Hermès Bélusca-Maïto 959323902f
[USETUP] Group constant strings together. In EventThread(), use RtlReAllocateHeap() to resize the pnp-event buffer.
svn path=/branches/setup_improvements/; revision=75654
2018-10-27 18:13:42 +02:00
Hermès Bélusca-Maïto c560342f08
[SETUPLIB] Diverse fixes (incl. initialization fixes).
- Compute the installation source paths based on the full path of the
  installer program that uses the setup library.
- Add INF_STYLE_OLDNT define in infsupp.h.
- Add some (silenced) diagnostic DPRINTs.

svn path=/branches/setup_improvements/; revision=75667

- Use correct inf style flags in SetupOpenInfFileEx() calls when opening
  txtsetup.sif and unattend.inf. Technically txtsetup.sif would be
  INF_STYLE_WIN4, but since we use "$ReactOS$" as its version signature,
  it would not work when opening it with setupapi.dll functions.
  Hence this flag is combined with INF_STYLE_OLDNT too.

- Don't fail if opening the \SystemRoot symbolic link doesn't work
  (usually due to incorrect access rights); in that case, just use the
  installer image file path as the installation source path.

svn path=/branches/setup_improvements/; revision=75676
2018-10-27 18:13:42 +02:00
Hermès Bélusca-Maïto f1b9c071bb
[SETUPLIB] Code formatting fix.
svn path=/branches/setup_improvements/; revision=75656
2018-10-27 18:13:41 +02:00
Hermès Bélusca-Maïto a80f803a2a
[SETUPLIB] Introduce and use a UnMapAndCloseFile() macro that calls UnMapFile() and NtClose() on handles returned by the OpenAndMapFile() function.
svn path=/branches/setup_improvements/; revision=75651
svn path=/branches/setup_improvements/; revision=75657
2018-10-27 18:13:40 +02:00
Hermès Bélusca-Maïto 29fe31df1b
[SETUPLIB][USETUP] Code refactoring: rename the old DoesPathExist() into DoesDirExist(), and rename the new DoesPathExistEx() back into DoesPathExist().
svn path=/branches/setup_improvements/; revision=75636
2018-10-27 18:13:40 +02:00
Hermès Bélusca-Maïto cc37199dfd
[SETUPLIB] Merge DoesPathExist() and DoesFileExist() into (temporarily called) DoesPathExistEx() function.
And turn the previous two functions into macros.

svn path=/branches/setup_improvements/; revision=75635
svn path=/branches/setup_improvements/; revision=75652
2018-10-27 18:13:39 +02:00
Hermès Bélusca-Maïto 518bea5f99
[SETUPLIB] Factor out and introduce a ParseArcName() helper function that does its job.
Used in exiting code and in later code in this file.

svn path=/branches/setup_improvements/; revision=75632
svn path=/branches/setup_improvements/; revision=75652
2018-10-27 18:13:38 +02:00
Hermès Bélusca-Maïto 1ae3efd738
[SETUPLIB] Code formatting.
svn path=/branches/setup_improvements/; revision=75631
svn path=/branches/setup_improvements/; revision=75652
2018-10-27 18:13:38 +02:00
Hermès Bélusca-Maïto c8d37c1a0d
[SYSSETUP] Use a $winnt$.inf file to retrieve setup information for the 2nd-stage setup.
Following r75518, we use the $winnt$.inf file (created in System32
by the 1st-stage installer) as the setup information file for the
2nd-stage setup for:

- retrieving the installation source media path;
- retrieving the unattended information that was copied from the
  unattend.inf file from the installation source media.

The installation source media path is converted from NT format to
Win32 format for usage with Win32 functions and storage in the registry:
this is done by GetInstallSourceWin32(), which replaces the hackish
GetRosInstallCD() function.

The $winnt$.inf file is also updated, and the registry values "SourcePath"
and "ServicePackSourcePath" are created / updated in:
HKLM\Software\Microsoft\Windows\CurrentVersion\Setup .

svn path=/branches/setup_improvements/; revision=75524
2018-10-27 18:13:38 +02:00
Hermès Bélusca-Maïto 7e248feabf
[USETUP][SETUPLIB] Code refactoring.
- Move several global setup variables into a structure "USETUP_DATA",
  similar to the syssetup structure "SETUPDATA" (or the WIP 1st-stage
  installer structure of the same name), so that these variables can be
  set easily by different helper setup functions;

- Move CheckUnattendedSetup() and GetSourcePaths() to setuplib and make
  CheckUnattendedSetup() use the USETUP_DATA structure;

- Add a LoadSetupInf() function that loads the txtsetup.sif file
  (factoring out the corresponding code in USETUP);

- Add a InstallSetupInfFile() function (that I'll probably rename later on)
  whose purpose is to create a valid "$winnt$.inf" setup installation file
  in the ReactOS\system32 directory, which should help the 2nd-stage installer
  to correctly retrieve the source installation media we used during 1st-stage,
  and contain the unattended setup lines copied from unattend.inf. This is
  done in a Windows-compatible way.

svn path=/branches/setup_improvements/; revision=75518

[USETUP] Close the txtsetup.sif file at the end of the operations.

svn path=/branches/setup_improvements/; revision=75539
2018-10-27 18:13:32 +02:00
Eric Kohl 11500a0033 [IDL] Fix coding style and indentation 2018-10-27 16:34:37 +02:00
Eric Kohl bc08438c7a [IDL] Fix coding style and indentation 2018-10-27 15:48:21 +02:00
Katayama Hirofumi MZ 3a9fe2b1bf
[WIN32SS][USER32] Simplify CloseWindow (#986) 2018-10-27 21:16:02 +09:00
Giannis Adamopoulos e69213448d [BROWSEUI] CInternetToolbar: fix whitespace 2018-10-27 15:08:31 +03:00
Giannis Adamopoulos a2bd9b44a9 [BROWSEUI] Simplify toggling the search band
In windows the toolbar itself creates the search shell extension. In ros we send a command to the CShellBrowser to let it handle it itself. Use the same command for showing and hiding it.
2018-10-27 15:08:28 +03:00
Giannis Adamopoulos a0c5cafce5 [BROWSEUI] Implement toggling the folders and search band with the toolbar and make their buttons appear pressed when they are shown.
CBaseBarSite: Ask the CBaseBar to close itself when the x button is pressed.
CBaseBar: Hide the bar and inform its site that it is closing when it gets the close command.
CShellBrowser: Cache the guid of the current vertical bar and use it to report correct command status to the toolbar.
Also implement toggling the Folders, Favorites, History and search commands.
CInternetToolbar: Query the Folders and Search command status from the site so that they can be properly be shown as pressed.
2018-10-27 15:08:24 +03:00
Katayama Hirofumi MZ 84ae36c78d
[WIN32SS][USER32] Fix #984 (#985)
Sorry, I had to wait the build checks.
2018-10-27 20:32:51 +09:00
Katayama Hirofumi MZ d0e5f4ac11
[WIN32SS][USER32] CloseWindow does minimize, doesn't close (#984)
In Windows, user32!CloseWindow minimizes the window. It doesn't close the window actually. This is not a joke. This bad function naming is responsible to MS.
2018-10-27 20:21:55 +09:00
Pierre Schweitzer d5cced1d42
[BOOTDATA] Define the ObUnsecureGlobalNames registry key on setup
It contains values that are present on W2K3 and required to avoid
regressions in .NET

See: https://blogs.msdn.microsoft.com/toddca/2005/06/08/normal-users-on-terminal-server-fail-to-run-net-framework-applications/
2018-10-27 12:01:38 +02:00
Pierre Schweitzer 9c6037182c
[NTOSKRNL] Add support for unsecure object names 2018-10-27 12:01:38 +02:00
Pierre Schweitzer 0f36353551
[NTOSKRNL] Implement the ObpIsUnsecureName() helper function 2018-10-27 12:01:38 +02:00
Pierre Schweitzer b9423f07d9
[NTOSKRNL] Add support for the ObUnsecureGlobalNames registry key 2018-10-27 12:01:38 +02:00
Stanislav Motylkov f819c9c460 [WIN32SS][NTUSER] Make offset only for menu bars (#983)
CORE-15226
2018-10-27 18:45:21 +09:00
Pierre Schweitzer 8e51bb6510
[NTOSKRNL] Reduce noise 2018-10-27 10:04:22 +02:00
Pierre Schweitzer 18f3922725
[NTOSKRNL] Call internal helper to get VACB on mapping
We already properly round our offset
2018-10-27 09:38:55 +02:00
Hermès Bélusca-Maïto 3f04856f68
[USETUP] Minor code formatting only.
svn path=/branches/setup_improvements/; revision=75517
2018-10-27 03:18:01 +02:00
Hermès Bélusca-Maïto cf2571de6e
[USETUP] Sprinkle some INF_FreeData() calls to balance the INF_GetData() / INF_GetDataField() calls.
They currently do nothing, since the getter functions don't actually
capture (copy) the strings but merely return pointers to read-only strings.

But the calls are placed here for consistency, because if one day the
getters' implementation is changed so that strings are captured, it would
then be needed to free the allocated buffers.

In addition, fix a buggy call to INF_GetData() -- should be instead
INF_GetDataField() -- in AddSectionToCopyQueue().

svn path=/branches/setup_improvements/; revision=75516
2018-10-27 03:18:00 +02:00
Hermès Bélusca-Maïto aa110db3ea
[USETUP] Comment out SetupQueueCopyWNew() declaration which is not used at all. Remove unnecessary casts in the INF_OpenBufferedFileA() call.
svn path=/branches/setup_improvements/; revision=75509
2018-10-27 03:17:59 +02:00
Hermès Bélusca-Maïto 9348fe1f7e
[SETUPLIB] Introduce defines for size units.
[USETUP] Use them in the code.

svn path=/branches/setup_improvements/; revision=75508
2018-10-27 03:17:58 +02:00
Hermès Bélusca-Maïto a95581c4c2
[SETUPLIB] IniCacheSave(): use the OBJ_CASE_INSENSITIVE flag.
svn path=/branches/setup_improvements/; revision=75507
2018-10-27 03:17:57 +02:00
Hermès Bélusca-Maïto 7d0f6f02ab
[USETUP] Move SetDefaultPagefile() into settings.c and remove the now-empty registry.c/.h files.
svn path=/branches/setup_improvements/; revision=75250
2018-10-27 03:17:41 +02:00
Hermès Bélusca-Maïto 2268b3d645
[USETUP] Move Setup[Delete|Copy|Move]File() from usetup code into the setuplib's filesup.c .
Remove the commented-out IsValidPath() in that file, and remove
as well the temporary prototypes in regutil.c .

svn path=/branches/setup_improvements/; revision=75249
2018-10-27 03:17:29 +02:00
Hermès Bélusca-Maïto 60d9ea76d1
[USETUP][SETUPLIB] Split the registry helper code.
Split the registry helper code into registry utility functions
(create/mount/unmount/verify hives) and registry creation code
(the rest: initializing the system hives) and move it in the
setup library.

svn path=/branches/setup_improvements/; revision=75247

[USETUP][SETUPLIB] Improve how the Setup* INF APIs are interfaced in the code.

Define prototypes compatible (including their calling convention)
with the ones defined by setupapi (.h/.dll) so that it can be possible
to either use an internal implementation of these functions (via the
INFLIB library) as currently being done, or using imported setupapi
functions, as would be done by the future 1st-stage GUI installer.

[SETUPLIB] Cleanup the registry.c file and use the infsupp.h header.

svn path=/branches/setup_improvements/; revision=75345
svn path=/branches/setup_improvements/; revision=75346

[USETUP][SETUPLIB] Move some INF-related code from usetup to the setuplib.

- Move the generic INF_GetDataField() and INF_GetData() helpers to
  setuplib, and rework them a bit so that they explicitly call setupapi
  functions (or implementations thereof when being used in usetup);

- Rework the headers in accordance;
- Fix compilation in lib/registry.c .

- Fix compilation when these headers are used withing usetup (who
  doesn't use setupapi.dll) and "reactos" (the 1st-stage GUI installer
  that uses setupapi.dll).

svn path=/branches/setup_improvements/; revision=75515
svn path=/branches/setup_improvements/; revision=75537
svn path=/branches/setup_improvements/; revision=75538
2018-10-27 03:16:47 +02:00