2022-04-06 18:28:42 +02:00
|
|
|
/* WinRT Windows.Media.Speech implementation
|
|
|
|
*
|
|
|
|
* Copyright 2022 Bernhard Kölbl for CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "private.h"
|
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(speech);
|
|
|
|
|
2022-04-22 14:48:05 +02:00
|
|
|
#define Closed 4
|
|
|
|
#define HANDLER_NOT_SET ((void *)~(ULONG_PTR)0)
|
|
|
|
|
2022-04-06 18:28:42 +02:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* IAsyncOperation<IInspectable*>
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct async_operation
|
|
|
|
{
|
|
|
|
IAsyncOperation_IInspectable IAsyncOperation_IInspectable_iface;
|
2022-04-06 18:28:43 +02:00
|
|
|
IAsyncInfo IAsyncInfo_iface;
|
2022-04-06 18:28:42 +02:00
|
|
|
const GUID *iid;
|
|
|
|
LONG ref;
|
2022-04-22 14:48:05 +02:00
|
|
|
|
|
|
|
IAsyncOperationCompletedHandler_IInspectable *handler;
|
2022-04-22 14:48:06 +02:00
|
|
|
IInspectable *result;
|
2022-04-22 14:48:05 +02:00
|
|
|
|
2022-04-22 14:48:06 +02:00
|
|
|
async_operation_callback callback;
|
|
|
|
TP_WORK *async_run_work;
|
|
|
|
IInspectable *invoker;
|
|
|
|
|
|
|
|
CRITICAL_SECTION cs;
|
2022-04-22 14:48:05 +02:00
|
|
|
AsyncStatus status;
|
|
|
|
HRESULT hr;
|
2022-04-06 18:28:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
static inline struct async_operation *impl_from_IAsyncOperation_IInspectable(IAsyncOperation_IInspectable *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, struct async_operation, IAsyncOperation_IInspectable_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_QueryInterface( IAsyncOperation_IInspectable *iface, REFIID iid, void **out )
|
|
|
|
{
|
|
|
|
struct async_operation *impl = impl_from_IAsyncOperation_IInspectable(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
|
|
|
|
|
|
|
|
if (IsEqualGUID(iid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(iid, &IID_IInspectable) ||
|
|
|
|
IsEqualGUID(iid, &IID_IAgileObject) ||
|
|
|
|
IsEqualGUID(iid, impl->iid))
|
|
|
|
{
|
|
|
|
IInspectable_AddRef((*out = &impl->IAsyncOperation_IInspectable_iface));
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2022-04-06 18:28:43 +02:00
|
|
|
if (IsEqualGUID(iid, &IID_IAsyncInfo))
|
|
|
|
{
|
|
|
|
IInspectable_AddRef((*out = &impl->IAsyncInfo_iface));
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2022-04-06 18:28:42 +02:00
|
|
|
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
|
|
|
|
*out = NULL;
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI async_operation_AddRef( IAsyncOperation_IInspectable *iface )
|
|
|
|
{
|
|
|
|
struct async_operation *impl = impl_from_IAsyncOperation_IInspectable(iface);
|
|
|
|
ULONG ref = InterlockedIncrement(&impl->ref);
|
|
|
|
TRACE("iface %p, ref %lu.\n", iface, ref);
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI async_operation_Release( IAsyncOperation_IInspectable *iface )
|
|
|
|
{
|
|
|
|
struct async_operation *impl = impl_from_IAsyncOperation_IInspectable(iface);
|
|
|
|
|
|
|
|
ULONG ref = InterlockedDecrement(&impl->ref);
|
|
|
|
TRACE("iface %p, ref %lu.\n", iface, ref);
|
|
|
|
|
|
|
|
if (!ref)
|
2022-04-22 14:48:05 +02:00
|
|
|
{
|
|
|
|
IAsyncInfo_Close(&impl->IAsyncInfo_iface);
|
|
|
|
|
2022-04-22 14:48:06 +02:00
|
|
|
if (impl->invoker)
|
|
|
|
IInspectable_Release(impl->invoker);
|
2022-04-22 14:48:05 +02:00
|
|
|
if (impl->handler && impl->handler != HANDLER_NOT_SET)
|
|
|
|
IAsyncOperationCompletedHandler_IInspectable_Release(impl->handler);
|
2022-04-22 14:48:06 +02:00
|
|
|
if (impl->result)
|
|
|
|
IInspectable_Release(impl->result);
|
2022-04-22 14:48:05 +02:00
|
|
|
|
2022-04-22 14:48:06 +02:00
|
|
|
DeleteCriticalSection(&impl->cs);
|
2022-04-06 18:28:42 +02:00
|
|
|
free(impl);
|
2022-04-22 14:48:05 +02:00
|
|
|
}
|
2022-04-06 18:28:42 +02:00
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_GetIids( IAsyncOperation_IInspectable *iface, ULONG *iid_count, IID **iids )
|
|
|
|
{
|
|
|
|
FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_GetRuntimeClassName( IAsyncOperation_IInspectable *iface, HSTRING *class_name )
|
|
|
|
{
|
|
|
|
FIXME("iface %p, class_name %p stub!\n", iface, class_name);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_GetTrustLevel( IAsyncOperation_IInspectable *iface, TrustLevel *trust_level )
|
|
|
|
{
|
|
|
|
FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_put_Completed( IAsyncOperation_IInspectable *iface,
|
|
|
|
IAsyncOperationCompletedHandler_IInspectable *handler )
|
|
|
|
{
|
2022-04-22 14:48:05 +02:00
|
|
|
struct async_operation *impl = impl_from_IAsyncOperation_IInspectable(iface);
|
|
|
|
HRESULT hr = S_OK;
|
|
|
|
|
|
|
|
TRACE("iface %p, handler %p.\n", iface, handler);
|
|
|
|
|
2022-04-22 14:48:06 +02:00
|
|
|
EnterCriticalSection(&impl->cs);
|
2022-04-22 14:48:05 +02:00
|
|
|
if (impl->status == Closed)
|
|
|
|
hr = E_ILLEGAL_METHOD_CALL;
|
|
|
|
else if (impl->handler != HANDLER_NOT_SET)
|
|
|
|
hr = E_ILLEGAL_DELEGATE_ASSIGNMENT;
|
|
|
|
/*
|
|
|
|
impl->handler can only be set once with async_operation_put_Completed,
|
|
|
|
so by default we set a non HANDLER_NOT_SET value, in this case handler.
|
|
|
|
*/
|
|
|
|
else if ((impl->handler = handler))
|
|
|
|
{
|
|
|
|
IAsyncOperationCompletedHandler_IInspectable_AddRef(impl->handler);
|
|
|
|
|
|
|
|
if (impl->status > Started)
|
|
|
|
{
|
|
|
|
IAsyncOperation_IInspectable *operation = &impl->IAsyncOperation_IInspectable_iface;
|
|
|
|
AsyncStatus status = impl->status;
|
|
|
|
impl->handler = NULL; /* Prevent concurrent invoke. */
|
2022-04-22 14:48:06 +02:00
|
|
|
LeaveCriticalSection(&impl->cs);
|
2022-04-22 14:48:05 +02:00
|
|
|
|
|
|
|
IAsyncOperationCompletedHandler_IInspectable_Invoke(handler, operation, status);
|
|
|
|
IAsyncOperationCompletedHandler_IInspectable_Release(handler);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
}
|
2022-04-22 14:48:06 +02:00
|
|
|
LeaveCriticalSection(&impl->cs);
|
2022-04-22 14:48:05 +02:00
|
|
|
|
|
|
|
return hr;
|
2022-04-06 18:28:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_get_Completed( IAsyncOperation_IInspectable *iface,
|
|
|
|
IAsyncOperationCompletedHandler_IInspectable **handler )
|
|
|
|
{
|
2022-04-22 14:48:05 +02:00
|
|
|
struct async_operation *impl = impl_from_IAsyncOperation_IInspectable(iface);
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
FIXME("iface %p, handler %p semi stub!\n", iface, handler);
|
|
|
|
|
2022-04-22 14:48:06 +02:00
|
|
|
EnterCriticalSection(&impl->cs);
|
2022-04-22 14:48:05 +02:00
|
|
|
if (impl->status == Closed)
|
|
|
|
hr = E_ILLEGAL_METHOD_CALL;
|
|
|
|
else
|
|
|
|
hr = S_OK;
|
|
|
|
|
|
|
|
*handler = (impl->handler != HANDLER_NOT_SET) ? impl->handler : NULL;
|
2022-04-22 14:48:06 +02:00
|
|
|
LeaveCriticalSection(&impl->cs);
|
|
|
|
|
2022-04-22 14:48:05 +02:00
|
|
|
return hr;
|
2022-04-06 18:28:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_GetResults( IAsyncOperation_IInspectable *iface, IInspectable **results )
|
|
|
|
{
|
2022-04-22 14:48:05 +02:00
|
|
|
/* NOTE: Despite the name, this function only returns one result! */
|
|
|
|
struct async_operation *impl = impl_from_IAsyncOperation_IInspectable(iface);
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("iface %p, results %p.\n", iface, results);
|
|
|
|
|
2022-04-22 14:48:06 +02:00
|
|
|
EnterCriticalSection(&impl->cs);
|
2022-04-25 17:29:13 +02:00
|
|
|
if (impl->status != Completed && impl->status != Error)
|
2022-04-22 14:48:05 +02:00
|
|
|
hr = E_ILLEGAL_METHOD_CALL;
|
2022-04-25 17:29:13 +02:00
|
|
|
else if (!impl->result)
|
|
|
|
hr = E_UNEXPECTED;
|
|
|
|
else
|
2022-04-22 14:48:06 +02:00
|
|
|
{
|
|
|
|
*results = impl->result;
|
|
|
|
impl->result = NULL; /* NOTE: AsyncOperation gives up it's reference to result here! */
|
2022-04-25 17:29:13 +02:00
|
|
|
hr = impl->hr;
|
2022-04-22 14:48:06 +02:00
|
|
|
}
|
|
|
|
LeaveCriticalSection(&impl->cs);
|
2022-04-22 14:48:05 +02:00
|
|
|
|
|
|
|
return hr;
|
2022-04-06 18:28:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IAsyncOperation_IInspectableVtbl async_operation_vtbl =
|
|
|
|
{
|
|
|
|
/* IUnknown methods */
|
|
|
|
async_operation_QueryInterface,
|
|
|
|
async_operation_AddRef,
|
|
|
|
async_operation_Release,
|
|
|
|
/* IInspectable methods */
|
|
|
|
async_operation_GetIids,
|
|
|
|
async_operation_GetRuntimeClassName,
|
|
|
|
async_operation_GetTrustLevel,
|
|
|
|
/* IAsyncOperation<IInspectable*> */
|
|
|
|
async_operation_put_Completed,
|
|
|
|
async_operation_get_Completed,
|
|
|
|
async_operation_GetResults
|
|
|
|
};
|
|
|
|
|
2022-04-06 18:28:43 +02:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* IAsyncInfo
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
DEFINE_IINSPECTABLE(async_operation_info, IAsyncInfo, struct async_operation, IAsyncOperation_IInspectable_iface)
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_info_get_Id( IAsyncInfo *iface, UINT32 *id )
|
|
|
|
{
|
|
|
|
FIXME("iface %p, id %p stub!\n", iface, id);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_info_get_Status( IAsyncInfo *iface, AsyncStatus *status )
|
|
|
|
{
|
2022-04-22 14:48:05 +02:00
|
|
|
struct async_operation *impl = impl_from_IAsyncInfo(iface);
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("iface %p, status %p.\n", iface, status);
|
|
|
|
|
2022-04-22 14:48:06 +02:00
|
|
|
EnterCriticalSection(&impl->cs);
|
2022-04-22 14:48:05 +02:00
|
|
|
if (impl->status == Closed)
|
|
|
|
hr = E_ILLEGAL_METHOD_CALL;
|
|
|
|
else
|
|
|
|
hr = S_OK;
|
|
|
|
|
|
|
|
*status = impl->status;
|
2022-04-22 14:48:06 +02:00
|
|
|
LeaveCriticalSection(&impl->cs);
|
|
|
|
|
2022-04-22 14:48:05 +02:00
|
|
|
return hr;
|
2022-04-06 18:28:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_info_get_ErrorCode( IAsyncInfo *iface, HRESULT *error_code )
|
|
|
|
{
|
2022-04-22 14:48:05 +02:00
|
|
|
struct async_operation *impl = impl_from_IAsyncInfo(iface);
|
2022-04-25 17:31:44 +02:00
|
|
|
HRESULT hr = S_OK;
|
|
|
|
|
2022-04-22 14:48:05 +02:00
|
|
|
TRACE("iface %p, error_code %p.\n", iface, error_code);
|
|
|
|
|
2022-04-22 14:48:06 +02:00
|
|
|
EnterCriticalSection(&impl->cs);
|
2022-04-25 17:31:44 +02:00
|
|
|
if (impl->status == Closed)
|
|
|
|
*error_code = hr = E_ILLEGAL_METHOD_CALL;
|
|
|
|
else
|
|
|
|
*error_code = impl->hr;
|
2022-04-22 14:48:06 +02:00
|
|
|
LeaveCriticalSection(&impl->cs);
|
|
|
|
|
2022-04-25 17:31:44 +02:00
|
|
|
return hr;
|
2022-04-06 18:28:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_info_Cancel( IAsyncInfo *iface )
|
|
|
|
{
|
2022-04-22 14:48:05 +02:00
|
|
|
struct async_operation *impl = impl_from_IAsyncInfo(iface);
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
hr = S_OK;
|
|
|
|
|
2022-04-22 14:48:06 +02:00
|
|
|
EnterCriticalSection(&impl->cs);
|
2022-04-22 14:48:05 +02:00
|
|
|
if (impl->status == Closed)
|
|
|
|
hr = E_ILLEGAL_METHOD_CALL;
|
|
|
|
else if (impl->status == Started)
|
|
|
|
impl->status = Canceled;
|
2022-04-22 14:48:06 +02:00
|
|
|
LeaveCriticalSection(&impl->cs);
|
2022-04-22 14:48:05 +02:00
|
|
|
|
|
|
|
return hr;
|
2022-04-06 18:28:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI async_operation_info_Close( IAsyncInfo *iface )
|
|
|
|
{
|
2022-04-22 14:48:05 +02:00
|
|
|
struct async_operation *impl = impl_from_IAsyncInfo(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
2022-04-22 14:48:06 +02:00
|
|
|
EnterCriticalSection(&impl->cs);
|
2022-04-22 14:48:05 +02:00
|
|
|
if (impl->status == Started)
|
2022-04-22 14:48:06 +02:00
|
|
|
{
|
|
|
|
LeaveCriticalSection(&impl->cs);
|
2022-04-22 14:48:05 +02:00
|
|
|
return E_ILLEGAL_STATE_CHANGE;
|
2022-04-22 14:48:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (impl->async_run_work)
|
|
|
|
{
|
|
|
|
CloseThreadpoolWork(impl->async_run_work);
|
|
|
|
impl->async_run_work = NULL;
|
|
|
|
}
|
2022-04-22 14:48:05 +02:00
|
|
|
|
|
|
|
impl->status = Closed;
|
2022-04-22 14:48:06 +02:00
|
|
|
LeaveCriticalSection(&impl->cs);
|
|
|
|
|
2022-04-22 14:48:05 +02:00
|
|
|
return S_OK;
|
2022-04-06 18:28:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IAsyncInfoVtbl async_operation_info_vtbl =
|
|
|
|
{
|
|
|
|
/* IUnknown methods */
|
|
|
|
async_operation_info_QueryInterface,
|
|
|
|
async_operation_info_AddRef,
|
|
|
|
async_operation_info_Release,
|
|
|
|
/* IInspectable methods */
|
|
|
|
async_operation_info_GetIids,
|
|
|
|
async_operation_info_GetRuntimeClassName,
|
|
|
|
async_operation_info_GetTrustLevel,
|
|
|
|
/* IAsyncInfo */
|
|
|
|
async_operation_info_get_Id,
|
|
|
|
async_operation_info_get_Status,
|
|
|
|
async_operation_info_get_ErrorCode,
|
|
|
|
async_operation_info_Cancel,
|
|
|
|
async_operation_info_Close
|
|
|
|
};
|
|
|
|
|
2022-04-22 14:48:06 +02:00
|
|
|
static void CALLBACK async_run_cb(TP_CALLBACK_INSTANCE *instance, void *data, TP_WORK *work)
|
|
|
|
{
|
|
|
|
IAsyncOperation_IInspectable *operation = data;
|
|
|
|
IInspectable *result = NULL;
|
|
|
|
struct async_operation *impl = impl_from_IAsyncOperation_IInspectable(operation);
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
hr = impl->callback(impl->invoker, &result);
|
|
|
|
|
|
|
|
EnterCriticalSection(&impl->cs);
|
|
|
|
if (impl->status < Closed)
|
|
|
|
impl->status = FAILED(hr) ? Error : Completed;
|
|
|
|
|
|
|
|
impl->result = result;
|
|
|
|
impl->hr = hr;
|
|
|
|
|
|
|
|
if (impl->handler != NULL && impl->handler != HANDLER_NOT_SET)
|
|
|
|
{
|
|
|
|
IAsyncOperationCompletedHandler_IInspectable *handler = impl->handler;
|
|
|
|
AsyncStatus status = impl->status;
|
|
|
|
impl->handler = NULL; /* Prevent concurrent invoke. */
|
|
|
|
LeaveCriticalSection(&impl->cs);
|
|
|
|
|
|
|
|
IAsyncOperationCompletedHandler_IInspectable_Invoke(handler, operation, status);
|
|
|
|
IAsyncOperationCompletedHandler_IInspectable_Release(handler);
|
|
|
|
}
|
|
|
|
else LeaveCriticalSection(&impl->cs);
|
|
|
|
|
|
|
|
IAsyncOperation_IInspectable_Release(operation);
|
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT async_operation_create( const GUID *iid, IInspectable *invoker, async_operation_callback callback, IAsyncOperation_IInspectable **out )
|
2022-04-06 18:28:42 +02:00
|
|
|
{
|
|
|
|
struct async_operation *impl;
|
2022-04-22 14:48:05 +02:00
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
*out = NULL;
|
2022-04-06 18:28:42 +02:00
|
|
|
|
|
|
|
if (!(impl = calloc(1, sizeof(*impl))))
|
|
|
|
{
|
2022-04-22 14:48:05 +02:00
|
|
|
hr = E_OUTOFMEMORY;
|
|
|
|
goto error;
|
2022-04-06 18:28:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
impl->IAsyncOperation_IInspectable_iface.lpVtbl = &async_operation_vtbl;
|
2022-04-06 18:28:43 +02:00
|
|
|
impl->IAsyncInfo_iface.lpVtbl = &async_operation_info_vtbl;
|
2022-04-06 18:28:42 +02:00
|
|
|
impl->iid = iid;
|
|
|
|
impl->ref = 1;
|
|
|
|
|
2022-04-22 14:48:05 +02:00
|
|
|
impl->handler = HANDLER_NOT_SET;
|
2022-04-22 14:48:06 +02:00
|
|
|
impl->callback = callback;
|
|
|
|
impl->status = Started;
|
|
|
|
|
|
|
|
IAsyncOperation_IInspectable_AddRef(&impl->IAsyncOperation_IInspectable_iface); /* AddRef to keep the obj alive in the callback. */
|
|
|
|
if (!(impl->async_run_work = CreateThreadpoolWork(async_run_cb, &impl->IAsyncOperation_IInspectable_iface, NULL)))
|
|
|
|
{
|
|
|
|
hr = HRESULT_FROM_WIN32(GetLastError());
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (invoker) IInspectable_AddRef((impl->invoker = invoker));
|
|
|
|
|
|
|
|
InitializeCriticalSection(&impl->cs);
|
|
|
|
impl->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": async_operation.cs");
|
|
|
|
|
|
|
|
SubmitThreadpoolWork(impl->async_run_work);
|
2022-04-22 14:48:05 +02:00
|
|
|
|
2022-04-06 18:28:42 +02:00
|
|
|
*out = &impl->IAsyncOperation_IInspectable_iface;
|
|
|
|
TRACE("created %p\n", *out);
|
|
|
|
return S_OK;
|
2022-04-22 14:48:05 +02:00
|
|
|
|
|
|
|
error:
|
|
|
|
free(impl);
|
|
|
|
return hr;
|
2022-04-06 18:28:42 +02:00
|
|
|
}
|