[PATCH 7/7] widl: Only register activatable WinRT runtimeclass.

Rémi Bernon rbernon at codeweavers.com
Fri Mar 12 05:31:13 CST 2021


Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/windows.media.speech/tests/statics.c | 3 +--
 tools/widl/register.c                     | 5 +++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/windows.media.speech/tests/statics.c b/dlls/windows.media.speech/tests/statics.c
index 8454729f9c3..9faa49dfc5d 100644
--- a/dlls/windows.media.speech/tests/statics.c
+++ b/dlls/windows.media.speech/tests/statics.c
@@ -136,8 +136,7 @@ static void test_VoiceInformation(void)
     ok(SUCCEEDED(hr), "WindowsCreateString failed, hr %#x\n", hr);
 
     hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory);
-    todo_wine ok(hr == REGDB_E_CLASSNOTREG, "RoGetActivationFactory returned unexpected hr %#x\n", hr);
-    if (SUCCEEDED(hr)) IActivationFactory_Release(factory);
+    ok(hr == REGDB_E_CLASSNOTREG, "RoGetActivationFactory returned unexpected hr %#x\n", hr);
 
     pWindowsDeleteString(str);
 
diff --git a/tools/widl/register.c b/tools/widl/register.c
index 76bfc3c715c..39c207f11dd 100644
--- a/tools/widl/register.c
+++ b/tools/widl/register.c
@@ -194,6 +194,11 @@ static void write_runtimeclasses_registry( const statement_list_t *stmts )
     {
         if (stmt->type != STMT_TYPE) continue;
         if (type_get_type((type = stmt->u.type)) != TYPE_RUNTIMECLASS) continue;
+        if (!get_attrp(type->attrs, ATTR_ACTIVATABLE))
+        {
+            put_str( indent, "Delete %s\n", format_namespace( type->namespace, "", ".", type->name, NULL ) );
+            continue;
+        }
         put_str( indent, "ForceRemove %s\n", format_namespace( type->namespace, "", ".", type->name, NULL ) );
         put_str( indent++, "{\n" );
         put_str( indent, "val 'DllPath' = s '%%MODULE%%'\n" );
-- 
2.30.2




More information about the wine-devel mailing list