Nikolay Sivov : comsvcs: Accept progid's when creating "new" monikers.
Alexandre Julliard
julliard at winehq.org
Tue Nov 5 16:11:44 CST 2019
Module: wine
Branch: master
Commit: eab97b206812005efbf74c4f25c444512e07df6f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=eab97b206812005efbf74c4f25c444512e07df6f
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Nov 5 13:09:30 2019 +0300
comsvcs: Accept progid's when creating "new" monikers.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comsvcs/main.c | 2 +-
dlls/comsvcs/tests/comsvcs.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/comsvcs/main.c b/dlls/comsvcs/main.c
index c7d6aaa613..86ffe2587b 100644
--- a/dlls/comsvcs/main.c
+++ b/dlls/comsvcs/main.c
@@ -790,7 +790,7 @@ static HRESULT new_moniker_parse_displayname(IBindCtx *pbc, LPOLESTR name, ULONG
if (wcsnicmp(name, L"new:", 4))
return MK_E_SYNTAX;
- if (!guid_from_string(name + 4, &guid))
+ if (!guid_from_string(name + 4, &guid) && FAILED(CLSIDFromProgID(name + 4, &guid)))
return MK_E_SYNTAX;
moniker = heap_alloc_zero(sizeof(*moniker));
diff --git a/dlls/comsvcs/tests/comsvcs.c b/dlls/comsvcs/tests/comsvcs.c
index bdd078da33..d94b99afd1 100644
--- a/dlls/comsvcs/tests/comsvcs.c
+++ b/dlls/comsvcs/tests/comsvcs.c
@@ -271,6 +271,7 @@ static void test_new_moniker(void)
{
IMoniker *moniker, *moniker2, *inverse, *class_moniker;
IUnknown *obj, *obj2;
+ BIND_OPTS2 bind_opts;
ULARGE_INTEGER size;
DWORD moniker_type;
IBindCtx *bindctx;
@@ -415,6 +416,18 @@ todo_wine
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
IMoniker_Release(moniker);
+
+ /* Full path to create new object, using progid. */
+ memset(&bind_opts, 0, sizeof(bind_opts));
+ bind_opts.cbStruct = sizeof(bind_opts);
+ bind_opts.dwClassContext = CLSCTX_INPROC_SERVER;
+
+ hr = CoGetObject(L"new:msxml2.domdocument", (BIND_OPTS *)&bind_opts, &IID_IXMLDOMDocument, (void **)&obj);
+todo_wine
+ ok(hr == S_OK, "Failed to create object, hr %#x.\n", hr);
+ if (SUCCEEDED(hr))
+ IUnknown_Release(obj);
+
IBindCtx_Release(bindctx);
}
More information about the wine-cvs
mailing list