Rémi Bernon (@rbernon) commented about dlls/cryptowinrt/tests/crypto.c:
+ ok( bool_async_handler.status == Completed || broken( bool_async_handler.status == Error ), "got status %u\n", bool_async_handler.status ); + hr = IAsyncOperation_boolean_get_Completed( bool_async, &tmp_handler ); + ok( hr == S_OK, "get_Completed returned %#lx\n", hr ); + ok( tmp_handler == NULL, "got handler %p\n", tmp_handler ); + bool_async_handler = default_bool_async_handler; + hr = IAsyncOperation_boolean_put_Completed( bool_async, &bool_async_handler.IAsyncOperationCompletedHandler_boolean_iface ); + ok( hr == E_ILLEGAL_DELEGATE_ASSIGNMENT, "put_Completed returned %#lx\n", hr ); + ok( !bool_async_handler.invoked, "handler invoked\n" ); + ok( bool_async_handler.async == NULL, "got async %p\n", bool_async_handler.async ); + ok( bool_async_handler.status == Started, "got status %u\n", bool_async_handler.status ); + + hr = IAsyncOperation_boolean_QueryInterface( bool_async, &IID_IAsyncInfo, (void **)&async_info ); + ok( hr == S_OK, "QueryInterface returned %#lx\n", hr ); + hr = IAsyncInfo_Cancel( async_info ); + ok( hr == S_OK, "Cancel returned %#lx\n", hr ); + check_bool_async( bool_async, 0, Completed, S_OK, FALSE ); Fwiw, this would then be fine to keep because you will then be sure the operation has completed.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1714#note_19166