Commit graph

71970 commits

Author SHA1 Message Date
Pierre Schweitzer fd8197645f
[FASTFAT] Use KdRosRegisterCliCallback() to register in KDBG. 2018-04-29 12:23:18 +02:00
Pierre Schweitzer de88611590
[SDK] Make KdRosRegisterCliCallback() return status from KdSystemDebugControl(). 2018-04-29 12:19:21 +02:00
Pierre Schweitzer c5a35ecd37 [FASTFAT] Introduce a KDBG extension.
This is a PoC of what it's possible to realize thanks to an
already existing hack in ntoskrnl :-).
With this extension, on the kdb:> prompt, you're able to type
in commands that will be handled by the FastFAT driver and not
by the kernel, allowing internal debug, not possible otherwise.

So far, three commands exist:
- ?fat.vols: lists all the mounted volumes by FastFAT
- ?fat.files: lists all the files on a specific volume (with their attributes)
- ?fat.setdbgfile: allows watching on specifics files lifetime

This is obviously only the begin and could be greatly improved.

For instance, this is what allowed to debug CORE-14557
2018-04-29 12:15:11 +02:00
Hermès Bélusca-Maïto cb20bf8c90
[WINLOGON] Usability enhancement for the RPC SystemShutdown functionality.
- Perform an immediate system shutdown if the timeout is zero, otherwise
  display the countdown shutdown dialog.
- Cleanup pShutdownParams->pszMessage as soon as the dialog goes away.
- It actually appears (tested on Windows 2000 and 2003) that sending
  WM_CLOSE messages from a user-mode app to the shutdown dialog really
  do nothing (and in particular does not cancel the shutdown!), so modify
  the code to take this fact into account.
2018-04-29 01:02:05 +02:00
Hermès Bélusca-Maïto 03c233bcd0
[CMD] Improve how the command prompt displays when one presses Ctrl-C/break after having pressed ENTER, or after a command has been run. 2018-04-29 00:57:16 +02:00
Hermès Bélusca-Maïto a3b36f8d3e
[CMD] Don't reset bCtrlBreak too early.
This allows to break commands such as:

C:\ReactOS\system32> for %f in (*.*) do dir

as one would expect: stop the currently running 'dir' and the 'for'.
"bCtrlBreak" doesn't need to be volatile too.
2018-04-29 00:53:49 +02:00
Hermès Bélusca-Maïto 6dd27bd467
[CMD] Use CheckCtrlBreak(). 2018-04-29 00:50:40 +02:00
James Woodcock 8b72fce3e1
[CMD] Use _T() rather than L to initialise TCHARS. 2018-04-28 22:16:59 +02:00
James Woodcock d7e71357dc
[CMD] Fix CTRL-C handling.
Using CTRL-C to cancel command line input would leave the prompt in
a state where the next command would be ignored.  For example:

dir<CTRL-C>
dir

would cause cmd.exe to ignore the second dir command.
2018-04-28 22:16:58 +02:00
James Woodcock 23de2099e0
[CMD] Don't pass CTRL-C to child processes.
CORE-11677

The standard Win32 Console Control Handler will give CTRL-C events to
processes spawned from cmd.exe. If cmd.exe calls GenerateConsolCtrlEvent()
then the child process will receive two CTRL-C events.
2018-04-28 22:16:50 +02:00
Pierre Schweitzer 94ead99e0c [FASTFAT] Don't leak directories FILE_OBJECT, FCB and cache entries.
Once a directory is crossed (opened or a child is opened), associated
FCB structure is created in FastFAT, but also a stream FO for caching.
Up to now, due to an extra reference taken by the stream file object,
even when the directory was no longer used, the directory was kept in
memory: the FCB was never deleted, the file object was never dereferenced,
and the cache never released.

The immediate effect of this bug is that our FAT driver was leaking every
directory that was used affecting the whole OS situation. In case of
directories intensive operation (like extraction the ReactOS source code
in ReactOS ;-)), we were just killin the whole OS RAM without any way to
release it and recover.

The other side effects: IOs were faster as half of the FS was always
permanant in RAM.

This commit fixes the issue by forcing the FSD to release the FO,
and the cache when a directory is no longer used, leading to its
destruction in RAM.
Downside: on IO intensive operation, expect slowdowns, obviously,
there's less caching now. But more efficient!

