Previously the function waited for the conditions *after* querying the status, and then returned the old status. Also, if querying failed, it waited and when the wait timed out it returned STATUS_SUCCESS without returning any data. If the call to SetStatusNotify failed and there was no timeout, it would wait forever.
This is all fixed now.
- Let it be `"NDIS"`, instead of variations of `"SIMN"`.
- Use matching `ExFreePoolWithTag()`.
- Remove a redundant `KeyInformation = NULL;`.
Addendum to commits e8861acfb2 (r12196) and 5658b2154c (r53045).
CORE-18791
- Remove unused idedma.def
Addendum to commit 1daf74908e (r29256).
- Convert a few files to UTF-8 from ANSI
Plus, 2 tiny formatting fixes.
- id_ata.cpp: Unmark a ReactOS own diff
Addendum to commit 7fdf078134.
- id_init.cpp: Mark a diff
Addendum to commit 09dde2cff9.
- Upgrade to v0.47b from v0.47a
CORE-17876
Split Windows Server 2003 and Windows Vista behaviour in two different cases and make them used separately: when ReactOS target version is NT 5.2, use the 1st case, otherwise use the 2nd one instead.
Also, handle NdisPhysicalMediumNative802_11 case only for NT 6.0 and newer, since that's actually supported starting from NDIS 6.0, according to MSDN:
https://learn.microsoft.com/en-us/windows-hardware/drivers/network/oid-gen-physical-medium
while for NDIS 5.1 and newer it's:
https://learn.microsoft.com/en-us/previous-versions/windows/hardware/network/ff560255(v=vs.85)
This fixes:
1. A critical regression with unavailable networking in ReactOS when 3rd-party NT5-compatible Ethernet/Wi-Fi drivers are used (both in VM and on real hardware) caused by commit 3842b59f75 from @EricKohl.
2. Failure to open Network Properties and Network Status from the Network tray icon (caused by the same commit too).
MSDN tells us this is done so for Windows XP and Server 2003 as well, and IF_TYPE_IEEE80211 is returned only in Windows Vista and newer, so the following Microsoft documentation is actually correct in this case:
https://learn.microsoft.com/en-us/windows/win32/api/iptypes/ns-iptypes-ip_adapter_info
(see the information about "IP_ADAPTER_INFO.Type" member below on that page)
!!!Please note that the behaviour of Vista+ case (e. g., when compiling ReactOS targeted as NT 6.0 and newer) remains unchanged after this fix (networking still may not work), so it still requires the proper support of 3rd-party NT6+ compatible network miniport drivers (by handling this case via the Vista/NDIS6-style way) for NT6 target!!!
CORE-20244
Use a KSEMAPHORE instead of a NotificationEvent to signal availability. This is to prevent satisfying the wait for multiple waiters, when only a single entry is on the list.
Fixes crashes on SMP builds.
Add a SCSI and ATA passthrough support helper library for direct use
from low-level storage drivers.
Tested with: CDRoller, CloneCD, Magic ISO
NOTE: Vbox seems to lack support for CD/DVD burning; tested on real hardware.
CORE-10191 CORE-16452
CORE-14788 CORE-18241
CORE-17256 CORE-13866
ATA passthrough IOCTLs not supported by MS scsiport.
The implementation is optional, especially in SCSI.
IOCTL_SCSI_PASS_THROUGH will be implemented in SPTI library.
CORE-16422
- Move functions from header to main source, keeping their definitions
- Fix typo DefaultPalette -> VidpDefaultPalette
- Add missing PrepareForSetPixel() function
Addendum to 5f2ca473dc and cd91271796. CORE-17617 CORE-17604
Send OID_GEN_PHYSICAL_MEDIUM and OID_GEN_MEDIA_SUPPORTED query requests to NDIS.
This will enable us to distinguish wired and wireless ethernet adapters.
- Disable the Removable capability
- Enable the SilentInstall and SurpriseRemovalOK capabilities
This keeps the remove device icon from showing in the notification area whenever you plug in a mouse or a keyboard.
Fix a bug introduced in 5070e8960a.
CORE-17256
- These handlers must be memory resident. Otherwise,
this would cause a page fault that needs to be resolved.
Low-level storage drivers could evaluate ACPI control
methods while the device's IRP queue has been paused.
- Minor code enhancements.
- `MountMgrVolumeMountPointChanged()`: Set status code in all failure
paths and correct the check for remote or removable media.
- `DeleteRemoteDatabaseEntry()`: Do not allow the database with size of zero.
- `QueryVolumeName()`: Use reparse point file reference when no file name is supplied.
[USBCCGP]
Ignore invalid devices
Group audio function interfaces together
[USBPORT]
Prevent infinite loop in USBPORT_OpenPipe when endpoint is not becoming ready
Reason: the size of `READ_CAPACITY16_DATA` struct in UniATA driver and ReactOS/Windows SDK were not equal.
- In UniATA driver: `sizeof(READ_CAPACITY16_DATA) == 33` (wrong);
- In ReactOS/Windows SDK: `sizeof(READ_CAPACITY16_DATA) == 32` (correct).
CORE-19696
Move these out of ACPI in preparation for ACPI_NEW so they keep their juicy commit history.
Also both ACPIs can coexist for awhile as I don't see the old driver getting removed anytime soon.
`DeviceInformation->DeviceName.Buffer` was already freed via the previous
`FreePool(TargetDeviceName.Buffer);` call,
since `DeviceInformation->DeviceName` was set to `TargetDeviceName` above
in the code. This resulted in a pool double-free, triggering a corruption
of the pool, and a BSoD.
What had to be freed instead, is `DeviceInformation->SymbolicName.Buffer`
that is allocated at the beginning of the function.
URLs are getting old. We have to
update URLs for documentation
purpose.
JIRA issue: CORE-19963
- Refresh old URLs.
- Add " (DEAD_LINK)" labels
to dead links.
- Use MS Learn links rather
than MSDN ones.
- Some dead links revived by
Web Archive.
- Don't change Wine Tests
and Wine Sync.
- Don't change 3rd party libraries.
- Don't append "redirected" labels.
- When trying to find a device, don't fail with STATUS_NOT_FOUND if no
associated symbolic links are present. Instead, that test was wrong,
and should go out of the search loop to do the drive-letter processing.
Addendum to commit f9f5a78715.
- In addition, when using the associated-device method, fix the list
used to retrieve the corresponding device.
- In the TryWithVolumeName: block, reset DeviceString to NULL after
freeing, so that we can correctly fail with STATUS_NOT_FOUND if no
suitable device was found, before initializing the output data.
- Use FIELD_OFFSET to correct structure and member instead of hardcoding
sizeof-s of fields until the member of interest.
- Fix a bug in MountMgrQueryDosVolumePath() where the FIELD_OFFSET used
in the entry structure size validation was incorrect.
FIELD_OFFSET(MOUNTMGR_TARGET_NAME, DeviceNameLength) is == 0 since
DeviceNameLength is the first member of the MOUNTMGR_TARGET_NAME
structure. The intended member was DeviceName.
Addendum to commit f9f5a78715.
- Declare CMBATT_DISCHARGE_TIME and CMBATT_CAPACITY_BOGUS constructs
- Determine if the battery was already discharging and if not, update the time when it's being discharged
- Fix the condition where it checks if the battery has been discharging for quite some time
- Default the time to BATTERY_UNKNOWN_TIME if querying the estimated battery time request fails or if the battery has just started discharging not over 15 seconds
CORE-18969
CORE-19452