Cherry pick r71407 by Trevor Thompson:
- Rewrote FsRtlGetNextBaseMcbEntry(), FsRtlLookupBaseMcbEntry(), and FsRtlNumberOfRunsInBaseMcb() using simpler logic.
This finally fixes broken MCB handling in ReactOS and allows FSDs relying on MCB to properly work in ReactOS!
CORE-11002 #resolve #comment Fixed in r71409
svn path=/trunk/; revision=71409
Rework a bit the way mapping and pinning is working in ReactOS Cc. This is still wrong regarding the way Windows does it, but at least, it offers us more features for a more compatible behavior exposed to FSDs.
First of all, reintroduce the mutex used to lock VACB. Moving there to a resource wasn't enough to work address the issue. This reverts r71387.
Introduce the resource in the BCB, as it should be. This resource will be unused until pinning occurs. In such case, the VACB mutex gets unused so that we can get the BCB released by another thread without deadlocking the associated VACB.
The VACB can be locked again after the last unpinning operation.
Basically, that fixes drivers than pin in a thread and unpin in another thread, after having changed BCB owner. Until now, it would just have deadlock or crashed ReactOS.
The implementation of this preserves hacks and stubplementations already in place in Cc (let's say it's another hack on top of hacks).
It was successfully tested with Ext2Fsd 0.66.
Short summary:
- Replace the VACB resource by a mutex
- Introduce a resource in the BCB
- Fixed CcPinRead() implementation so that it respects PIN_EXCLUSIVE flag
- Implement CcUnpinDataForThread() so that it can unpin data which ownership was changed
- Implement CcSetBcbOwnerPointer() so that it properly set BCB owner and allows unpinning with CcUnpinDataForThread()
CORE-11310 #resolve #comment Committed in r71406
svn path=/trunk/; revision=71406
On CcInitializeCacheMap() call, keep track of the PinAccess value so that we can later check it on pinning.
It shouldn't be set to FALSE when the user attempts to perform pinning
CORE-11310
svn path=/trunk/; revision=71404
* Return TRUE from SetThreadStackGuarantee. Allows .NET 2.0 setup to complete and consequently allows some .net apps to work in ReactOS. Patch by the self-proclaimed Master of The Universe, Samuel Serapión.
svn path=/trunk/; revision=71399
- Use the calling thread instead of the passed-in thread to validate APC status in ExReleaseResourceForThreadLite. The latter can be user-set and might not be a KTHREAD at all.
CORE-11315 #resolve
svn path=/trunk/; revision=71398
Add exports for RtlOemStringToUnicodeSize, RtlUnicodeStringToAnsiSize and RtlUnicodeStringToOemSize as redirections to suitable Rtlx*** functions, as done in our ntoskrnl (and as on Windows either).
This should fix MSYS2 start on ReactOS.
CORE-10459 #comment Please retest!
svn path=/trunk/; revision=71397
- RChangeServiceConfigA/W: Modify or delete password secrets.
[ADVAPI32]
- ChangeServiceConfigA, CreateServiceA: Convert passwords to Unicode before passing them to the remote functions.
svn path=/trunk/; revision=71394
In Cc, replace the Vacb mutex by a Bcb resource.
Note that the resource is still placed in the Vacb by it belongs to the Bcb.
This is required to really implement CcSetBcbOwnerPointer().
CORE-11310
svn path=/trunk/; revision=71387
- Fix the flags used in LoadLibraryEx calls for loading DLLs as resource files.
- Use a nice flag (FORMAT_MESSAGE_MAX_WIDTH_MASK) in FormatMessage calls so that no useless extra newlines are appended to the message strings that are recovered.
This is especially useful when some strings as localized event log names are retrieved to be displayed in the menu (amongst other things)...
This fixes CORE-8915 and fixes also the presentation of some event descriptions.
- Fix BuildLogList.
svn path=/trunk/; revision=71378
- Set window parent for different MessageBox calls.
- Add a notice in ShowStatusMessageThread concerning a potential bug.
- Rename strings "Save Protocol" into "Save Event Log"; adjust translations in this regard.
svn path=/trunk/; revision=71377
- Fix a typo in the "loading, wait" dialog.
- Use a RichEdit control for the detailed event description text, so that we can have for free clickable URLs.
- Use "Courier New" as the font for the event data text, so that we can have finer grained control over the font size...
svn path=/trunk/; revision=71376
- Set received length to zero when the receive result is MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY instead of pretending we got data
CORE-11285 #resolve
svn path=/trunk/; revision=71373
- When handling CD READ_CAPACITY requests in AtapiInterrupt__, fully rewind the DataBuffer instead of relying on the last read length. Fixes crash on first stage boot in KVM.
CORE-11286 #resolve
CORE-11296
svn path=/trunk/; revision=71371
Update the amount of FAT entries taking into account that the first two are reserved and thus not usable.
Patch by Wim Hueskes
CORE-11283 #resolve #comment Committed in r71370, thanks for your patch!
svn path=/trunk/; revision=71370
- Fix the window styles of the edit boxes in the event details dialog.
- Refactor some parts of the code to reduce the level of code indentation.
- Replace malloc/free by their Win32 counterparts HeapAlloc/HeapFree.
- When caching the full contents of a given event log, don't load at this point the event text/data. Only load those when opening the event details dialog.
svn path=/trunk/; revision=71368
- Finish to convert the app to full unicode;
- Don't hardcode buffer lengths in function calls;
- Remove useless #pragma incantation;
- Whitespace fix.
svn path=/trunk/; revision=71367