Nikolay Sivov : ole32/tests: More tests that actually show CLSID/ ProgId redirection in action.
Alexandre Julliard
julliard at winehq.org
Fri Jul 19 13:19:40 CDT 2013
Module: wine
Branch: master
Commit: 7a69c2f169b541881f0b7cb4508f9681db450015
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7a69c2f169b541881f0b7cb4508f9681db450015
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Jul 16 09:09:01 2013 +0400
ole32/tests: More tests that actually show CLSID/ProgId redirection in action.
---
dlls/ole32/tests/compobj.c | 44 +++++++++++++++++++++++++++++++-------------
1 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c
index b6ff9ef..5f5ab77 100644
--- a/dlls/ole32/tests/compobj.c
+++ b/dlls/ole32/tests/compobj.c
@@ -64,19 +64,8 @@ static WCHAR wszCLSID_StdFont[] =
};
static const WCHAR progidW[] = {'P','r','o','g','I','d','.','P','r','o','g','I','d',0};
-static const IID IID_IWineTest =
-{
- 0x5201163f,
- 0x8164,
- 0x4fd0,
- {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd}
-}; /* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */
-static const CLSID CLSID_WineOOPTest = {
- 0x5201163f,
- 0x8164,
- 0x4fd0,
- {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd}
-}; /* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */
+DEFINE_GUID(IID_IWineTest, 0x5201163f, 0x8164, 0x4fd0, 0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd);
+DEFINE_GUID(CLSID_WineOOPTest, 0x5201163f, 0x8164, 0x4fd0, 0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd);
static const char *debugstr_guid(REFIID riid)
{
@@ -232,6 +221,12 @@ static const char actctx_manifest[] =
" clsid=\"{12345678-1234-1234-1234-56789abcdef0}\""
" progid=\"ProgId.ProgId\""
" />"
+" <comClass clsid=\"{0be35203-8f91-11ce-9de3-00aa004bb851}\""
+" progid=\"CustomFont\""
+" />"
+" <comClass clsid=\"{0be35203-8f91-11ce-9de3-00aa004bb852}\""
+" progid=\"StdFont\""
+" />"
"</file>"
"</assembly>";
@@ -260,6 +255,8 @@ static void test_ProgIDFromCLSID(void)
if ((handle = activate_context(actctx_manifest, &cookie)))
{
+ static const WCHAR customfontW[] = {'C','u','s','t','o','m','F','o','n','t',0};
+
hr = ProgIDFromCLSID(&CLSID_non_existent, &progid);
todo_wine
ok(hr == S_OK, "got 0x%08x\n", hr);
@@ -269,6 +266,14 @@ todo_wine
CoTaskMemFree(progid);
}
+ /* try something registered and redirected */
+ progid = NULL;
+ hr = ProgIDFromCLSID(&CLSID_StdFont, &progid);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+todo_wine
+ ok(!lstrcmpiW(progid, customfontW), "got wrong progid %s\n", wine_dbgstr_w(progid));
+ CoTaskMemFree(progid);
+
pDeactivateActCtx(0, cookie);
pReleaseActCtx(handle);
}
@@ -308,6 +313,8 @@ static void test_CLSIDFromProgID(void)
if ((handle = activate_context(actctx_manifest, &cookie)))
{
+ GUID clsid1;
+
clsid = CLSID_NULL;
hr = CLSIDFromProgID(progidW, &clsid);
todo_wine
@@ -317,6 +324,17 @@ todo_wine
ok(!IsEqualCLSID(&clsid, &CLSID_non_existent) && !IsEqualCLSID(&clsid, &CLSID_NULL),
"got wrong clsid %s\n", debugstr_guid(&clsid));
+ /* duplicate progid present in context - returns generated guid here too */
+ clsid = CLSID_NULL;
+ hr = CLSIDFromProgID(stdfont, &clsid);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ clsid1 = CLSID_StdFont;
+ /* that's where it differs from StdFont */
+ clsid1.Data4[7] = 0x52;
+todo_wine
+ ok(!IsEqualCLSID(&clsid, &CLSID_StdFont) && !IsEqualCLSID(&clsid, &CLSID_NULL) && !IsEqualCLSID(&clsid, &clsid1),
+ "got %s\n", debugstr_guid(&clsid));
+
pDeactivateActCtx(0, cookie);
pReleaseActCtx(handle);
}
More information about the wine-cvs
mailing list