Commit graph

555 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 9ba5594599
Happy New Year 2020 to everyone!!
🎊 🎆 🍾 🥳

.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
   __,  ,__)            __,  ,__)       __, ,__)        ░░▄████▄░▄███▄░▄████▄░▄███▄░░
  (--|__| _ ,_ ,_      (--|\ | _       (--\ | _  _ ,_   ░░▀▀░▄██░██░██░▀▀░▄██░██░██░░
    _|  |(_||_)|_)(_|    _| \|(/_(_|_)     \|(/_(_||    ░░░▄██▀░░██░██░░▄██▀░░██░██░░
   (        |  |  ,_|   (                (__|           ░░██████░▀███▀░██████░▀███▀░░
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.

   ███████████████████████████████████████████████████████████████████████████████
   ██████████████████▓▒▒▒▒▒▒▓▓█████████████████████████▓▓▒▒▒▒▒▒▓██████████████████
   ███████████████▒▒▒▒▓▓███▓▓▓▒▒░▒▓▓█████████████▓▒▒░▒▒▓▓████▓▓▒▒▒▓███████████████
   █████████████▓░░░░░░░░░▒▒▓██████▓▒▒▒▓█████▓▒▒▒▓██████▓▒▒░░░░░░░░░▓█████████████
   ███████████▒▓░▒█████████▓▓▒░▒▓███▓▓▓▓▓▓▓▓▓▓▓▓████▒▒▒▒▓▓████████▓▒░▓▓███████████
   ██████████▒▒▓░▓██████████████▓▓▓▓▓█████▓▓▓▓▓▓▓▓▒▒███████████████▓░▓░▒██████████
   █████████▓░▓█░▓██████████▓▒▒▒▒▓▓▓▓███████▓▓▓▓▓▓▓▓▓▒▒▓███████████▓░█▒░▓█████████
   █████████▓▒██▒▒████████▒▒░░░░▒▒▓▓▓███████▓▓▓▓▓▓▓▓▓▓▓▒▒░█████████▒▒█▓▒▒█████████
   █████████▓░██▓░▓█████▓▓▒▒░░░░▒▒▓▓▓▓████▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▒░░▓█████▓░▓█▓░▓█████████
   ██████████░▓██▒▒▓██▓▓▓▓▓▒▒▒▒▒▒▓▓▓▓██████▓▓▓▓▓▓▒▒▒▒▒▓▓▓▓▒▒░░███▓░▒██▒░██████████
   ██████████▒▒▓██▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████▓▓▓▒▒▒▒▒▒▒▒▒▓▒▒▒▒░░▓█▒▒██▓░▓██████████
   ███████████▒▒███▒░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▒▒░▒▒▒▒▒▒▒▒▒░░░▒███▒▓███████████
   ████████████▒▒█▓▓▒░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░░▒▒░░░▒▒▒░░░▓██▒▒████████████
   █████████████▒▒▒▒▒▒░▒▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▒▒░░░░░░░░░░░░░▒▒▒▓▒▒█████████████
   ██████████████░░▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▒▒▒▒▒░░░░░░░░░▒░░▒░▒██████████████
   ██████████████▓▒░▒▒▒▒▒░░▒▒░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░▓███████████████
   ██████████████▓▒▓░░▒▒▒▒░░░░░░░░░░░░░░░░░▒▒▒▒▒▒░░░░░░░░░░▒░░░░░▓▒▓▓█████████████
   ███████████▓▒▓▓▓▒▒░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░░▒▒▒█▒▒▓███████████
   ██████████▓▒▒█▓▓▒▒░▒░░░░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░▓▒▒▒▒██▒▒▓██████████
   █████████▓▒▓██▓▒▒▒▒░░▒░░░░░▒░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░▒▒▒▒▒▒▓███▓▒▓█████████
   ████████▓▒▓███▓▒▒▒▒░░░▒░░░░░░▒░░░░░░░░░░░░░░░░░░░▓▒▒▒▒░▒▓▒▒▓▓▒▒▓▒▓██▓▒▓████████
   ███████▓▒▓███▒▓▓▒▒▒░░░░░▒░░░░░░▒░░░░░░░░░░░░░░░▓▒▒▒▒░▒▓▒▓▓▓▓▒▒██▓▒▓██▓▒████████
   ███████▒▒██▓▒▓█▓▓▒▒░░░░░░░▒░░░░░░▒░░░░░░░░░░░▓▒▒▒▒░▒▓▒▒▒▓▓▓▒▒▓███▓▒███▒▓███████
   ██████▓▒▓██▒▒███▓▒▒▒░░░░░░░░▒▒░░░░░▒▒░░░░░░░░▒▒░░▒▓▓▓▓▒▒▒▒▒▒▓█████▒▒██▓░▓██████
   ██████▒▒██▒▒█████▓▒▒▒░░░░░░░░░▒░░░░░░░▒░░░░▒▒░░▒▓▒▒▒▒▒▒▒▒▒▒████████▒▒██▒▒██████
   ██████▒▓██░▓██████▓▓▒▒▒░░░░░░░░░░▒░░░░░░░▒░░░░▒▒▒▒▒▒▒▓▓▒▒██████████▒░██▒▒██████
   ██████▒▒▓▓▒█████████▓▓▒▒▒░░░░░░░░░░▒▒░░░░▒▒▒▓░░░▒▒▒▒▒▓▓████████████▓▒▓▓░▒██████
   ██████▓░▒▒▒███████████▓▓▒▒░░░░▒▒▒░▒░▒▒▒▒░░▒▒▒▒▒▓▒░░▒▒██████████████▓░▒▒▒███████
   ███████▓▒░░▒█████████▓▒▒░░▒▓▓▒▒▒░░░░▒▒▒▓▒▓▒░░▒▒▓▓██▓▓▒░▒▒▓█████████▒░░▒████████
   ██████████▒░░░░░░░▒▒▓▓█████▓▓▒░░▒▓██▓▓████████▒░▒▒▓██████▓▓▒▒░░░░░░░▒██████████
   ███████████▓▒▒▒▓▓████▓▓▒▒▒░▒▒█████████████████████▒▒░▒▒▓▓▓███▓▓▒▒▒▒████████████
   ████████████████▓▓▓▓▓▓███████████████████████████████████▓▓▓▓▓▓████████████████
   ███████████████████████████████████████████████████████████████████████████████
   ███████████████████████████████████████████████████████████████████████████████
   ██████████████████████████████████████████████████████████▓░░▓████████░░░▓█████
   ███▒░░░░▒▓███████████████████████████████████████▒█████▓▒▒▓██▓▒▒▓████▓░█▓░▓████
   ███▒█████░▒███▓▒▒▒▒▒▓████▓▒▒▒▒▒▓█▓███▓▒▒▒▒▒▒▓██▓▒░▒▒▓▒▓█████████▓▒██▓▒█████████
   ███▒█████░▒█▓▒▒█████▒▒██▒▒▓████▓░▒██▒▒▓████▓▒▓██▓░▓██▓███████████▓▓██▓░░░▒█████
   ███▒█▓░░▒▓█▓▒▒▓▒░░▒▓▒░▒▓▒███████▒▒██▒████████████░███▓███████████▓▓██████░▒████
   ███▒██░▓███▓▒▓█████████▓▒███████▒▒██▒████████████░███▒▓██████████▓████████░▓███
   ███▒███░▒▓██▓▒▒████▓▒▓██▓▒▒▓██▓▒░▒██▓▒▒▓███▓▒▓███░████▓▒▒█████▒▒▓███▓▒▓██░▓████
   ███▒████▓░▓████▒▒▒▒▒██████▓▒▒▒▒▓█▓████▓▒▒▒▒▓█████▒███████▓▒▒▒▒▓███████▒▒▒▓█████
   ███████████████████████████████████████████████████████████████████████████████
2020-01-01 00:00:00 +01:00
Thomas Faber 053510467f
[NDK] RtlFindCharInUnicodeString is only available in user mode. 2019-12-31 15:17:53 +01:00
Katayama Hirofumi MZ a385451380
[SDK][INCLUDE] Rename Gdiplus::Region::region as nativeRegion (#2212)
CORE-16585
2019-12-31 23:14:52 +09:00
Katayama Hirofumi MZ 8968b14235
[SDK][INCLUDE] Improve Gdiplus::Graphics (#2211)
CORE-16585
2019-12-31 20:40:16 +09:00
Katayama Hirofumi MZ 8ecbb44463
[SDK][INCLUDE] Rename Gdiplus::Graphics::graphics as nativeGraphics (#2210)
Make it w32api-compatible. CORE-16585
2019-12-31 19:24:59 +09:00
Katayama Hirofumi MZ 1a3c77dc2f
[SDK][INCLUDE] Move Gdiplus::TextureBrush codes (#2208)
Move the code into the place it should be in. CORE-16585
2019-12-31 17:53:35 +09:00
Katayama Hirofumi MZ ad2c15524d
[SDK][INCLUDE] Implement Gdiplus::Pen (#2207)
CORE-16585
2019-12-31 17:11:38 +09:00
Katayama Hirofumi MZ e797499dee
[SDK][INCLUDE] Rename Gdiplus::Pen::pen as nativePen (#2206)
CORE-16585
2019-12-31 15:45:57 +09:00
Katayama Hirofumi MZ 9f4d733d1f
[SDK][INCLUDE] Implement Gdiplus::Brush (#2205)
CORE-16585
2019-12-31 14:54:41 +09:00
Katayama Hirofumi MZ dcc512a245
[SDK][INCLUDE] Rename Gdiplus::Brush::brush as nativeBrush (#2204)
Make it w32api-compatible. CORE-16585
2019-12-31 12:36:08 +09:00
Katayama Hirofumi MZ 39eceedd89
[SDK][INCLUDE] Improve Gdiplus::FontCollection (#2203)
CORE-16585
2019-12-31 11:37:46 +09:00
Katayama Hirofumi MZ 094960e386
[SDK][INCLUDE] Implement Gdiplus::ImageAttributes (#2202)
CORE-16585
2019-12-31 11:34:28 +09:00
Katayama Hirofumi MZ 5cc4c9b24d
[SDK][INCLUDE] Implement Gdiplus::CustomLineCap (#2201)
Implement Gdiplus::CustomLineCap and Gdiplus::AdjustableArrowCap. CORE-16585
2019-12-31 11:30:12 +09:00
Katayama Hirofumi MZ bef5aef62b
[SDK][INCLUDE] Implementing Gdiplus::GraphicsPath (#2200)
Point, PointF, Size, SizeF, Rect and RectF are also implemented. CORE-16585
2019-12-31 09:23:45 +09:00
Katayama Hirofumi MZ 8b5dc3bf5f
[SDK][INCLUDE] Improve gdiplusheader.h (#2197)
CORE-16585
2019-12-30 19:59:09 +09:00
Katayama Hirofumi MZ 5eaea74d46
[SDK][INCLUDE] Improve gdipluseffects.h (#2196)
CORE-16585
2019-12-30 19:57:55 +09:00
Katayama Hirofumi MZ 1674307fd1
[SDK][INCLUDE] Improve gdipluscolor.h (#2195)
CORE-16585
2019-12-30 18:07:13 +09:00
Katayama Hirofumi MZ d24acc9779
[SDK][INCLUDE] Rename Gdiplus::Image::image as nativeImage (Retry) (#2189)
CORE-16585
2019-12-30 14:45:26 +09:00
Thomas Faber 0d26bbf4b5
[INCLUDE] Safely handle odd & large lengths in ProbeAndCaptureUnicodeString. 2019-12-29 15:22:10 +01:00
Katayama Hirofumi MZ e7814f19fb
[SDK][INCLUDE] Formatting gdiplus headers (#2190)
Just code formatting. CORE-16585
$ clang-format -style=file -i sdk/include/psdk/gdiplus[a-z]*
2019-12-29 23:21:05 +09:00
Katayama Hirofumi MZ 3f9e695061
[SDK][INCLUDE] Add Gdiplus::Image::~Image (#2174)
Gdiplus::Image had no dtor. CORE-16566
2019-12-26 11:25:48 +09:00
Hermès Bélusca-Maïto 2828ea2e06
[SDK] Complete the list of DE_*** error codes for SHFileOperationA/W().
Documentation from https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shfileoperationa
2019-12-24 18:05:09 +01:00
Amine Khaldi c376b5acea [PSDK] Update wtsapi32.h. CORE-16441 2019-12-23 00:54:23 +01:00
Eric Kohl 75f66049cf [IDL] Add missing acf files 2019-12-22 12:43:23 +01:00
Eric Kohl 6c7878f35e [DNSAPI][DNSRSLVR] Implement DnsGetCacheDataTable() 2019-12-22 11:21:04 +01:00
Timo Kreuzer cd5cc017cb [PSDK] Add versionhelpers.h 2019-12-21 12:44:48 +01:00
Timo Kreuzer e6eec56a44 [PSDK] Add extern "C" for c++ code in mmddk.h 2019-12-21 12:44:48 +01:00
Timo Kreuzer 88ab888f94 [TESTS] Instead of entirely skipping tests with ros_skip_flaky, only disable counting errors 2019-12-21 12:44:48 +01:00
Hermès Bélusca-Maïto bfd8a84865
[BLUE] Improve initialization and interfacing with INBV.
CORE-15901

This fixes display reset transition when an external module acquired
INBV ownership and then released it, similarly to what was done in
commit 0ad65796 for VIDEOPRT.

For this a backup screenbuffer is used to store the contents of the
screen just before an INBV screen acquire transition, and these contents
are restored when it is detected that INBV ownership has been released.
Also, the active text font associated with the active console code-page
is restored, as well as the cursor state and shape.

In addition, any user of BLUE.SYS is now required to explicitly issue
a new IOCTL_CONSOLE_RESET_SCREEN to either enable or disable the screen.
This allows avoiding nasty unwanted screen mode switches when a handle
to the \Device\BlueScreen device is opened but no screen mode switch was
actually wanted - This "fixes" this annoyance on ReactOS and Windows,
when these are running witha VGA-compatible video driver and one wants
to look at properties of the \Device\BlueScreen device using
Sysinternals' WinObj.

Following this, we don't need to check anymore for explicit INBV
ownership by issuing calls to InbvCheckDisplayOwnership(), but instead
we check whether the screen has beeen manually enabled using the
aforementioned IOCTL. This partly supersedes commit 8b553a4b, and allows
fixing the second bug, namely that if we start ReactOS without the
/NOGUIBOOT option (and thus, INBV is active during boot), USETUP would
not show up anything because BLUE.SYS wouldn't display anything on screen.
See CORE-15901.

[USETUP][CONSRV] Call IOCTL_CONSOLE_RESET_SCREEN to tell BlueScreen device to enable the screen.
2019-12-15 03:37:52 +01:00
Hermès Bélusca-Maïto d684f90632
[BLUE] Code formatting, add SAL2 annotations, and update file source headers. 2019-12-15 03:36:17 +01:00
Eric Kohl 989ee70d9d [WKSSVC] Implement parts of NetrJoinDomain2 to join a work group
NOTE: We can not connect to a work group yet!
2019-12-08 19:19:27 +01:00
Thomas Faber e85f436a50
[LIBMPG123] Update to version 1.25.13. CORE-16550 2019-12-08 16:50:00 +01:00
Thomas Faber f87faf6703
[LIBTIFF] Update to version 4.1.0. CORE-16550 2019-12-08 16:49:57 +01:00
Katayama Hirofumi MZ 312d52277a [WINMM_WINETEST][SDK][INCLUDE] Try to fix MSVC winmm:generated build 2019-12-08 12:45:51 +09:00
Eric Kohl 0a80b30ad2 [PSDK] Replace the wine version of lmjoin.h by an extended version that includes NetJoinDomain and NetUnjoinDomain. 2019-12-08 02:03:26 +01:00
Amine Khaldi edd70d1aa6 [PSDK] Update wmsdkidl.idl. CORE-16441 2019-12-07 13:10:44 +01:00
Amine Khaldi 56601978c4 [PSDK] Add missing define. CORE-16441 2019-12-07 13:06:57 +01:00
Timo Kreuzer e26c8bc66f [ROSTESTS] Skip some flaky test / do not count successes 2019-12-04 01:24:49 +01:00
Hermès Bélusca-Maïto 0ad65796bb
[WIN32K][VIDEOPRT] Improve initialization and interfacing with INBV.
CORE-12149

VIDEOPRT:
=========

Improve interfacing with INBV, so as to detect when an external module
acquired INBV display ownership, and whether ownership is being released
later on. (This does NOT rely on hooking!)

For this purpose we improve the IntVideoPortResetDisplayParameters(Ex)
callback that gets registered with an InbvNotifyDisplayOwnershipLost()
call during initialization, and we add a monitoring thread.

The callback is called whenever an external module calls
InbvAcquireDisplayOwnership(), for example the bugcheck code or the KDBG
debugger in SCREEN mode. When this happens, a flag that tells the
monitoring thread to start monitoring INBV is set (ReactOS-specific),
and the display adapters get reset with HwResetHw() (as done on Windows).

Due to the fact that this INBV callback can be called at *ANY* IRQL, we
cannot use dispatcher synchronization mechanisms such as events to tell
the INBV monitoring thread to start its operations, so we need to rely
instead on a flag to be set. And, since INBV doesn't provide with any
proper callback/notification system either, we need to actively monitor
its state by pooling. To reduce the load on the system the monitoring
thread performs 1-second waits between each check for the flag set by
the INBV callback, and during checking the INBV ownership status.

When the INBV ownership is detected to be released by an external module,
the INBV callback is re-registered (this is *MANDATORY* since the
external module has called InbvNotifyDisplayOwnershipLost() with a
different callback parameter!), and then we callout to Win32k for
re-enabling the display.

This has the virtue of correctly resetting the display once the KDBG
debugger in SCREEN mode is being exited, and fixes CORE-12149 .

The following additional fixes were needed:

VIDEOPRT & WIN32K:
==================

Remove the registration with INBV that was previously done in a ReactOS-
specific hacked IRP_MJ_WRITE call; it is now done correctly during the
video device opening done by EngpRegisterGraphicsDevice() in the VIDEOPRT's
IRP_MJ_CREATE handler, as done on Windows.

WIN32K:
=======

- Stub the VideoPortCallout() support, for VIDEOPRT -> WIN32 callbacks.
  This function gets registered with VIDEOPRT through an
  IOCTL_VIDEO_INIT_WIN32K_CALLBACKS call in EngpRegisterGraphicsDevice().

- Only partially implement the 'VideoFindAdapterCallout' case, that just
  re-enables the primary display by refreshing it (using the new function
  UserRefreshDisplay()).

VIDEOPRT:
=========

- PVIDEO_WIN32K_CALLOUT is an NTAPI (stdcall) callback.

- In the IntVideoPortResetDisplayParameters(Ex) callback, reset all the
  "resettable" adapters registered in the HwResetAdaptersList list.
  We thus get rid of the global ResetDisplayParametersDeviceExtension.

- Make the IntVideoPortResetDisplayParameters(Ex) callback slightly more
  robust (using SEH) against potential HwResetListEntry list corruption
  or invalid DriverExtension->InitializationData.HwResetHw() that would
  otherwise trigger a BSOD, and this would be disastrous since that
  callback is precisely called when INBV is acquired, typically when the
  BSOD code initializes the display for displaying its information...

Extras:
- Validate the IrpStack->MajorFunction in IntVideoPortDispatchDeviceControl()
  and implement IRP_MJ_SHUTDOWN handling. Stub out the other IOCTLs that
  are handled by VIDEOPRT only (and not by the miniports).

- VIDEOPRT doesn't require IRP_MJ_INTERNAL_DEVICE_CONTROL (unused).

- Implement IOCTL_VIDEO_PREPARE_FOR_EARECOVERY that just resets the
  display to standard VGA 80x25 text mode.
2019-12-02 02:33:20 +01:00
Amine Khaldi e5a5f62909 [PSDK] Add GetSystemFirmwareTable. CORE-16441 2019-12-01 19:44:36 +01:00
Amine Khaldi 285df607d2 [PSDK] Update activscp.idl. CORE-16441 2019-12-01 19:42:38 +01:00
Amine Khaldi 87801a65f7 [PSDK] Add some missing definitions. CORE-16441 2019-12-01 19:40:17 +01:00
Adam Słaboń db1ac630be [TRANSLATION][MC] Polish translation update for errcodes.mc (#2108) 2019-11-30 16:31:28 +01:00
Amine Khaldi 54be41be6b [PSDK] Add SECPKG_FLAG_APPLY_LOOPBACK. CORE-16441 2019-11-30 14:48:23 +01:00
Katayama Hirofumi MZ 5734570a15
[BOOT][SHELL32][INCLUDE] Support 'SuperHidden' files (#2102)
PR #2101 shows desktop.ini files on Desktop. I want to hide them.
- Add "ShowSuperHidden" setting to Explorer.
- Add SHCONTF_INCLUDESUPERHIDDEN flag.
- Support SHCONTF_INCLUDESUPERHIDDEN in Explorer.
CORE-10045
2019-11-29 15:14:18 +09:00
Katayama Hirofumi MZ 004e08383a
[SENDMAIL][INCLUDE][INF] Add sendmail.dll for DeskLink (#2092)
*.DeskLink file realizes SendTo Desktop (Create shortcut) in Windows. DeskLink is implemented in the sendmail.dll module. CORE-12562
2019-11-27 19:26:49 +09:00
Hermès Bélusca-Maïto 28b77a40ca
[NDK][NTOS:INBV] Remove non-exported INBV functions from NDK; do some cleanup in INBV headers; label both InbvSetProgressBarSubset() and InbvSetProgressBarCoordinates() as INIT_FUNCTION since they are used only for the boot splash. And fix MSVC build. 2019-11-25 15:54:45 +01:00
Hermès Bélusca-Maïto 04c8ed493d
[NDK] Addendum to 592f01a5, fix build. 2019-11-25 02:28:08 +01:00
Eric Kohl 630f34a0d0 [DNSAPI][DNSRSLVR] Parse the hosts file when the resolver is initializing
- Move the hosts file handling from dnsapi.dll to the resolver service. Now, the hosts file is no longer parsed on each query.
- Add support for DNS_QUERY_WIRE_ONLY and DNS_QUERY_NO_WIRE_QUERY flags to R_ResolverQuery.
- GetCurrentTimeInSeconds() should return DWORD instead of DNS_STATUS.
2019-11-23 17:13:51 +01:00
Amine Khaldi 392821caea [PSDK] Update rpcndr.h. CORE-16441 2019-11-23 12:12:08 +01:00