summaryrefslogtreecommitdiff
path: root/ext/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-02 13:22:42 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-02 13:22:42 +0000
commit2d45869c7623b166d02fa07cbb6cf8a39cc81a8b (patch)
treeae1c58e5dfaf31748df098ba0a6601a1d60f5595 /ext/win32ole
parent510d2a7d2e6030a489409c76fd49273214e2e2c2 (diff)
* 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: Use ActiveX Data Object Library instead of InternetExplorer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole')
-rw-r--r--ext/win32ole/win32ole.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index ee765e0..9d919e0 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);
}