windows.globalization: Use separate AddRef/Release methods for the language factory.

This currently works only because refcount field is at the same offset between structures.
This commit is contained in:
Nikolay Sivov 2023-07-12 17:55:37 +02:00 committed by Alexandre Julliard
parent 9559959f95
commit ab296a305e

View file

@ -621,11 +621,23 @@ static HRESULT STDMETHODCALLTYPE windows_globalization_language_factory_QueryInt
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG STDMETHODCALLTYPE windows_globalization_language_factory_AddRef(IActivationFactory *iface)
{
struct language_factory *factory = impl_language_factory_from_IActivationFactory(iface);
return InterlockedIncrement(&factory->ref);
}
static ULONG STDMETHODCALLTYPE windows_globalization_language_factory_Release(IActivationFactory *iface)
{
struct language_factory *factory = impl_language_factory_from_IActivationFactory(iface);
return InterlockedDecrement(&factory->ref);
}
static const struct IActivationFactoryVtbl activation_factory_language_vtbl = static const struct IActivationFactoryVtbl activation_factory_language_vtbl =
{ {
windows_globalization_language_factory_QueryInterface, windows_globalization_language_factory_QueryInterface,
windows_globalization_AddRef, windows_globalization_language_factory_AddRef,
windows_globalization_Release, windows_globalization_language_factory_Release,
/* IInspectable methods */ /* IInspectable methods */
windows_globalization_GetIids, windows_globalization_GetIids,
windows_globalization_GetRuntimeClassName, windows_globalization_GetRuntimeClassName,