static void olemethod_free(void *ptr) { struct olemethoddata *polemethod = ptr; OLE_FREE(polemethod->pTypeInfo); OLE_FREE(polemethod->pOwnerTypeInfo); free(polemethod); }
static void oletype_free(void *ptr) { struct oletypedata *poletype = ptr; OLE_FREE(poletype->pTypeInfo); free(poletype); }
static void oleparam_free(void *ptr) { struct oleparamdata *pole = ptr; OLE_FREE(pole->pTypeInfo); free(pole); }
static void oletypelib_free(void *ptr) { struct oletypelibdata *poletypelib = ptr; OLE_FREE(poletypelib->pTypeLib); free(poletypelib); }
/* * call-seq: * WIN32OLE_EVENT#unadvise -> nil * * disconnects OLE server. If this method called, then the WIN32OLE_EVENT object * does not receive the OLE server event any more. * This method is trial implementation. * * ie = WIN32OLE.new('InternetExplorer.Application') * ev = WIN32OLE_EVENT.new(ie) * ev.on_event() {...} * ... * ev.unadvise * */ static VALUE fev_unadvise(VALUE self) { struct oleeventdata *poleev; Data_Get_Struct(self, struct oleeventdata, poleev); if (poleev->pConnectionPoint) { ole_msg_loop(); evs_delete(poleev->event_id); poleev->pConnectionPoint->lpVtbl->Unadvise(poleev->pConnectionPoint, poleev->dwCookie); OLE_RELEASE(poleev->pConnectionPoint); poleev->pConnectionPoint = NULL; } OLE_FREE(poleev->pDispatch); return Qnil; }