Ruby
2.5.0dev(2017-10-22revision60238)
|
#include "ruby/ruby.h"
#include "ruby/st.h"
#include "ruby/encoding.h"
#include <ctype.h>
#include <windows.h>
#include <ocidl.h>
#include <olectl.h>
#include <ole2.h>
#include <stdlib.h>
#include <math.h>
#include <varargs.h>
#include <objidl.h>
#include "win32ole_variant_m.h"
#include "win32ole_typelib.h"
#include "win32ole_type.h"
#include "win32ole_variable.h"
#include "win32ole_method.h"
#include "win32ole_param.h"
#include "win32ole_event.h"
#include "win32ole_variant.h"
#include "win32ole_record.h"
#include "win32ole_error.h"
Go to the source code of this file.
Data Structures | |
struct | oledata |
Macros | |
#define | GNUC_OLDER_3_4_4 |
#define | va_init_list(a, b) va_start(a) |
#define | DOUT fprintf(stderr,"%s(%d)\n", __FILE__, __LINE__) |
#define | DOUTS(x) fprintf(stderr,"%s(%d):" #x "=%s\n",__FILE__, __LINE__,x) |
#define | DOUTMSG(x) fprintf(stderr, "%s(%d):" #x "\n",__FILE__, __LINE__) |
#define | DOUTI(x) fprintf(stderr, "%s(%d):" #x "=%d\n",__FILE__, __LINE__,x) |
#define | DOUTD(x) fprintf(stderr, "%s(%d):" #x "=%f\n",__FILE__, __LINE__,x) |
#define | V_UNION1(X, Y) ((X)->Y) |
#define | V_I1REF(X) V_UNION(X, pcVal) |
#define | V_UI2REF(X) V_UNION(X, puiVal) |
#define | V_INT(X) V_UNION(X, intVal) |
#define | V_INTREF(X) V_UNION(X, pintVal) |
#define | V_UINT(X) V_UNION(X, uintVal) |
#define | V_UINTREF(X) V_UNION(X, puintVal) |
#define | I8_2_NUM RB_INT2NUM |
#define | UI8_2_NUM RB_UINT2NUM |
#define | NUM2I8 RB_NUM2INT |
#define | NUM2UI8 RB_NUM2UINT |
#define | OLE_ADDREF(X) (X) ? ((X)->lpVtbl->AddRef(X)) : 0 |
#define | OLE_RELEASE(X) (X) ? ((X)->lpVtbl->Release(X)) : 0 |
#define | OLE_FREE(x) |
#define | OLE_GET_TYPEATTR(X, Y) ((X)->lpVtbl->GetTypeAttr((X), (Y))) |
#define | OLE_RELEASE_TYPEATTR(X, Y) ((X)->lpVtbl->ReleaseTypeAttr((X), (Y))) |
#define | WC2VSTR(x) ole_wc2vstr((x), TRUE) |
Functions | |
struct oledata * | oledata_get_struct (VALUE obj) |
LPWSTR | ole_vstr2wc (VALUE vstr) |
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) |
void | ole_initialize (void) |
VALUE | default_inspect (VALUE self, const char *class_name) |
char * | ole_wc2mb (LPWSTR pw) |
VALUE | ole_wc2vstr (LPWSTR pw, BOOL isfree) |
BOOL | ole_initialized (void) |
HRESULT | ole_docinfo_from_type (ITypeInfo *pTypeInfo, BSTR *name, BSTR *helpstr, DWORD *helpcontext, BSTR *helpfile) |
VALUE | ole_typedesc2val (ITypeInfo *pTypeInfo, TYPEDESC *pTypeDesc, VALUE typedetails) |
VALUE | make_inspect (const char *class_name, VALUE detail) |
void | ole_val2variant (VALUE val, VARIANT *var) |
void | ole_val2variant2 (VALUE val, VARIANT *var) |
void | ole_val2variant_ex (VALUE val, VARIANT *var, VARTYPE vt) |
VALUE | ole_variant2val (VARIANT *pvar) |
HRESULT | ole_val_ary2variant_ary (VALUE val, VARIANT *var, VARTYPE vt) |
VOID * | val2variant_ptr (VALUE val, VARIANT *var, VARTYPE vt) |
HRESULT | typelib_from_val (VALUE obj, ITypeLib **pTypeLib) |
Variables | |
VALUE | cWIN32OLE |
LCID | cWIN32OLE_lcid |
#define DOUT fprintf(stderr,"%s(%d)\n", __FILE__, __LINE__) |
Definition at line 38 of file win32ole.h.
#define DOUTD | ( | x | ) | fprintf(stderr, "%s(%d):" #x "=%f\n",__FILE__, __LINE__,x) |
Definition at line 42 of file win32ole.h.
#define DOUTI | ( | x | ) | fprintf(stderr, "%s(%d):" #x "=%d\n",__FILE__, __LINE__,x) |
Definition at line 41 of file win32ole.h.
#define DOUTMSG | ( | x | ) | fprintf(stderr, "%s(%d):" #x "\n",__FILE__, __LINE__) |
Definition at line 40 of file win32ole.h.
#define DOUTS | ( | x | ) | fprintf(stderr,"%s(%d):" #x "=%s\n",__FILE__, __LINE__,x) |
Definition at line 39 of file win32ole.h.
#define GNUC_OLDER_3_4_4 |
Definition at line 7 of file win32ole.h.
#define I8_2_NUM RB_INT2NUM |
Definition at line 91 of file win32ole.h.
#define NUM2I8 RB_NUM2INT |
Definition at line 93 of file win32ole.h.
Referenced by ole_val2variant_ex().
#define NUM2UI8 RB_NUM2UINT |
Definition at line 94 of file win32ole.h.
Referenced by ole_val2variant_ex().
#define OLE_ADDREF | ( | X | ) | (X) ? ((X)->lpVtbl->AddRef(X)) : 0 |
Definition at line 97 of file win32ole.h.
Referenced by create_win32ole_variable(), and ole_val2variant().
#define OLE_FREE | ( | x | ) |
Definition at line 99 of file win32ole.h.
#define OLE_GET_TYPEATTR | ( | X, | |
Y | |||
) | ((X)->lpVtbl->GetTypeAttr((X), (Y))) |
Definition at line 108 of file win32ole.h.
Referenced by ole_methods_from_typeinfo().
#define OLE_RELEASE | ( | X | ) | (X) ? ((X)->lpVtbl->Release(X)) : 0 |
Definition at line 98 of file win32ole.h.
Referenced by EVENTSINK_Destructor(), ole_docinfo_from_type(), ole_type_from_itypeinfo(), and typelib_from_val().
#define OLE_RELEASE_TYPEATTR | ( | X, | |
Y | |||
) | ((X)->lpVtbl->ReleaseTypeAttr((X), (Y))) |
Definition at line 109 of file win32ole.h.
#define UI8_2_NUM RB_UINT2NUM |
Definition at line 92 of file win32ole.h.
#define V_I1REF | ( | X | ) | V_UNION(X, pcVal) |
Definition at line 62 of file win32ole.h.
#define V_INT | ( | X | ) | V_UNION(X, intVal) |
Definition at line 70 of file win32ole.h.
#define V_INTREF | ( | X | ) | V_UNION(X, pintVal) |
Definition at line 74 of file win32ole.h.
#define V_UI2REF | ( | X | ) | V_UNION(X, puiVal) |
Definition at line 66 of file win32ole.h.
#define V_UINT | ( | X | ) | V_UNION(X, uintVal) |
Definition at line 78 of file win32ole.h.
#define V_UINTREF | ( | X | ) | V_UNION(X, puintVal) |
Definition at line 82 of file win32ole.h.
#define V_UNION1 | ( | X, | |
Y | |||
) | ((X)->Y) |
Definition at line 47 of file win32ole.h.
#define va_init_list | ( | a, | |
b | |||
) | va_start(a) |
Definition at line 34 of file win32ole.h.
Referenced by rb_funcall().
#define WC2VSTR | ( | x | ) | ole_wc2vstr((x), TRUE) |
Definition at line 130 of file win32ole.h.
Referenced by ole_type_from_itypeinfo().
Definition at line 1344 of file win32ole.c.
References make_inspect(), rb_funcall(), and rb_intern.
Definition at line 1332 of file win32ole.c.
References rb_str_cat2(), rb_str_concat(), and rb_str_new2.
Referenced by default_inspect().
HRESULT ole_docinfo_from_type | ( | ITypeInfo * | pTypeInfo, |
BSTR * | name, | ||
BSTR * | helpstr, | ||
DWORD * | helpcontext, | ||
BSTR * | helpfile | ||
) |
Definition at line 3656 of file win32ole.c.
References HRESULT(), and OLE_RELEASE.
void ole_initialize | ( | void | ) |
Definition at line 812 of file win32ole.c.
References HRESULT().
BOOL ole_initialized | ( | void | ) |
Definition at line 394 of file win32ole.c.
References g_ole_initialized.
Definition at line 3717 of file win32ole.c.
References Qnil, rb_ary_push(), and rb_str_new2.
void ole_val2variant | ( | VALUE | val, |
VARIANT * | var | ||
) |
Definition at line 1248 of file win32ole.c.
References cWIN32OLE, cWIN32OLE_RECORD, cWIN32OLE_VARIANT, NULL, OLE_ADDREF, ole_rec2variant(), ole_variant2variant(), oledata_get_struct(), oledata::pDispatch, rb_cTime, and rb_obj_is_kind_of().
Referenced by if().
void ole_val2variant2 | ( | VALUE | val, |
VARIANT * | var | ||
) |
Definition at line 1324 of file win32ole.c.
Referenced by ole_val2variant_ex().
void ole_val2variant_ex | ( | VALUE | val, |
VARIANT * | var, | ||
VARTYPE | vt | ||
) |
Definition at line 981 of file win32ole.c.
References NULL, NUM2I8, NUM2UI8, ole_val2variant2(), and Qnil.
Referenced by val2variant_ptr().
Definition at line 1186 of file win32ole.c.
References Check_Type, HRESULT(), NULL, and T_ARRAY.
VALUE ole_variant2val | ( | VARIANT * | pvar | ) |
Definition at line 1417 of file win32ole.c.
References ALLOC_N, free(), HRESULT(), Qnil, rb_ary_new(), rb_eRuntimeError, rb_raise(), and val.
Referenced by if().
LPWSTR ole_vstr2wc | ( | VALUE | vstr | ) |
Definition at line 864 of file win32ole.c.
char* ole_wc2mb | ( | LPWSTR | pw | ) |
Definition at line 742 of file win32ole.c.
VALUE ole_wc2vstr | ( | LPWSTR | pw, |
BOOL | isfree | ||
) |
Definition at line 945 of file win32ole.c.
Definition at line 856 of file win32ole.c.
References TypedData_Get_Struct.
Referenced by ole_val2variant(), and typelib_from_val().
Definition at line 1709 of file win32ole.c.
References buf, err, NULL, Qnil, and rb_str_new2.
Definition at line 1724 of file win32ole.c.
References ALLOC_N, err, free(), NULL, Qnil, rb_str_new2, size, and val.
Referenced by reg_get_val2().
Definition at line 1752 of file win32ole.c.
References err, NULL, Qnil, reg_get_val(), and val.
LONG reg_open_key | ( | HKEY | hkey, |
const char * | name, | ||
HKEY * | phkey | ||
) |
Definition at line 1697 of file win32ole.c.
Referenced by reg_open_vkey().
LONG reg_open_vkey | ( | HKEY | hkey, |
VALUE | key, | ||
HKEY * | phkey | ||
) |
Definition at line 1703 of file win32ole.c.
References reg_open_key(), and StringValuePtr.
Definition at line 3917 of file win32ole.c.
References cWIN32OLE_lcid, HRESULT(), NULL, OLE_RELEASE, oledata_get_struct(), and oledata::pDispatch.
VOID* val2variant_ptr | ( | VALUE | val, |
VARIANT * | var, | ||
VARTYPE | vt | ||
) |
Definition at line 1016 of file win32ole.c.
References cWIN32OLE_lcid, HRESULT(), NULL, ole_raise(), ole_val2variant_ex(), and rb_eRuntimeError.
VALUE cWIN32OLE |
Definition at line 115 of file win32ole.h.
LCID cWIN32OLE_lcid |
Definition at line 116 of file win32ole.h.
Referenced by Init_win32ole(), typelib_from_val(), and val2variant_ptr().