[PATCH 0/3] MR10622: msxml6: Implement Windows.Data.Xml.Dom.XmlLoadSettings runtime class.
From: Olivia Ryan <olivia.r.dev@gmail.com> --- dlls/msxml6/Makefile.in | 5 +- dlls/msxml6/classes.idl | 26 +++++++++ dlls/msxml6/load_settings.c | 113 ++++++++++++++++++++++++++++++++++++ dlls/msxml6/main.c | 38 ++++++++++++ dlls/msxml6/msxml6.spec | 1 + dlls/msxml6/private.h | 34 +++++++++++ 6 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 dlls/msxml6/classes.idl create mode 100644 dlls/msxml6/load_settings.c create mode 100644 dlls/msxml6/main.c create mode 100644 dlls/msxml6/private.h diff --git a/dlls/msxml6/Makefile.in b/dlls/msxml6/Makefile.in index 04ff7131cf6..76e9e614ed1 100644 --- a/dlls/msxml6/Makefile.in +++ b/dlls/msxml6/Makefile.in @@ -1,10 +1,13 @@ MODULE = msxml6.dll -IMPORTS = oleaut32 ole32 advapi32 +IMPORTS = oleaut32 ole32 advapi32 combase VER_FILEDESCRIPTION_STR = "Wine MSXML 6.0" VER_PRODUCTVERSION = 6,30,7601,24498 VER_OLESELFREGISTER = 1 SOURCES = \ + classes.idl \ + load_settings.c \ + main.c \ msxml6_tlb.idl \ rsrc.rc diff --git a/dlls/msxml6/classes.idl b/dlls/msxml6/classes.idl new file mode 100644 index 00000000000..4b1b57aa5b7 --- /dev/null +++ b/dlls/msxml6/classes.idl @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2026 Olivia Ryan + * + * 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 + */ + +#pragma makedep register +#pragma winrt ns_prefix + +import "windows.data.xml.dom.idl"; + +namespace Windows.Data.Xml.Dom { + runtimeclass XmlLoadSettings; +} diff --git a/dlls/msxml6/load_settings.c b/dlls/msxml6/load_settings.c new file mode 100644 index 00000000000..0b4b579bc3c --- /dev/null +++ b/dlls/msxml6/load_settings.c @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2026 Olivia Ryan + * + * 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" + +WINE_DEFAULT_DEBUG_CHANNEL(msxml6); + +struct factory +{ + IActivationFactory IActivationFactory_iface; + LONG ref; +}; + +static inline struct factory *impl_from_IActivationFactory( IActivationFactory *iface ) +{ + return CONTAINING_RECORD( iface, struct factory, IActivationFactory_iface ); +} + +static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID iid, void **out ) +{ + struct factory *impl = impl_from_IActivationFactory( 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, &IID_IActivationFactory )) + { + IInspectable_AddRef( *out = &impl->IActivationFactory_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI factory_AddRef( IActivationFactory *iface ) +{ + struct factory *impl = impl_from_IActivationFactory( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p, ref %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI factory_Release( IActivationFactory *iface ) +{ + struct factory *impl = impl_from_IActivationFactory( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p, ref %lu.\n", iface, ref ); + return ref; +} + +static HRESULT WINAPI factory_GetIids( IActivationFactory *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 factory_GetRuntimeClassName( IActivationFactory *iface, HSTRING *class_name ) +{ + FIXME( "iface %p, class_name %p stub!\n", iface, class_name ); + return E_NOTIMPL; +} + +static HRESULT WINAPI factory_GetTrustLevel( IActivationFactory *iface, TrustLevel *trust_level ) +{ + FIXME( "iface %p, trust_level %p stub!\n", iface, trust_level ); + return E_NOTIMPL; +} + +static HRESULT WINAPI factory_ActivateInstance( IActivationFactory *iface, IInspectable **instance ) +{ + FIXME( "iface %p, instance %p stub!\n", iface, instance ); + return E_NOTIMPL; +} + +static const struct IActivationFactoryVtbl factory_vtbl = +{ + factory_QueryInterface, + factory_AddRef, + factory_Release, + /* IInspectable methods */ + factory_GetIids, + factory_GetRuntimeClassName, + factory_GetTrustLevel, + /* IActivationFactory methods */ + factory_ActivateInstance, +}; + +static struct factory factory = +{ + {&factory_vtbl}, + 1, +}; + +IActivationFactory *xml_load_settings_factory = &factory.IActivationFactory_iface; diff --git a/dlls/msxml6/main.c b/dlls/msxml6/main.c new file mode 100644 index 00000000000..b8704b1f50e --- /dev/null +++ b/dlls/msxml6/main.c @@ -0,0 +1,38 @@ +/* + * Copyright 2026 Olivia Ryan + * + * 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 "initguid.h" + +#include "private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msxml6); + +HRESULT WINAPI DllGetActivationFactory( HSTRING classid, IActivationFactory **factory ) +{ + const WCHAR *buffer = WindowsGetStringRawBuffer( classid, NULL ); + + TRACE( "class %s, factory %p.\n", debugstr_hstring( classid ), factory ); + + *factory = NULL; + + if (!wcscmp( buffer, RuntimeClass_Windows_Data_Xml_Dom_XmlLoadSettings )) + IActivationFactory_QueryInterface( xml_load_settings_factory, &IID_IActivationFactory, (void **)factory ); + + if (*factory) return S_OK; + return CLASS_E_CLASSNOTAVAILABLE; +} diff --git a/dlls/msxml6/msxml6.spec b/dlls/msxml6/msxml6.spec index 5fd4c2841f9..9c2fa0c8a83 100644 --- a/dlls/msxml6/msxml6.spec +++ b/dlls/msxml6/msxml6.spec @@ -1,4 +1,5 @@ @ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetActivationFactory(ptr ptr) @ stdcall -private DllGetClassObject(ptr ptr ptr) msxml3.DllGetClassObject @ stdcall -private DllRegisterServer() @ stdcall -private DllUnregisterServer() diff --git a/dlls/msxml6/private.h b/dlls/msxml6/private.h new file mode 100644 index 00000000000..d1ef7031f4c --- /dev/null +++ b/dlls/msxml6/private.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2026 Olivia Ryan + * + * 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 + */ + +#ifndef __WINE_MSXML6_PRIVATE +#define __WINE_MSXML6_PRIVATE + +#include "winstring.h" +#include "wine/debug.h" + +#define COBJMACROS +#include "activation.h" + +#define WIDL_using_Windows_Data_Xml_Dom +#include "windows.data.xml.dom.h" + +extern IActivationFactory *xml_load_settings_factory; + + +#endif /* __WINE_MSXML6_PRIVATE */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10622
From: Olivia Ryan <olivia.r.dev@gmail.com> --- dlls/msxml6/load_settings.c | 193 +++++++++++++++++++++++++++++++++++- 1 file changed, 191 insertions(+), 2 deletions(-) diff --git a/dlls/msxml6/load_settings.c b/dlls/msxml6/load_settings.c index 0b4b579bc3c..fe07abd5ac1 100644 --- a/dlls/msxml6/load_settings.c +++ b/dlls/msxml6/load_settings.c @@ -20,6 +20,179 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml6); +struct load_settings +{ + IXmlLoadSettings IXmlLoadSettings_iface; + LONG ref; + UINT32 max_element_depth; + boolean prohibit_dtd; + boolean resolve_externals; + boolean validate_on_parse; + boolean element_content_white_space; +}; + +static inline struct load_settings *impl_from_IXmlLoadSettings( IXmlLoadSettings *iface ) +{ + return CONTAINING_RECORD( iface, struct load_settings, IXmlLoadSettings_iface ); +} + +static HRESULT WINAPI load_settings_QueryInterface( IXmlLoadSettings *iface, REFIID iid, void **out ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( 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, &IID_IXmlLoadSettings )) + { + IInspectable_AddRef( *out = &impl->IXmlLoadSettings_iface ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI load_settings_AddRef( IXmlLoadSettings *iface ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p, ref %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI load_settings_Release( IXmlLoadSettings *iface ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + TRACE( "iface %p, ref %lu.\n", iface, ref ); + if (!ref) free( impl ); + return ref; +} + +static HRESULT WINAPI load_settings_GetIids( IXmlLoadSettings *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 load_settings_GetRuntimeClassName( IXmlLoadSettings *iface, HSTRING *class_name ) +{ + FIXME( "iface %p, class_name %p stub!\n", iface, class_name ); + return E_NOTIMPL; +} + +static HRESULT WINAPI load_settings_GetTrustLevel( IXmlLoadSettings *iface, TrustLevel *trust_level ) +{ + FIXME( "iface %p, trust_level %p stub!\n", iface, trust_level ); + return E_NOTIMPL; +} + +static HRESULT WINAPI load_settings_get_MaxElementDepth( IXmlLoadSettings *iface, UINT32 *value ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + TRACE( "iface %p, value %p.\n", iface, value ); + *value = impl->max_element_depth; + return S_OK; +} + +static HRESULT WINAPI load_settings_put_MaxElementDepth( IXmlLoadSettings *iface, UINT32 value ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + TRACE( "iface %p, value %u.\n", iface, value ); + impl->max_element_depth = value; + return S_OK; +} + +static HRESULT WINAPI load_settings_get_ProhibitDtd( IXmlLoadSettings *iface, boolean *value ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + TRACE( "iface %p, value %p.\n", iface, value ); + *value = impl->prohibit_dtd; + return S_OK; +} + +static HRESULT WINAPI load_settings_put_ProhibitDtd( IXmlLoadSettings *iface, boolean value ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + TRACE( "iface %p, value %d.\n", iface, value ); + impl->prohibit_dtd = value; + return S_OK; +} + +static HRESULT WINAPI load_settings_get_ResolveExternals( IXmlLoadSettings *iface, boolean *value ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + TRACE( "iface %p, value %p.\n", iface, value ); + *value = impl->resolve_externals; + return S_OK; +} + +static HRESULT WINAPI load_settings_put_ResolveExternals( IXmlLoadSettings *iface, boolean value ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + TRACE( "iface %p, value %d.\n", iface, value ); + impl->resolve_externals = value; + return S_OK; +} + +static HRESULT WINAPI load_settings_get_ValidateOnParse( IXmlLoadSettings *iface, boolean *value ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + TRACE( "iface %p, value %p.\n", iface, value ); + *value = impl->validate_on_parse; + return S_OK; +} + +static HRESULT WINAPI load_settings_put_ValidateOnParse( IXmlLoadSettings *iface, boolean value ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + TRACE( "iface %p, value %d.\n", iface, value ); + impl->validate_on_parse = value; + return S_OK; +} + +static HRESULT WINAPI load_settings_get_ElementContentWhiteSpace( IXmlLoadSettings *iface, boolean *value ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + TRACE( "iface %p, value %p.\n", iface, value ); + *value = impl->element_content_white_space; + return S_OK; +} + +static HRESULT WINAPI load_settings_put_ElementContentWhiteSpace( IXmlLoadSettings *iface, boolean value ) +{ + struct load_settings *impl = impl_from_IXmlLoadSettings( iface ); + TRACE( "iface %p, value %d.\n", iface, value ); + impl->element_content_white_space = value; + return S_OK; +} + +static const struct IXmlLoadSettingsVtbl load_settings_vtbl = +{ + load_settings_QueryInterface, + load_settings_AddRef, + load_settings_Release, + /* IInspectable methods */ + load_settings_GetIids, + load_settings_GetRuntimeClassName, + load_settings_GetTrustLevel, + /* IXmlLoadSettings methods */ + load_settings_get_MaxElementDepth, + load_settings_put_MaxElementDepth, + load_settings_get_ProhibitDtd, + load_settings_put_ProhibitDtd, + load_settings_get_ResolveExternals, + load_settings_put_ResolveExternals, + load_settings_get_ValidateOnParse, + load_settings_put_ValidateOnParse, + load_settings_get_ElementContentWhiteSpace, + load_settings_put_ElementContentWhiteSpace, +}; + struct factory { IActivationFactory IActivationFactory_iface; @@ -87,8 +260,24 @@ static HRESULT WINAPI factory_GetTrustLevel( IActivationFactory *iface, TrustLev static HRESULT WINAPI factory_ActivateInstance( IActivationFactory *iface, IInspectable **instance ) { - FIXME( "iface %p, instance %p stub!\n", iface, instance ); - return E_NOTIMPL; + struct load_settings *impl; + + TRACE( "iface %p, instance %p.\n", iface, instance ); + + *instance = NULL; + if (!(impl = calloc( 1, sizeof(*impl) ))) return E_OUTOFMEMORY; + + impl->IXmlLoadSettings_iface.lpVtbl = &load_settings_vtbl; + impl->ref = 1; + + impl->max_element_depth = 256; + impl->prohibit_dtd = TRUE; + impl->resolve_externals = FALSE; + impl->validate_on_parse = FALSE; + impl->element_content_white_space = TRUE; + + *instance = (IInspectable *)&impl->IXmlLoadSettings_iface; + return S_OK; } static const struct IActivationFactoryVtbl factory_vtbl = -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10622
From: Olivia Ryan <olivia.r.dev@gmail.com> --- dlls/msxml6/tests/Makefile.in | 3 +- dlls/msxml6/tests/runtime.c | 140 ++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 dlls/msxml6/tests/runtime.c diff --git a/dlls/msxml6/tests/Makefile.in b/dlls/msxml6/tests/Makefile.in index a544aeb8aef..d5f7712bfa2 100644 --- a/dlls/msxml6/tests/Makefile.in +++ b/dlls/msxml6/tests/Makefile.in @@ -1,7 +1,8 @@ TESTDLL = msxml6.dll -IMPORTS = oleaut32 ole32 +IMPORTS = oleaut32 ole32 combase SOURCES = \ domdoc.c \ + runtime.c \ saxreader.c \ schema.c diff --git a/dlls/msxml6/tests/runtime.c b/dlls/msxml6/tests/runtime.c new file mode 100644 index 00000000000..12600fc93a7 --- /dev/null +++ b/dlls/msxml6/tests/runtime.c @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2026 Olivia Ryan + * + * 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 + */ + +#define COBJMACROS +#include "winstring.h" + +#include "initguid.h" +#include "roapi.h" + +#define WIDL_using_Windows_Data_Xml_Dom +#include "windows.data.xml.dom.h" + +#include "wine/test.h" + +#define check_interface( obj, iid ) check_interface_( __LINE__, obj, iid ) +static void check_interface_( unsigned int line, void *obj, const IID *iid ) +{ + IUnknown *iface = obj; + IUnknown *unk; + HRESULT hr; + + hr = IUnknown_QueryInterface( iface, iid, (void **)&unk ); + ok_(__FILE__, line)( hr == S_OK, "got hr %#lx.\n", hr ); + IUnknown_Release( unk ); +} + +static void test_XmlLoadSettings(void) +{ + static const WCHAR *class_name = RuntimeClass_Windows_Data_Xml_Dom_XmlLoadSettings; + IXmlLoadSettings *load_settings; + IActivationFactory *factory; + boolean setting_bool; + UINT32 setting_int; + HSTRING str; + HRESULT hr; + LONG ref; + + hr = WindowsCreateString( class_name, wcslen( class_name ), &str ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + + hr = RoGetActivationFactory( str, &IID_IActivationFactory, (void **)&factory ); + WindowsDeleteString( str ); + ok( hr == S_OK || broken( hr == REGDB_E_CLASSNOTREG ), "got hr %#lx.\n", hr ); + if (FAILED(hr)) + { + win_skip( "%s runtimeclass not found, skipping tests.\n", wine_dbgstr_w( class_name ) ); + return; + } + + check_interface( factory, &IID_IUnknown ); + check_interface( factory, &IID_IInspectable ); + check_interface( factory, &IID_IAgileObject ); + check_interface( factory, &IID_IActivationFactory ); + + hr = IActivationFactory_ActivateInstance( factory, (IInspectable **)&load_settings ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + + ref = IActivationFactory_Release( factory ); + ok( ref == 1, "got ref %ld.\n", ref ); + + check_interface( load_settings, &IID_IUnknown ); + check_interface( load_settings, &IID_IInspectable ); + check_interface( load_settings, &IID_IAgileObject ); + check_interface( load_settings, &IID_IXmlLoadSettings ); + + hr = IXmlLoadSettings_get_MaxElementDepth( load_settings, &setting_int ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( setting_int == 256, "got setting_int %u.\n", setting_int ); + hr = IXmlLoadSettings_put_MaxElementDepth( load_settings, 64 ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + hr = IXmlLoadSettings_get_MaxElementDepth( load_settings, &setting_int ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( setting_int == 64, "got setting_int %u.\n", setting_int ); + + hr = IXmlLoadSettings_get_ProhibitDtd( load_settings, &setting_bool ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( setting_bool, "got setting_bool %d.\n", setting_bool ); + hr = IXmlLoadSettings_put_ProhibitDtd( load_settings, FALSE ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + hr = IXmlLoadSettings_get_ProhibitDtd( load_settings, &setting_bool ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( !setting_bool, "got setting_bool %d.\n", setting_bool ); + + hr = IXmlLoadSettings_get_ResolveExternals( load_settings, &setting_bool ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( !setting_bool, "got setting_bool %d.\n", setting_bool ); + hr = IXmlLoadSettings_put_ResolveExternals( load_settings, TRUE ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + hr = IXmlLoadSettings_get_ResolveExternals( load_settings, &setting_bool ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( setting_bool, "got setting_bool %d.\n", setting_bool ); + + hr = IXmlLoadSettings_get_ValidateOnParse( load_settings, &setting_bool ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( !setting_bool, "got setting_bool %d.\n", setting_bool ); + hr = IXmlLoadSettings_put_ValidateOnParse( load_settings, TRUE ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + hr = IXmlLoadSettings_get_ValidateOnParse( load_settings, &setting_bool ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( setting_bool, "got setting_bool %d.\n", setting_bool ); + + hr = IXmlLoadSettings_get_ElementContentWhiteSpace( load_settings, &setting_bool ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( setting_bool, "got setting_bool %d.\n", setting_bool ); + hr = IXmlLoadSettings_put_ElementContentWhiteSpace( load_settings, FALSE ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + hr = IXmlLoadSettings_get_ElementContentWhiteSpace( load_settings, &setting_bool ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( !setting_bool, "got setting_bool %d.\n", setting_bool ); + + ref = IXmlLoadSettings_Release( load_settings ); + ok( ref == 0, "got ref %ld.\n", ref ); +} + +START_TEST(runtime) +{ + HRESULT hr; + + hr = RoInitialize( RO_INIT_MULTITHREADED ); + ok( hr == S_OK, "RoInitialize failed, hr %#lx.\n", hr ); + + test_XmlLoadSettings(); + + RoUninitialize(); +} -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10622
Hi. What is this for, could you name an application that's using it? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10622#note_135812
Apologies, I missed the part about superfluous patches in the guidelines, I'll close this. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10622#note_135814
This merge request was closed by Olivia Ryan. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10622
participants (3)
-
Nikolay Sivov (@nsivov) -
Olivia Ryan -
Olivia Ryan (@olivi-r)