コード例 #1
0
ファイル: win32ole_method.c プロジェクト: gferguson-gd/ruby
static void
olemethod_free(void *ptr)
{
    struct olemethoddata *polemethod = ptr;
    OLE_FREE(polemethod->pTypeInfo);
    OLE_FREE(polemethod->pOwnerTypeInfo);
    free(polemethod);
}
コード例 #2
0
ファイル: win32ole_type.c プロジェクト: knugie/ruby
static void
oletype_free(void *ptr)
{
    struct oletypedata *poletype = ptr;
    OLE_FREE(poletype->pTypeInfo);
    free(poletype);
}
コード例 #3
0
ファイル: win32ole_param.c プロジェクト: 0x00evil/ruby
static void
oleparam_free(void *ptr)
{
    struct oleparamdata *pole = ptr;
    OLE_FREE(pole->pTypeInfo);
    free(pole);
}
コード例 #4
0
ファイル: win32ole_typelib.c プロジェクト: DashYang/sim
static void
oletypelib_free(void *ptr)
{
    struct oletypelibdata *poletypelib = ptr;
    OLE_FREE(poletypelib->pTypeLib);
    free(poletypelib);
}
コード例 #5
0
ファイル: win32ole_event.c プロジェクト: yugui/ruby
/*
 *  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;
}