Commit ab296a30 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

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.
parent 9559959f
...@@ -621,11 +621,23 @@ static HRESULT STDMETHODCALLTYPE windows_globalization_language_factory_QueryInt ...@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment