Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
#include "win32ole.h"
Go to the source code of this file.
Data Structures | |
struct | oleparam |
struct | _Win32OLEIDispatch |
struct | myCPINFOEX |
Macros | |
#define | WIN32OLE_VERSION "1.8.8" |
#define | g_ole_initialized (TlsGetValue(g_ole_initialized_key)!=0) |
#define | g_ole_initialized_init() (g_ole_initialized_key = TlsAlloc()) |
#define | g_ole_initialized_set(val) TlsSetValue(g_ole_initialized_key, (void*)(val)) |
#define | pIMultiLanguage NULL /* dummy */ |
#define | ENC_MACHING_CP(enc, encname, cp) if(strcasecmp(rb_enc_name((enc)),(encname)) == 0) return cp |
#define | load_conv_function51932() failed_load_conv51932() |
#define | need_conv_function51932() (failed_load_conv51932(), 0) |
#define | conv_51932(cp) ((cp) == 51932 && need_conv_function51932()) |
#define | ole_wc2mb_conv(pw, pm, size) WideCharToMultiByte(cWIN32OLE_cp, 0, (pw), -1, (pm), (size), NULL, NULL) |
Typedefs | |
typedef IUnknown | DWORD |
typedef IUnknown COSERVERINFO MULTI_QI *typedef | HWND(WINAPI FNHTMLHELP) (HWND hwndCaller |
typedef IUnknown COSERVERINFO MULTI_QI *typedef LPCSTR | pszFile |
typedef IUnknown COSERVERINFO MULTI_QI *typedef LPCSTR UINT | uCommand |
typedef IUnknown COSERVERINFO MULTI_QI *typedef LPCSTR UINT DWORD | dwData |
typedef BOOL() | FNENUMSYSEMCODEPAGES(CODEPAGE_ENUMPROC, DWORD) |
typedef struct _Win32OLEIDispatch | Win32OLEIDispatch |
Functions | |
typedef | HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)(REFCLSID |
free (psz) | |
if ((ID)(DISPID) nameid !=nameid) | |
BOOL | ole_initialized (void) |
char * | ole_wc2mb (LPWSTR pw) |
void | ole_uninitialize (void) |
void | ole_initialize (void) |
struct oledata * | oledata_get_struct (VALUE ole) |
LPWSTR | ole_vstr2wc (VALUE vstr) |
VALUE | ole_wc2vstr (LPWSTR pw, BOOL isfree) |
void | ole_val2variant_ex (VALUE val, VARIANT *var, VARTYPE vt) |
VOID * | val2variant_ptr (VALUE val, VARIANT *var, VARTYPE vt) |
HRESULT | ole_val_ary2variant_ary (VALUE val, VARIANT *var, VARTYPE vt) |
void | ole_val2variant (VALUE val, VARIANT *var) |
void | ole_val2variant2 (VALUE val, VARIANT *var) |
VALUE | make_inspect (const char *class_name, VALUE detail) |
VALUE | default_inspect (VALUE self, const char *class_name) |
VALUE | ole_variant2val (VARIANT *pvar) |
LONG | reg_open_key (HKEY hkey, const char *name, HKEY *phkey) |
LONG | reg_open_vkey (HKEY hkey, VALUE key, HKEY *phkey) |
VALUE | reg_enum_key (HKEY hkey, DWORD i) |
VALUE | reg_get_val (HKEY hkey, const char *subkey) |
VALUE | reg_get_val2 (HKEY hkey, const char *subkey) |
HRESULT | ole_docinfo_from_type (ITypeInfo *pTypeInfo, BSTR *name, BSTR *helpstr, DWORD *helpcontext, BSTR *helpfile) |
VALUE | ole_typedesc2val (ITypeInfo *pTypeInfo, TYPEDESC *pTypeDesc, VALUE typedetails) |
HRESULT | typelib_from_val (VALUE obj, ITypeLib **pTypeLib) |
void | Init_win32ole (void) |
Variables | |
VALUE | cWIN32OLE |
static REFIID | riid |
static REFIID void __RPC_FAR *__RPC_FAR * | ppvObject |
static UINT __RPC_FAR * | pctinfo |
static UINT | iTInfo |
static UINT LCID | lcid |
static UINT LCID ITypeInfo __RPC_FAR *__RPC_FAR * | ppTInfo |
static REFIID LPOLESTR __RPC_FAR * | rgszNames |
static REFIID LPOLESTR __RPC_FAR UINT | cNames |
static REFIID LPOLESTR __RPC_FAR UINT LCID DISPID __RPC_FAR * | rgDispId |
static DISPID | dispIdMember |
static DISPID REFIID LCID WORD | wFlags |
static DISPID REFIID LCID WORD DISPPARAMS __RPC_FAR * | pDispParams |
static DISPID REFIID LCID WORD DISPPARAMS __RPC_FAR VARIANT __RPC_FAR * | pVarResult |
static DISPID REFIID LCID WORD DISPPARAMS __RPC_FAR VARIANT __RPC_FAR EXCEPINFO __RPC_FAR * | pExcepInfo |
static DISPID REFIID LCID WORD DISPPARAMS __RPC_FAR VARIANT __RPC_FAR EXCEPINFO __RPC_FAR UINT __RPC_FAR * | puArgErr |
static DWORD | dwCallType |
static DWORD HTASK | threadIDCaller |
static DWORD HTASK DWORD | dwTickCount |
static DWORD HTASK DWORD LPINTERFACEINFO | lpInterfaceInfo |
static HTASK | threadIDCallee |
static HTASK DWORD DWORD | dwRejectType |
static HTASK DWORD DWORD | dwPendingType |
ID | nameid = rb_check_id_cstr(psz, (long)strlen(psz), cWIN32OLE_enc) |
LCID | cWIN32OLE_lcid |
#define conv_51932 | ( | cp | ) | ((cp) == 51932 && need_conv_function51932()) |
Definition at line 589 of file win32ole.c.
#define ENC_MACHING_CP | ( | enc, | |
encname, | |||
cp | |||
) | if(strcasecmp(rb_enc_name((enc)),(encname)) == 0) return cp |
Definition at line 489 of file win32ole.c.
#define g_ole_initialized (TlsGetValue(g_ole_initialized_key)!=0) |
Definition at line 46 of file win32ole.c.
#define g_ole_initialized_init | ( | ) | (g_ole_initialized_key = TlsAlloc()) |
Definition at line 47 of file win32ole.c.
#define g_ole_initialized_set | ( | val | ) | TlsSetValue(g_ole_initialized_key, (void*)(val)) |
Definition at line 48 of file win32ole.c.
#define load_conv_function51932 | ( | ) | failed_load_conv51932() |
Definition at line 585 of file win32ole.c.
#define need_conv_function51932 | ( | ) | (failed_load_conv51932(), 0) |
Definition at line 586 of file win32ole.c.
#define ole_wc2mb_conv | ( | pw, | |
pm, | |||
size | |||
) | WideCharToMultiByte(cWIN32OLE_cp, 0, (pw), -1, (pm), (size), NULL, NULL) |
Definition at line 714 of file win32ole.c.
#define pIMultiLanguage NULL /* dummy */ |
Definition at line 75 of file win32ole.c.
#define WIN32OLE_VERSION "1.8.8" |
Definition at line 30 of file win32ole.c.
Definition at line 36 of file win32ole.c.
static DWORD |
Definition at line 33 of file win32ole.c.
typedef BOOL() FNENUMSYSEMCODEPAGES(CODEPAGE_ENUMPROC, DWORD) |
Definition at line 37 of file win32ole.c.
typedef IUnknown COSERVERINFO MULTI_QI *typedef HWND(WINAPI FNHTMLHELP)(HWND hwndCaller |
Definition at line 35 of file win32ole.c.
typedef IUnknown COSERVERINFO MULTI_QI *typedef LPCSTR pszFile |
Definition at line 35 of file win32ole.c.
typedef IUnknown COSERVERINFO MULTI_QI *typedef LPCSTR UINT uCommand |
Definition at line 36 of file win32ole.c.
typedef struct _Win32OLEIDispatch Win32OLEIDispatch |
Definition at line 1346 of file win32ole.c.
References make_inspect(), rb_funcall(), and rb_intern().
free | ( | psz | ) |
typedef HRESULT | ( | STDAPICALLTYPE | FNCOCREATEINSTANCEEX | ) |
Referenced by EVENTSINK_Invoke(), ole_docinfo_from_type(), ole_initialize(), ole_methods_from_typeinfo(), ole_rec2variant(), ole_type_from_itypeinfo(), ole_typelib_from_itypeinfo(), ole_val_ary2variant_ary(), ole_variant2val(), olerecord_set_ivar(), rb_w32_set_thread_description(), typelib_from_val(), and val2variant_ptr().
Definition at line 357 of file win32ole.c.
Referenced by deflate_stored(), deflateInit2_(), deflateResetKeep(), fchmod(), ffi_prep_cif_machdep(), ffi_prep_closure_loc(), fill_window(), getaddrinfo(), getnameinfo(), gzclose_w(), gzvprintf(), inflate(), inflateBack(), inflateBack9(), inflateEnd(), inflateGetDictionary(), inflateGetHeader(), inflatePrime(), inflateReset2(), inflateResetKeep(), inflateSetDictionary(), inflateStateCheck(), inflateSync(), inflateValidate(), log_append(), onig_foreach_name(), onig_memsize(), onig_names_free(), onig_number_of_names(), onig_renumber_name_table(), rb_iseq_build_from_ary(), rb_iseq_insns_info_encode_positions(), rb_iseq_mark_insn_storage(), rb_method_definition_set(), rb_thread_call_with_gvl(), rb_w32_select_with_thread(), setfiletime(), unzOpenCurrentFile3(), unzReadCurrentFile(), updatewindow(), VpDivd(), VpSqrt(), and zip64local_TmzDateToDosDate().
void Init_win32ole | ( | void | ) |
Definition at line 3969 of file win32ole.c.
References cWIN32OLE, cWIN32OLE_lcid, g_ole_initialized_init, Init_win32ole_error(), Init_win32ole_event(), Init_win32ole_method(), Init_win32ole_param(), Init_win32ole_record(), Init_win32ole_type(), Init_win32ole_typelib(), Init_win32ole_variable(), Init_win32ole_variant(), Init_win32ole_variant_m(), rb_ary_new(), rb_cObject, rb_define_alias(), rb_define_alloc_func(), rb_define_class(), rb_define_const(), rb_define_method, rb_define_singleton_method, rb_gc_register_mark_object(), rb_str_new2, RTYPEDDATA_DATA, st_init_numtable, TypedData_Wrap_Struct, and WIN32OLE_VERSION.
Definition at line 1334 of file win32ole.c.
References rb_str_cat2, rb_str_concat(), rb_str_new2, and str.
Referenced by default_inspect().
HRESULT ole_docinfo_from_type | ( | ITypeInfo * | pTypeInfo, |
BSTR * | name, | ||
BSTR * | helpstr, | ||
DWORD * | helpcontext, | ||
BSTR * | helpfile | ||
) |
Definition at line 3648 of file win32ole.c.
References HRESULT(), name, and OLE_RELEASE.
void ole_initialize | ( | void | ) |
Definition at line 814 of file win32ole.c.
References FALSE, g_ole_initialized, g_ole_initialized_set, HRESULT(), NULL, ole_raise(), Qnil, rb_add_event_hook(), rb_eRuntimeError, RUBY_EVENT_THREAD_END, and TRUE.
BOOL ole_initialized | ( | void | ) |
Definition at line 395 of file win32ole.c.
References g_ole_initialized.
Definition at line 3709 of file win32ole.c.
References Qnil, rb_ary_push(), rb_fix2str(), rb_str_concat(), rb_str_new2, and str.
void ole_uninitialize | ( | void | ) |
Definition at line 800 of file win32ole.c.
References FALSE, g_ole_initialized, and g_ole_initialized_set.
void ole_val2variant | ( | VALUE | val, |
VARIANT * | var | ||
) |
Definition at line 1250 of file win32ole.c.
References cWIN32OLE, cWIN32OLE_RECORD, cWIN32OLE_VARIANT, NULL, NUM2DBL, OLE_ADDREF, ole_rec2variant(), ole_val_ary2variant_ary(), ole_variant2variant(), ole_vstr2wc(), oledata_get_struct(), oledata::pDispatch, rb_big2dbl(), rb_cTime, RB_NUM2LONG, rb_obj_is_kind_of(), T_ARRAY, T_BIGNUM, T_FALSE, T_FIXNUM, T_FLOAT, T_NIL, T_STRING, T_TRUE, and TYPE.
Referenced by EVENTSINK_Invoke(), and ole_val2variant2().
void ole_val2variant2 | ( | VALUE | val, |
VARIANT * | var | ||
) |
Definition at line 1326 of file win32ole.c.
References ole_val2variant().
Referenced by ole_val2variant_ex().
void ole_val2variant_ex | ( | VALUE | val, |
VARIANT * | var, | ||
VARTYPE | vt | ||
) |
Definition at line 983 of file win32ole.c.
References NULL, NUM2I8, NUM2UI8, ole_val2variant2(), and Qnil.
Referenced by val2variant_ptr().
Definition at line 1188 of file win32ole.c.
References ALLOC_N, free, HRESULT(), NULL, rb_eRuntimeError, rb_raise(), and T_ARRAY.
Referenced by ole_val2variant().
VALUE ole_variant2val | ( | VARIANT * | pvar | ) |
Definition at line 1419 of file win32ole.c.
References ALLOC_N, create_win32ole_record(), cWIN32OLE, cWIN32OLE_lcid, FALSE, free, HRESULT(), I8_2_NUM, NULL, OLE_ADDREF, ole_variant2val(), ole_wc2vstr(), oledata::pDispatch, Qfalse, Qnil, Qtrue, rb_ary_new(), rb_eRuntimeError, rb_float_new, RB_INT2NUM, rb_raise(), rb_str_new2, UI8_2_NUM, V_I1REF, V_INT, V_INTREF, V_UI2REF, V_UINT, and V_UINTREF.
Referenced by EVENTSINK_Invoke(), ole_variant2val(), and olerecord_set_ivar().
LPWSTR ole_vstr2wc | ( | VALUE | vstr | ) |
Definition at line 866 of file win32ole.c.
References DATA_PTR, eWIN32OLERuntimeError, NULL, rb_enc_get(), rb_enc_name, RB_GC_GUARD, rb_raise(), RSTRING_LEN, RSTRING_PTR, st_insert, st_lookup, and T_STRING.
Referenced by ole_val2variant().
char * ole_wc2mb | ( | LPWSTR | pw | ) |
Definition at line 744 of file win32ole.c.
References NULL.
VALUE ole_wc2vstr | ( | LPWSTR | pw, |
BOOL | isfree | ||
) |
Definition at line 947 of file win32ole.c.
References rb_str_set_len(), RSTRING_PTR, and strlen().
Referenced by ole_variant2val().
Definition at line 858 of file win32ole.c.
References TypedData_Get_Struct.
Referenced by ole_val2variant(), and typelib_from_val().
Definition at line 1711 of file win32ole.c.
References err, NULL, Qnil, and rb_str_new2.
Definition at line 1726 of file win32ole.c.
References ALLOC_N, err, free, len, NULL, Qnil, and rb_str_new2.
Referenced by reg_get_val2().
Definition at line 1754 of file win32ole.c.
References err, NULL, Qnil, and reg_get_val().
LONG reg_open_key | ( | HKEY | hkey, |
const char * | name, | ||
HKEY * | phkey | ||
) |
LONG reg_open_vkey | ( | HKEY | hkey, |
VALUE | key, | ||
HKEY * | phkey | ||
) |
Definition at line 1705 of file win32ole.c.
References key, reg_open_key(), and StringValuePtr.
Definition at line 3909 of file win32ole.c.
References cWIN32OLE_lcid, HRESULT(), lcid, NULL, OLE_RELEASE, oledata_get_struct(), and oledata::pDispatch.
VOID * val2variant_ptr | ( | VALUE | val, |
VARIANT * | var, | ||
VARTYPE | vt | ||
) |
Definition at line 1018 of file win32ole.c.
References cWIN32OLE_lcid, HRESULT(), NULL, ole_raise(), ole_val2variant_ex(), rb_eRuntimeError, and rb_raise().
static REFIID LPOLESTR __RPC_FAR UINT cNames |
Definition at line 88 of file win32ole.c.
Referenced by EVENTSINK_GetIDsOfNames().
VALUE cWIN32OLE |
Definition at line 38 of file win32ole.c.
Referenced by Init_win32ole(), Init_win32ole_variant_m(), ole_val2variant(), and ole_variant2val().
LCID cWIN32OLE_lcid |
Definition at line 3966 of file win32ole.c.
Referenced by Init_win32ole(), ole_variant2val(), typelib_from_val(), and val2variant_ptr().
DISPID dispIdMember |
Definition at line 89 of file win32ole.c.
DWORD dwCallType |
Definition at line 216 of file win32ole.c.
Definition at line 268 of file win32ole.c.
Definition at line 252 of file win32ole.c.
static HTASK DWORD dwTickCount |
Definition at line 218 of file win32ole.c.
static UINT iTInfo |
Definition at line 87 of file win32ole.c.
static REFIID LPOLESTR __RPC_FAR UINT LCID lcid |
Definition at line 87 of file win32ole.c.
Referenced by typelib_from_val().
Definition at line 219 of file win32ole.c.
ID nameid = rb_check_id_cstr(psz, (long)strlen(psz), cWIN32OLE_enc) |
Definition at line 355 of file win32ole.c.
static UINT __RPC_FAR * pctinfo |
Definition at line 86 of file win32ole.c.
DISPID REFIID LCID WORD DISPPARAMS __RPC_FAR* pDispParams |
Definition at line 89 of file win32ole.c.
DISPID REFIID LCID WORD DISPPARAMS __RPC_FAR VARIANT __RPC_FAR EXCEPINFO __RPC_FAR* pExcepInfo |
Definition at line 89 of file win32ole.c.
static UINT LCID ITypeInfo __RPC_FAR *__RPC_FAR * ppTInfo |
Definition at line 87 of file win32ole.c.
static REFIID void __RPC_FAR *__RPC_FAR * ppvObject |
Definition at line 83 of file win32ole.c.
DISPID REFIID LCID WORD DISPPARAMS __RPC_FAR VARIANT __RPC_FAR EXCEPINFO __RPC_FAR UINT __RPC_FAR* puArgErr |
Definition at line 89 of file win32ole.c.
DISPID REFIID LCID WORD DISPPARAMS __RPC_FAR VARIANT __RPC_FAR* pVarResult |
Definition at line 89 of file win32ole.c.
static REFIID LPOLESTR __RPC_FAR UINT LCID DISPID __RPC_FAR * rgDispId |
Definition at line 88 of file win32ole.c.
static REFIID LPOLESTR __RPC_FAR * rgszNames |
Definition at line 88 of file win32ole.c.
static REFIID riid |
Definition at line 83 of file win32ole.c.
static HTASK threadIDCallee |
Definition at line 250 of file win32ole.c.
DWORD HTASK threadIDCaller |
Definition at line 217 of file win32ole.c.
DISPID REFIID LCID WORD wFlags |
Definition at line 89 of file win32ole.c.