From f4322ef2697f8bb0a3d8df19785701738fd7eb78 Mon Sep 17 00:00:00 2001 From: suke Date: Sun, 2 Nov 2008 21:52:04 +0000 Subject: * ext/win32ole/win32ole.c (ole_event_free): invoke IConnectionPoint::Unadvise before invoking IConnectionPoint::Release. * test/win32ole/test_win32ole_event.rb, test/win32ole/err_in_callback.rb, test/win32ole/test_err_in_callback.rb, test/win32ole/test_win32ole_variant_outarg.rb, test/win32ole/orig_data.csv: Use ActiveX Data Object Library instead of InternetExplorer. remove test/win32ole/test_win32ole_variant_with_ie.rb. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/win32ole/win32ole.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ext') diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index ee765e02f..9d919e02d 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -128,7 +128,7 @@ const IID IID_IMultiLanguage2 = {0xDCCFC164, 0x2B38, 0x11d2, {0xB7, 0xEC, 0x00, #define WC2VSTR(x) ole_wc2vstr((x), TRUE) -#define WIN32OLE_VERSION "1.3.7" +#define WIN32OLE_VERSION "1.3.8" typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX) (REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*); @@ -8124,7 +8124,11 @@ find_default_source(VALUE ole, IID *piid, ITypeInfo **ppTypeInfo) static void ole_event_free(struct oleeventdata *poleev) { - OLE_FREE(poleev->pConnectionPoint); + if (poleev->pConnectionPoint) { + poleev->pConnectionPoint->lpVtbl->Unadvise(poleev->pConnectionPoint, poleev->dwCookie); + OLE_RELEASE(poleev->pConnectionPoint); + poleev->pConnectionPoint = NULL; + } free(poleev); } -- cgit