CORE-14557
2018-04-28 18:33:14 +02:00
Pierre Schweitzer 2ea6de8a42
[NTOSKRNL] Also try to extract name from FCB when leaking VACB 2018-04-27 19:01:35 +02:00
Pierre Schweitzer 43836b0fbb
[NTOSKRNL] In !filecache, try to display FCB name
When no name is set in the file object, try to read the name
from the FCB. We only support FastFAT (ours) FCB for now.

This is clearly a hack, but for a kdbg command, so ;-)
2018-04-27 18:57:30 +02:00
Pierre Schweitzer 315f9a13d4
[FASTFAT] When allocating a FCB, set its node type code.
We set the same value as MS FastFAT driver for consistency.
2018-04-27 18:56:31 +02:00
Pierre Schweitzer 579a784e04
[NTOSKNRL] In case we leak a VACB, debug as much information as possible.
CORE-14578
2018-04-27 14:14:56 +02:00
Pierre Schweitzer fcf83315dc
[NTOSKRNL] Noisily dereference mapped VACB on cache release.
It seems that on process killing, some VACB may be deleted while
still mapped. With current reference counting, they will actually
not be deleted, but leaked, and an ASSERT will be triggered.

CORE-14578
2018-04-27 10:23:06 +02:00
Thomas Faber 708d26acf3
[MSXML3] Fix buffer overflow in BindStatusCallback_GetBindInfo. CORE-14570 2018-04-26 15:00:24 +02:00
Jason Johnson 054c11a02c Correctly bugcheck if we aren't returning a usermode thread (#506)
Cause a corresponding bug check to occur for the reason of the user context flag being zero (a system thread), instead of using DbgBreakPoint.
2018-04-24 23:07:02 +01:00
Peter Wathall 9e2dd8676a Removed unreachable line (#517)
The break statement was unnecessary because the goto on the line before it returns from the routine so it can never be reached
2018-04-24 21:35:23 +01:00
Eric Kohl dd653de251 [SYSSETUP] PS2MousePropPageProvider: Use the UDN_DELTAPOS notification to change the input buffer size in steps of 10 2018-04-23 23:58:49 +02:00
Stanislav Motylkov 955048e50a [MSPAINT] Fix crash on zoom out
- Check the denominator for zero for both zoomed width and height.
- Do not allow to move zoom slider above possible position.
- Move commonly used `zoomTo` function into new header file.

CORE-14539
2018-04-23 20:11:43 +02:00
Eric Kohl 065e70048d [SYSSETUP] Initialize the property sheet page dialog and implement the Defaults button 2018-04-23 00:00:46 +02:00
Hermès Bélusca-Maïto a55d7c692b
[WIN32K] Implement UOI_FLAGS in NtUserGetObjectInformation(). Based from a patch by Jérôme Gardou.
CORE-13447 CORE-14422

This fixes closing nLite 1.4.9.3 (.NET2) application, as well as any
other program that expects that the interactive window station is
reported as being visible. I thank Mark Jansen and Joachim Henze for
help and testing.
2018-04-22 23:00:55 +02:00
Bișoc George e445b305bb [CPL][CONSOLE] Mistake corrections 2018-04-22 22:52:48 +02:00
Hermès Bélusca-Maïto da5dcdcbf2
[NULL] Additions for the Null driver.
- Allow the driver to be unloaded, as on Windows.
- Use a static fast IO dispatch table, instead of allocating one and
  risking any potential memory allocation failure.
- Update the file header.
2018-04-22 22:23:54 +02:00
Mark Jansen 63b6df6bc5
[SDB] Add a fix for Globulation 2 unloading / reloading an aux dll.
Reported in https://savannah.nongnu.org/bugs/?53219
2018-04-22 18:56:44 +02:00
Mark Jansen 8b15a5ecd7
[SDK][ACGENRAL] Add the shim IgnoreFreeLibrary 2018-04-22 18:52:00 +02:00
Mark Jansen 3551953c84
[XML2SDB] Add support for TAG_LINK_DATE and TAG_LINKER_VERSION. 2018-04-22 18:51:53 +02:00
Mark Jansen 2eaf526484
[SHIMLIB] Update helper functions, add ShimLib_StringNDuplicateA 2018-04-22 18:51:48 +02:00
Mark Jansen 0a5a0a3501
[APPSHIM_APITEST] Add a test for the shim IgnoreFreeLibrary 2018-04-22 18:51:21 +02:00
Eric Kohl 4970f92d6c [ZIPFLDR] Fix russian translation 2018-04-22 17:43:05 +02:00
Mark Jansen b569195ecf
[SHELL32] Partially sync SHGetFileInfo with wine to improve folder type names.
CORE-14542
2018-04-22 17:38:44 +02:00
Mark Jansen fd0b834a0a
[ZIPFLDR] Various usability improvements
- Take the user-entered folder into account
- Hide size / ratio for folders
CORE-14543
CORE-14542
2018-04-22 17:38:44 +02:00
Mark Jansen 2c90194ae4
[ATL] Add COMMAND_HANDLER macro.
CORE-14543
2018-04-22 17:38:38 +02:00
Stanislav Motylkov ae9fb8a68d [ZIPFLDR] Add Russian translation 2018-04-22 17:12:47 +02:00
Hermès Bélusca-Maïto e616a456c0
[NTOSKRNL] Minor PnP enhancements.
- For non-PnP devices reported to the PnP manager through the
  IoReportDetectedDevice() function, store the corresponding
  service/driver name and (non-)legacy information inside their
  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\ entries.
- Drivers flagged as "DRVO_BUILTIN_DRIVER" (basically, only those
  created via a IoCreateDriver() call) have their "Service" name that
  contain "\Driver\", which should be stripped before being used in
  building e.g. the corresponding "DETECTEDxxx" PnP compatible IDs.
  CORE-14247

- Use explicit REG_OPTION_NON_VOLATILE flag where needed in the
  IopCreateDeviceKeyPath() calls.
- Save NULL-terminated REG-SZ string properties in the enumeration tree
  for each device enumerated inside \Enum\Root\.
- Always use upcased key name for the "LEGACY_***" elements in \Enum\Root\.
- Add a default "ConfigFlags" value for the legacy elements.
- Simplify few parts of code.
2018-04-22 16:52:45 +02:00
Hermès Bélusca-Maïto 2183e65c17
[ACPI] Fix the format of the (default hardcoded) "unique" instance ID. 2018-04-22 16:52:42 +02:00
Hermès Bélusca-Maïto fa103197ad
[NTOSKRNL] Whitespace fixes only. 2018-04-22 16:52:40 +02:00
Hermès Bélusca-Maïto 45012aa486
[NTOSKRNL] Set the DRVO_BUILTIN_DRIVER DriverObject flag when a built-in driver is created using IoCreateDriver(). 2018-04-22 16:52:38 +02:00
Hermès Bélusca-Maïto 635775d249
[NTOSKRNL] Set flags the standard way. 2018-04-22 16:52:36 +02:00
Doug Lyons ea0cc1c783
[BROWSEUI] Apply a hack to prevent truncating the address bar text.
CORE-13003
2018-04-22 15:42:29 +02:00
Timo Kreuzer e49ef251b7 [NTOS:MM] Fix ViewSize parameter passed to MiInsertVadEx() from MiCreatePebOrTeb()
The size is in bytes, not in pages! On x86 we got away with it, since PEB and TEB require only a single page and the 1 passed to MiInsertVadEx() was aligned up to PAGE_SIZE. On x64 this doesn't work, since the size is 2 pages.
2018-04-22 15:06:19 +02:00
Eric Kohl e8f8536f9b [SYSSETUP] Add the property sheet page and initialize it
- Add the wheel detection option strings.
- Add the property sheet page and initialize the dialog.
2018-04-22 14:26:11 +02:00
Eric Kohl 183a4bfd9c [SYSSETUP] Add the PS/2-Mouse property page dialog 2018-04-22 11:59:47 +02:00
Hermès Bélusca-Maïto 3d012a4405
[README] Convert to UTF-8 without BOM. 2018-04-22 02:53:48 +02:00
Hermès Bélusca-Maïto 32d51c8607
[BOOTDATA] Increase the maximum size of the default event log files. 2018-04-22 02:53:44 +02:00
Hermès Bélusca-Maïto 10ed9621e4
[EVTLIB] Silence some DPRINTs. 2018-04-22 02:53:40 +02:00
Mark Jansen a91899a6a1
[APISETS] Fix data forwarding.
Thanks to Timo for the help :)
2018-04-21 18:56:33 +02:00
Timo Kreuzer 01ae49857a [KERNEL32] Add Vista exports 2018-04-21 18:31:27 +02:00
Timo Kreuzer 87d3f1005b [KERNEL32] Go back to auto-numbering of export ordinals
Using static numbers was a bad idea in the first place, since we already deal with x64, which has different ordinals. Also @ will automatically do the same thing! It does not mean "no ordinal", it only means automatically apply incrementing numbers.
2018-04-21 18:31:27 +02:00