Bernhard K��lbl (@besentv) commented about dlls/windows.devices.enumeration/tests/devices.c:
+ todo_wine ok(hr == S_OK, "got hr %#lx\n", hr); + todo_wine ok(status == DeviceWatcherStatus_Started, "got status %u\n", status); + + hr = IDeviceWatcher_Stop(device_watcher); + ok(hr == S_OK, "got hr %#lx\n", hr); + WaitForSingleObject(stopped_handler.event, INFINITE); + + hr = IDeviceWatcher_get_Status(device_watcher, &status); + todo_wine ok(hr == S_OK, "got hr %#lx\n", hr); + todo_wine ok(status == DeviceWatcherStatus_Stopped, "got status %u\n", status); + ok(stopped_handler.invoked, "stopped_handler not invoked\n"); + ok(stopped_handler.args == NULL, "stopped_handler not invoked\n"); + + CloseHandle(stopped_handler.event); + IDeviceWatcher_Release(device_watcher); + Release here in reverse order:
``` IDeviceInformationStatics2_Release(device_info_statics2); skip_statics2: IInspectable_Release(inspectable2); IInspectable_Release(inspectable); ``` And maybe add a ref check to the last release. (Yeah yeah, me and ref checks, haha) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/716#note_7011