The Windows Bluetooth stack uses private IOCTLs in order to set the [discoverability](https://learn.microsoft.com/en-us/windows/win32/api/blueto… and [connectability](https://learn.microsoft.com/en-us/windows/win32/api/bluetoo… status of a local radio, and to start/stop the device inquiry procedure. This MR introduces 3 wine-specific IOCTL codes for the same purposes, as most applications seem to the Win32 API itself for these operations:
* IOCTL_WINBTH_RADIO_SET_FLAG
* IOCTL_WINEBTH_RADIO_START_DISCOVERY
* IOCTL_WINEBTH_RADIO_STOP_DISCOVERY
--
v6: winebth.sys: Call bluez_watcher_close as part of bluetooth_shutdown.
winebth.sys: Implement IOCTL_WINEBTH_RADIO_STOP_DISCOVERY.
winebth.sys: Implement IOCTL_WINEBTH_RADIO_START_DISCOVERY.
winebth.sys: Implement IOCTL_WINEBTH_RADIO_SET_FLAG.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7216
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v3: dlls/oleaut32: Implement SetHelpStringContext()
dlls/oleaut32: Add DeleteTypeInfo() base-cases in typelib.c
dlls/oleaut32: Allow TLB_get_typeinfo_by_name() to also return the index
dlls/oleaut32: Disambiguate pIndex in typelib.c
dlls/oleaut32: Avoid possible infinite loops and invalid mem access
dlls/oleaut32: Simplify SLTG_DoRefs() readability
dlls/oleaut32: Consistently use TLB_REF_NOT_FOUND
dlls/oleaut32: Consistently use lstrcmpiW() while looking for names
dlls/oleaut32: Simplify loop in ITypeLib2_Constructor_MSFT()
https://gitlab.winehq.org/wine/wine/-/merge_requests/7203
In cases where MF is already shut down, simply forwarding MFShutdown() to
RtwqShutdown() will corrupt the Rtwq lock count if async result objects
still exist, because they hold a lock. JR East Train Simulator does this.
--
v2: mf: Release the sample if stream sink processing fails.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7174
This PR updates the behaviour of `NtQueryDirectoryFile`, bringing it in line with current Windows behaviour. The need for this update was discovered when attempting to build the Unreal Engine with MSVC under Wine. In certain cases conditional include statements do not behave as expected, due to MSVC depending on undocumented behaviour of `NtQueryDirectoryFile`.
We ran tests on multiple versions of Windows, and discovered that the behaviour has changed since the original Wine implementation, but the documentation has not. The source code for our test tool, and a set of results can be found [here](https://github.com/TensorWorks/NtQueryDirectoryFile-Test). As of Windows 8, calling `NtQueryDirectoryFile` with a re-used handle, a new mask, and setting the `RestartScan` flag to True, causes the cached results to be erased and a new scan to be performed with the updated mask. Currently, Wine performs as did earlier versions of Windows, where the changed mask is ignored, and the cache is reused. This can cause `NtQueryDirectoryFile` under Wine to falsely report that files exist, when they do not.
This PR corrects this behaviour, invalidating the cache when required. Implementing this exposed further undocumented behaviour of `NtQueryDirectoryFile`, where a search for a non-existent file will return either `STATUS_NO_MORE_FILES` or `STATUS_NO_SUCH_FILE`, depending on whether or not the handle had been previously used regardless of the value of `RestartScan`. This was reflected in a `winetest` which allowed for the response to be either `STATUS_SUCCESS` or `STATUS_NO_MORE_FILES`.
This patch also adds unit tests for the new behaviour of `NtQueryDirectoryFile`. These tests pass when running `winetest` under Windows, and under Wine with these changes in place, but they will fail under older versions of Wine. If run under older versions of Windows the test suite will detect that this functionality is not supported, and will not run the updated tests.
--
v9: ntdll.dll: Update NtQueryDirectoryFile to align with current Windows behaviour
ntdll: Test updated NtQueryDirectoryFile mask reset behaviour
https://gitlab.winehq.org/wine/wine/-/merge_requests/6904