ole32/tests: Load CoRegisterChannelHook dynamic
André Hentschel
nerv at dawncrow.de
Wed Mar 7 09:16:40 CST 2012
Seems Win8 (at least the costumer preview) doesn't export CoRegisterChannelHook in ole32
---
dlls/ole32/tests/marshal.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c
index c178912..2574ff9 100644
--- a/dlls/ole32/tests/marshal.c
+++ b/dlls/ole32/tests/marshal.c
@@ -39,7 +39,8 @@ DEFINE_GUID(CLSID_StdGlobalInterfaceTable,0x00000323,0x0000,0x0000,0xc0,0x00,0x0
DEFINE_GUID(CLSID_ManualResetEvent, 0x0000032c,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
/* functions that are not present on all versions of Windows */
-static HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit);
+static HRESULT (WINAPI *pCoInitializeEx)(LPVOID, DWORD);
+static HRESULT (WINAPI *pCoRegisterChannelHook)(REFGUID, IChannelHook*);
/* helper macros to make tests a bit leaner */
#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks)
@@ -3086,7 +3087,13 @@ static void test_channel_hook(void)
HANDLE thread;
HRESULT hr;
- hr = CoRegisterChannelHook(&EXTENTID_WineTest, &TestChannelHook);
+ if (!pCoRegisterChannelHook)
+ {
+ win_skip( "CoRegisterChannelHook not available\n" );
+ return;
+ }
+
+ hr = pCoRegisterChannelHook(&EXTENTID_WineTest, &TestChannelHook);
ok_ole_success(hr, CoRegisterChannelHook);
hr = CoRegisterMessageFilter(&MessageFilter, NULL);
@@ -3133,6 +3140,7 @@ START_TEST(marshal)
}
pCoInitializeEx = (void*)GetProcAddress(hOle32, "CoInitializeEx");
+ pCoRegisterChannelHook = (void*)GetProcAddress(hOle32, "CoRegisterChannelHook");
argc = winetest_get_mainargs( &argv );
if (argc > 2 && (!strcmp(argv[2], "-Embedding")))
--
Best Regards, André Hentschel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Nachrichtenteil als Anhang
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120307/0d098e1c/attachment-0001.ksh>
More information about the wine-patches
mailing list