From b3b390d8acc7964bd4faa1eee3bac84200abb962 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 13 Aug 2012 11:41:12 +0200 Subject: [PATCH] ole32: Added ISynchronizeHandle tests. --- dlls/ole32/tests/marshal.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index e0213b931ff..2baec4bb30e 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -2853,8 +2853,10 @@ static void test_globalinterfacetable(void) static void test_manualresetevent(void) { + ISynchronizeHandle *sync_handle; ISynchronize *psync1, *psync2; IUnknown *punk; + HANDLE handle; LONG ref; HRESULT hr; @@ -2887,6 +2889,17 @@ static void test_manualresetevent(void) ok(hr == S_OK, "Got 0x%08x\n", hr); ok(!!psync2, "Got NULL.\n"); ok(psync1 != psync2, "psync1 == psync2.\n"); + + hr = ISynchronize_QueryInterface(psync2, &IID_ISynchronizeHandle, (void**)&sync_handle); + ok(hr == S_OK, "QueryInterface(IID_ISynchronizeHandle) failed: %08x\n", hr); + + handle = NULL; + hr = ISynchronizeHandle_GetHandle(sync_handle, &handle); + ok(hr == S_OK, "GetHandle failed: %08x\n", hr); + ok(handle != NULL && handle != INVALID_HANDLE_VALUE, "handle = %p\n", handle); + + ISynchronizeHandle_Release(sync_handle); + hr = ISynchronize_Wait(psync2, 0, 5); ok(hr == RPC_S_CALLPENDING, "Got 0x%08x\n", hr);