- When binding to a drive item try to initialize the new CFSFolder using IPersistFolder3. That allows us to get the path of the drive right from the pidl instead of getting a new reference to the CDrivesFolder and using GetDisplayNameOf for the pidl.
svn path=/trunk/; revision=68865
- Fix swapped parameters of KeSetIntervalProfile
- Calculate the correct bucket pointer in KiParseProfileList, and actually increment the counter
CORE-10066
svn path=/trunk/; revision=68859
Improve debugging experience when pressing Tab+k, at least with WinDBG, by breaking with a suitable control code (adopt the SysRq one even if we don't use SysRq key for breaking, but instead, Tab+k).
svn path=/trunk/; revision=68855
Addendum to r68851:
- Reset the state of the worker thread *after* having captured the data, not before.
- Fix the explanations given in comments.
svn path=/trunk/; revision=68854
- Remove superfluous dereference in NtCreateProfile
- Allocate the right size for KPROFILE object
- Don't leak the KPROFILE when deleting an EPROFILE
- Avoid some casts
CORE-10066
svn path=/trunk/; revision=68852
Implement the WinDBG Debugger Worker Thread, which is created inside a target process whenever one uses the ".process /i <addr>" (invasive debugging) command using WinDBG in kernel-mode debugging.
See https://www.microsoftpressstore.com/articles/article.aspx?p=2201303&seqNum=2 section "Switching the Current Process Context" (from the book "Inside Windows Debugging" by Tarik Soulami, pp.101-102) for more details.
The names of the variables must be kept as they are, because WinDBG (more exactly, dbgeng.dll) searches for them within the kernel symbols and retrieves their addresses (since those variables are not publicly exported).
svn path=/trunk/; revision=68851
Make its version information compatible with the one of NTOSKRNL (and accessorily its resource file). Addendum to r25937.
svn path=/trunk/; revision=68850
- Only return the flags that the caller asked for in SHELL32_GetFSItemAttributes. Allows us to get rid of a hell lot of calls to CFSFolder::BindToChild which lead to many calls to FindFirstFile.
svn path=/trunk/; revision=68849
Fix x64 compilation:
- Some KDBG symbols for win32k debugging are defined only in x86 platform when _WINKD_ is disabled.
- KdSetOwedBreakpoints is defined only if _WINKD_ is enabled, addendum for x64 to r68842.
svn path=/trunk/; revision=68848
- Avoid statically importing FindFirstStreamW/FindNextStreamW so that our cmd.exe can work on WinXP.
- Accept lowercase /r switch
svn path=/trunk/; revision=68847
- In DirList, initialize stInfo.ptrHead of the dummy node to avoid invalid memory access. Fixes regression in cmd:batch
svn path=/trunk/; revision=68846
- Sync control.c from wine and disable a large part of it that is not needed. Also update the definition of CPlApplet to match wine.
- Make CControlPanel use the new definition of CPlApplet which lets us simplify loading the applets.
- Make CControlPanel to only use unicode and use the new helper functions.
- Simplify the code for the context menu of cpl items.
svn path=/trunk/; revision=68845
- Fix the condition check when setting twice (or more) the same breakpoint.
- Implement support for deferred breakpoints. For more information, see: http://www.osronline.com/article.cfm?article=541 (which also exposes an interesting problem about them).
svn path=/trunk/; revision=68841
It seems that our disk.sys returns "unknown" media type when performing IOCTL_DISK_GET_DRIVE_GEOMETRY on an extended partition.
Not sure how Windows handles this (if any volunteer for a test :-)), in the meantime, forcibly sector size to 512B to allow NTFS driver opening volumes on extended partitions
svn path=/trunk/; revision=68835
The desktop.ini file is only meant to be read if the folder has the R (read-only) or S (system) attributes.
If this causes your favorite folder to stop showing the icon, use "attrib +r <foldername>" or edit it from the properties dialog.
When we add the desktop.ini files, we will also need to add the R attribute to their respective folders.
Followup to CORE-9002
svn path=/trunk/; revision=68834
Totally rewrite the way MFT records attributes are handled.
Up to now, we were having really similar loops, only looking at the resident part of the attribute list, not really caring about how the loop was going.
This was leading to some issues:
- In case the attribute we were looking for was stored in the non-resident part of the attribute list, we would miss it (excepted in the case of FindAttribute() which was properly browsing the whole attribute list).
- In the specific case of FindAttribute(), one would have been able to setup a broken MFT record with the resident attribute list pointing on the non resident attribute list which itself would point to the resident attribute list. In such case, the driver would loop forever caught on the loop, allocating tones of memory. It was possible to trigger this by user space, from a non-privileged user, just by browsing the right directory entry.
- In the case of the other loops (non FindAttribute()), another issue (other than missing attributes) was present, one would have been able to setup a broken MFT record with an attribute of null-length. This would have caused the driver to loop forever on the attribute list. This could be triggered from usermode too. And could be triggered by a non-privileged user.
This commit introduces a new set of functions for attributes browsing: FindFirstAttribute(), FindNextAttribute(), FindCloseAttribute(). It allows safely browsing attributes and handles broken cases. It also performs reading of the attribute list when present and makes sure there's only one read. This method should be the only one to use to browse the attributes.
The whole NTFS code base has been converted to use this newly set of functions. This really simplifies the implementation of FindAttribute(), and prevent unsafe code duplication.
CORE-10037 #resolve #comment Fixed with r68829
svn path=/trunk/; revision=68829
* Fix loading icon info from dekstop.ini. Also took the chance to remove some unnecessary convolution. The old code tried to load the info, but didn't actually make use of the returned string at all.
CORE-9002 #resolve #comment Icon loading should work now. Adding the default desktop.ini files in the right folders will be a followup issue.
svn path=/trunk/; revision=68828
- Towards a complete fix of VGA console attach/detach: a lot of progress is made but few little things need to be checked/adjusted.
- Fix text scroll (at least in text modes) by doing guest-to-guest moves, using the EmulatorCopyMemory function introduced in r68826.
- Fix the computation of the screen rows/columns values stored in the BDA, in graphics modes (in addition to the change of r68090), by dividing the graphics resolution by the character heights & widths. Correct values are indeed needed by some programs, eg. QBasic (I also add a CharacterWidth; normally it should be computable using the CRTC registers, and is always == 8 or 9, but still...).
svn path=/trunk/; revision=68827
Introduce a function for doing guest-to-guest memory copies (given here in a temporary implementation until a proper one is developed). It will be used in my next commit.
svn path=/trunk/; revision=68826
Properly set StreamNameLength (with the length of extra data we append).
This fixes truncated output from FindFirstStreamW/FindNextStreamW
svn path=/trunk/; revision=68822