Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "win32ole.h"
Go to the source code of this file.
Data Structures | |
struct | IEventSink |
struct | IEventSinkVtbl |
struct | tagIEVENTSINKOBJ |
struct | oleeventdata |
Typedefs | |
typedef struct IEventSink * | PEVENTSINK |
typedef struct IEventSinkVtbl | IEventSinkVtbl |
typedef struct tagIEVENTSINKOBJ | IEVENTSINKOBJ |
typedef struct tagIEVENTSINKOBJ * | PIEVENTSINKOBJ |
Functions | |
RUBY_EXTERN void | rb_write_error_str (VALUE mesg) |
STDMETHODIMP | EVENTSINK_QueryInterface (PEVENTSINK, REFIID, LPVOID *) |
STDMETHODIMP_ (STDMETHODIMP_() EVENTSINK_Release(PEVENTSINK) ULONG) | |
void | EVENTSINK_Destructor (PIEVENTSINKOBJ) |
static void | ole_val2ptr_variant (VALUE val, VARIANT *var) |
static void | hash2ptr_dispparams (VALUE hash, ITypeInfo *pTypeInfo, DISPID dispid, DISPPARAMS *pdispparams) |
static VALUE | hash2result (VALUE hash) |
static void | ary2ptr_dispparams (VALUE ary, DISPPARAMS *pdispparams) |
static VALUE | exec_callback (VALUE arg) |
static VALUE | rescue_callback (VALUE arg) |
static HRESULT | find_iid (VALUE ole, char *pitf, IID *piid, ITypeInfo **ppTypeInfo) |
static HRESULT | find_coclass (ITypeInfo *pTypeInfo, TYPEATTR *pTypeAttr, ITypeInfo **pTypeInfo2, TYPEATTR **pTypeAttr2) |
static HRESULT | find_default_source_from_typeinfo (ITypeInfo *pTypeInfo, TYPEATTR *pTypeAttr, ITypeInfo **ppTypeInfo) |
static HRESULT | find_default_source (VALUE ole, IID *piid, ITypeInfo **ppTypeInfo) |
static long | ole_search_event_at (VALUE ary, VALUE ev) |
static VALUE | ole_search_event (VALUE ary, VALUE ev, BOOL *is_default) |
static VALUE | ole_search_handler_method (VALUE handler, VALUE ev, BOOL *is_default_handler) |
static void | ole_delete_event (VALUE ary, VALUE ev) |
static void | oleevent_free (void *ptr) |
static size_t | oleevent_size (const void *ptr) |
static VALUE | fev_s_allocate (VALUE klass) |
static VALUE | ev_advise (int argc, VALUE *argv, VALUE self) |
static VALUE | fev_initialize (int argc, VALUE *argv, VALUE self) |
static void | ole_msg_loop (void) |
static VALUE | fev_s_msg_loop (VALUE klass) |
static void | add_event_call_back (VALUE obj, VALUE event, VALUE data) |
static VALUE | ev_on_event (int argc, VALUE *argv, VALUE self, VALUE is_ary_arg) |
static VALUE | fev_on_event (int argc, VALUE *argv, VALUE self) |
static VALUE | fev_on_event_with_outargs (int argc, VALUE *argv, VALUE self) |
static VALUE | fev_off_event (int argc, VALUE *argv, VALUE self) |
static VALUE | fev_unadvise (VALUE self) |
static VALUE | fev_set_handler (VALUE self, VALUE val) |
static VALUE | fev_get_handler (VALUE self) |
static VALUE | evs_push (VALUE ev) |
static VALUE | evs_delete (long i) |
static VALUE | evs_entry (long i) |
static long | evs_length (void) |
STDMETHODIMP | EVENTSINK_Invoke (PEVENTSINK pEventSink, DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, UINT *puArgErr) |
EVENTSINK_AddRef (PEVENTSINK pEV) | |
STDMETHODIMP_ (ULONG) | |
STDMETHODIMP | EVENTSINK_GetTypeInfoCount (PEVENTSINK pEV, UINT *pct) |
STDMETHODIMP | EVENTSINK_GetTypeInfo (PEVENTSINK pEV, UINT info, LCID lcid, ITypeInfo **pInfo) |
STDMETHODIMP | EVENTSINK_GetIDsOfNames (PEVENTSINK pEventSink, REFIID riid, OLECHAR **szNames, UINT cNames, LCID lcid, DISPID *pDispID) |
PIEVENTSINKOBJ | EVENTSINK_Constructor (void) |
void | Init_win32ole_event (void) |
Variables | |
static VALUE | ary_ole_event |
static ID | id_events |
VALUE | cWIN32OLE_EVENT |
static const rb_data_type_t | oleevent_datatype |
typedef struct tagIEVENTSINKOBJ IEVENTSINKOBJ |
typedef struct IEventSinkVtbl IEventSinkVtbl |
Definition at line 15 of file win32ole_event.c.
typedef struct IEventSink * PEVENTSINK |
typedef struct tagIEVENTSINKOBJ * PIEVENTSINKOBJ |
Definition at line 1023 of file win32ole_event.c.
References id_events, NIL_P, ole_delete_event(), rb_ary_new(), rb_ary_push(), rb_ivar_get(), rb_ivar_set(), RB_TYPE_P, and T_ARRAY.
Referenced by ev_on_event().
|
static |
Definition at line 441 of file win32ole_event.c.
References ole_val2ptr_variant(), RARRAY_LEN, and rb_ary_entry().
Referenced by EVENTSINK_Invoke().
Definition at line 900 of file win32ole_event.c.
References cWIN32OLE, oleeventdata::dwCookie, oleeventdata::event_id, EVENTSINK_Constructor(), evs_length(), find_default_source(), find_iid(), HRESULT(), tagIEVENTSINKOBJ::m_iid, NULL, OBJ_TAINTED, OLE_ADDREF, ole_raise(), OLE_RELEASE, oledata_get_struct(), oleeventdata::pConnectionPoint, oleeventdata::pDispatch, oledata::pDispatch, rb_eRuntimeError, rb_eSecurityError, rb_eTypeError, rb_obj_is_kind_of(), rb_raise(), rb_safe_level(), rb_scan_args(), RB_TYPE_P, StringValuePtr, T_NIL, and TypedData_Get_Struct.
Referenced by fev_initialize().
Definition at line 1035 of file win32ole_event.c.
References add_event_call_back(), eWIN32OLERuntimeError, NIL_P, NULL, oleeventdata::pConnectionPoint, Qnil, rb_ary_new3, rb_block_proc(), rb_eTypeError, rb_raise(), rb_scan_args(), rb_sym2str, RB_TYPE_P, T_STRING, T_SYMBOL, and TypedData_Get_Struct.
Referenced by fev_on_event(), and fev_on_event_with_outargs().
EVENTSINK_AddRef | ( | PEVENTSINK | pEV | ) |
Definition at line 256 of file win32ole_event.c.
References tagIEVENTSINKOBJ::m_cRef.
PIEVENTSINKOBJ EVENTSINK_Constructor | ( | void | ) |
Definition at line 310 of file win32ole_event.c.
References ALLOC_N, tagIEVENTSINKOBJ::lpVtbl, tagIEVENTSINKOBJ::m_cRef, tagIEVENTSINKOBJ::m_event_id, NULL, and tagIEVENTSINKOBJ::pTypeInfo.
Referenced by ev_advise().
void EVENTSINK_Destructor | ( | PIEVENTSINKOBJ | pEVObj | ) |
Definition at line 323 of file win32ole_event.c.
References free(), NULL, OLE_RELEASE, and tagIEVENTSINKOBJ::pTypeInfo.
Referenced by STDMETHODIMP_().
STDMETHODIMP EVENTSINK_GetIDsOfNames | ( | PEVENTSINK | pEventSink, |
REFIID | riid, | ||
OLECHAR ** | szNames, | ||
UINT | cNames, | ||
LCID | lcid, | ||
DISPID * | pDispID | ||
) |
Definition at line 292 of file win32ole_event.c.
References tagIEVENTSINKOBJ::pTypeInfo.
STDMETHODIMP EVENTSINK_GetTypeInfo | ( | PEVENTSINK | pEV, |
UINT | info, | ||
LCID | lcid, | ||
ITypeInfo ** | pInfo | ||
) |
Definition at line 282 of file win32ole_event.c.
References NULL.
STDMETHODIMP EVENTSINK_GetTypeInfoCount | ( | PEVENTSINK | pEV, |
UINT * | pct | ||
) |
Definition at line 274 of file win32ole_event.c.
STDMETHODIMP EVENTSINK_Invoke | ( | PEVENTSINK | pEventSink, |
DISPID | dispid, | ||
REFIID | riid, | ||
LCID | lcid, | ||
WORD | wFlags, | ||
DISPPARAMS * | pdispparams, | ||
VARIANT * | pvarResult, | ||
EXCEPINFO * | pexcepinfo, | ||
UINT * | puArgErr | ||
) |
Definition at line 132 of file win32ole_event.c.
References ary2ptr_dispparams(), count, cWIN32OLE_EVENT, ev, evs_entry(), exec_callback(), FALSE, hash2ptr_dispparams(), hash2result(), HRESULT(), id_events, tagIEVENTSINKOBJ::m_event_id, NIL_P, ole_search_event(), ole_search_handler_method(), ole_val2variant(), ole_variant2val(), tagIEVENTSINKOBJ::pTypeInfo, Qfalse, Qnil, Qtrue, rb_ary_entry(), rb_ary_new(), rb_ary_push(), rb_intern, rb_ivar_get(), rb_obj_is_kind_of(), rb_protect(), RB_TYPE_P, rescue_callback(), result, T_ARRAY, T_HASH, and WC2VSTR.
STDMETHODIMP EVENTSINK_QueryInterface | ( | PEVENTSINK | pEV, |
REFIID | iid, | ||
LPVOID * | ppv | ||
) |
Definition at line 237 of file win32ole_event.c.
References NULL, STDMETHODIMP_(), and ULONG().
|
static |
Definition at line 1188 of file win32ole_event.c.
References ary_ole_event, Qnil, and rb_ary_store().
Referenced by fev_unadvise().
|
static |
Definition at line 1195 of file win32ole_event.c.
References ary_ole_event, and rb_ary_entry().
Referenced by EVENTSINK_Invoke().
|
static |
Definition at line 1201 of file win32ole_event.c.
References ary_ole_event, and RARRAY_LEN.
Referenced by ev_advise().
Definition at line 1182 of file win32ole_event.c.
References ary_ole_event, and rb_ary_push().
Referenced by fev_initialize().
Definition at line 454 of file win32ole_event.c.
References rb_apply().
Referenced by EVENTSINK_Invoke().
Definition at line 1259 of file win32ole_event.c.
References rb_intern, and rb_ivar_get().
Referenced by Init_win32ole_event().
Definition at line 990 of file win32ole_event.c.
References ev_advise(), evs_push(), fev_set_handler(), id_events, Qnil, rb_ary_new(), and rb_ivar_set().
Referenced by Init_win32ole_event().
Definition at line 1128 of file win32ole_event.c.
References id_events, NIL_P, ole_delete_event(), Qnil, rb_eTypeError, rb_ivar_get(), rb_raise(), rb_scan_args(), rb_sym2str, RB_TYPE_P, T_STRING, and T_SYMBOL.
Referenced by Init_win32ole_event().
Definition at line 1087 of file win32ole_event.c.
References ev_on_event(), and Qfalse.
Referenced by Init_win32ole_event().
Definition at line 1107 of file win32ole_event.c.
References ev_on_event(), and Qtrue.
Referenced by Init_win32ole_event().
Definition at line 887 of file win32ole_event.c.
References oleeventdata::dwCookie, oleeventdata::event_id, NULL, oleeventdata::pConnectionPoint, oleeventdata::pDispatch, and TypedData_Make_Struct.
Referenced by Init_win32ole_event().
Definition at line 1016 of file win32ole_event.c.
References ole_msg_loop(), and Qnil.
Referenced by Init_win32ole_event().
Definition at line 1246 of file win32ole_event.c.
References rb_intern, and rb_ivar_set().
Referenced by fev_initialize(), and Init_win32ole_event().
Definition at line 1166 of file win32ole_event.c.
References oleeventdata::dwCookie, oleeventdata::event_id, evs_delete(), NULL, OLE_FREE, ole_msg_loop(), OLE_RELEASE, oleeventdata::pConnectionPoint, oleeventdata::pDispatch, Qnil, and TypedData_Get_Struct.
Referenced by Init_win32ole_event().
|
static |
Definition at line 593 of file win32ole_event.c.
References count, FALSE, HRESULT(), NULL, OLE_GET_TYPEATTR, OLE_RELEASE, OLE_RELEASE_TYPEATTR, and TRUE.
Referenced by find_default_source().
Definition at line 704 of file win32ole_event.c.
References cWIN32OLE_lcid, find_coclass(), find_default_source_from_typeinfo(), find_iid(), HRESULT(), NULL, OLE_GET_TYPEATTR, OLE_RELEASE, OLE_RELEASE_TYPEATTR, oledata_get_struct(), and oledata::pDispatch.
Referenced by ev_advise().
|
static |
Definition at line 668 of file win32ole_event.c.
References HRESULT().
Referenced by find_default_source().
Definition at line 482 of file win32ole_event.c.
References count, cWIN32OLE_lcid, FALSE, free(), HRESULT(), lcid, NULL, OLE_GET_TYPEATTR, OLE_RELEASE, OLE_RELEASE_TYPEATTR, ole_wc2mb(), oledata_get_struct(), oledata::pDispatch, and TRUE.
Referenced by ev_advise(), and find_default_source().
|
static |
Definition at line 402 of file win32ole_event.c.
References ALLOCA_N, HRESULT(), key, len, ole_val2ptr_variant(), Qnil, rb_hash_aref(), rb_str_intern(), RB_UINT2NUM, val, and WC2VSTR.
Referenced by EVENTSINK_Invoke().
Definition at line 431 of file win32ole_event.c.
References Qnil, rb_hash_aref(), rb_str_intern(), and rb_str_new2.
Referenced by EVENTSINK_Invoke().
void Init_win32ole_event | ( | void | ) |
Definition at line 1265 of file win32ole_event.c.
References ary_ole_event, cWIN32OLE_EVENT, fev_get_handler(), fev_initialize(), fev_off_event(), fev_on_event(), fev_on_event_with_outargs(), fev_s_allocate(), fev_s_msg_loop(), fev_set_handler(), fev_unadvise(), id_events, rb_ary_new(), rb_cObject, rb_define_alloc_func(), rb_define_class(), rb_define_method(), rb_define_singleton_method(), rb_gc_register_mark_object(), and rb_intern.
Referenced by Init_win32ole().
Definition at line 857 of file win32ole_event.c.
References ole_search_event_at(), and rb_ary_delete_at().
Referenced by add_event_call_back(), and fev_off_event().
|
static |
Definition at line 1000 of file win32ole_event.c.
References msg, MSG, and NULL.
Referenced by fev_s_msg_loop(), and fev_unadvise().
Definition at line 814 of file win32ole_event.c.
References FALSE, len, NIL_P, Qnil, RARRAY_LEN, rb_ary_entry(), rb_str_cmp(), and TRUE.
Referenced by EVENTSINK_Invoke().
Definition at line 789 of file win32ole_event.c.
References len, NIL_P, RARRAY_LEN, rb_ary_entry(), rb_str_cmp(), RB_TYPE_P, and T_STRING.
Referenced by ole_delete_event().
|
static |
Definition at line 839 of file win32ole_event.c.
References FALSE, PRIsVALUE, Qnil, rb_intern, rb_respond_to(), rb_sprintf(), rb_to_id(), and TRUE.
Referenced by EVENTSINK_Invoke().
|
static |
Definition at line 334 of file win32ole_event.c.
References NUM2DBL, ole_vstr2wc(), rb_big2dbl(), RB_NUM2CHR, RB_NUM2INT, T_BIGNUM, T_FALSE, T_FIXNUM, T_FLOAT, T_STRING, T_TRUE, and TYPE.
Referenced by ary2ptr_dispparams(), and hash2ptr_dispparams().
|
static |
Definition at line 868 of file win32ole_event.c.
References oleeventdata::dwCookie, free(), NULL, OLE_RELEASE, oleeventdata::pConnectionPoint, and oleeventdata::pDispatch.
|
static |
Definition at line 881 of file win32ole_event.c.
RUBY_EXTERN void rb_write_error_str | ( | VALUE | mesg | ) |
Definition at line 7393 of file io.c.
Referenced by rb_syntax_error_append(), rb_warning_s_warn(), rescue_callback(), and thread_start_func_2().
Definition at line 464 of file win32ole_event.c.
References HRESULT(), msg, PRIsVALUE, Qnil, rb_ary_entry(), rb_backtrace(), rb_errinfo(), rb_funcall(), rb_intern, rb_obj_classname(), rb_sprintf(), rb_write_error_str(), and ruby_finalize().
Referenced by EVENTSINK_Invoke().
STDMETHODIMP_ | ( | STDMETHODIMP_() EVENTSINK_Release(PEVENTSINK) | ULONG | ) |
Definition at line 73 of file win32ole_event.c.
Referenced by EVENTSINK_QueryInterface().
STDMETHODIMP_ | ( | ULONG | ) |
Definition at line 263 of file win32ole_event.c.
References EVENTSINK_Destructor(), and tagIEVENTSINKOBJ::m_cRef.
|
static |
Definition at line 67 of file win32ole_event.c.
Referenced by evs_delete(), evs_entry(), evs_length(), evs_push(), and Init_win32ole_event().
VALUE cWIN32OLE_EVENT |
Definition at line 70 of file win32ole_event.c.
Referenced by EVENTSINK_Invoke(), and Init_win32ole_event().
|
static |
Definition at line 68 of file win32ole_event.c.
Referenced by add_event_call_back(), EVENTSINK_Invoke(), fev_initialize(), fev_off_event(), and Init_win32ole_event().
|
static |
Definition at line 126 of file win32ole_event.c.