8 static void olevariable_free(
void *ptr);
9 static size_t olevariable_size(
const void *ptr);
11 static VALUE ole_variable_ole_type(ITypeInfo *
pTypeInfo, UINT var_index);
12 static VALUE folevariable_ole_type(
VALUE self);
13 static VALUE ole_variable_ole_type_detail(ITypeInfo *
pTypeInfo, UINT var_index);
14 static VALUE folevariable_ole_type_detail(
VALUE self);
15 static VALUE ole_variable_value(ITypeInfo *
pTypeInfo, UINT var_index);
17 static VALUE ole_variable_visible(ITypeInfo *
pTypeInfo, UINT var_index);
19 static VALUE ole_variable_kind(ITypeInfo *
pTypeInfo, UINT var_index);
20 static VALUE folevariable_variable_kind(
VALUE self);
21 static VALUE ole_variable_varkind(ITypeInfo *
pTypeInfo, UINT var_index);
27 {
NULL, olevariable_free, olevariable_size,},
32 olevariable_free(
void *ptr)
40 olevariable_size(
const void *ptr)
56 &olevariable_datatype, pvar);
85 folevariable_name(
VALUE self)
91 ole_variable_ole_type(ITypeInfo *
pTypeInfo, UINT var_index)
96 hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
100 pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
125 folevariable_ole_type(
VALUE self)
133 ole_variable_ole_type_detail(ITypeInfo *pTypeInfo, UINT var_index)
138 hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
142 pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
159 folevariable_ole_type_detail(
VALUE self)
163 return ole_variable_ole_type_detail(pvar->
pTypeInfo, pvar->
index);
167 ole_variable_value(ITypeInfo *pTypeInfo, UINT var_index)
172 hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
175 if(pVarDesc->varkind == VAR_CONST)
177 pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
203 folevariable_value(
VALUE self)
211 ole_variable_visible(ITypeInfo *pTypeInfo, UINT var_index)
216 hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
219 if (!(pVarDesc->wVarFlags & (VARFLAG_FHIDDEN |
220 VARFLAG_FRESTRICTED |
221 VARFLAG_FNONBROWSABLE))) {
224 pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
249 folevariable_visible(
VALUE self)
257 ole_variable_kind(ITypeInfo *pTypeInfo, UINT var_index)
262 hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
265 switch(pVarDesc->varkind) {
266 case VAR_PERINSTANCE:
281 pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
305 folevariable_variable_kind(
VALUE self)
313 ole_variable_varkind(ITypeInfo *pTypeInfo, UINT var_index)
318 hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
321 pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
345 folevariable_varkind(
VALUE self)
360 folevariable_inspect(
VALUE self)
363 VALUE n = folevariable_name(
self);
VALUE eWIN32OLERuntimeError
#define RUBY_TYPED_FREE_IMMEDIATELY
#define TypedData_Get_Struct(obj, type, data_type, sval)
VALUE rb_ivar_get(VALUE, ID)
VALUE rb_inspect(VALUE)
Convenient wrapper of Object::inspect.
VALUE make_inspect(const char *class_name, VALUE detail)
void ole_raise(HRESULT hr, VALUE ecs, const char *fmt,...)
void Init_win32ole_variable(void)
RUBY_EXTERN VALUE rb_cObject
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
VALUE ole_variant2val(VARIANT *pvar)
void rb_define_alias(VALUE klass, const char *name1, const char *name2)
Defines an alias of a method.
VALUE rb_sprintf(const char *format,...)
VALUE create_win32ole_variable(ITypeInfo *pTypeInfo, UINT index, VALUE name)
VALUE rb_ivar_set(VALUE, ID, VALUE)
VALUE ole_typedesc2val(ITypeInfo *pTypeInfo, TYPEDESC *pTypeDesc, VALUE typedetails)
typedef HRESULT(STDAPICALLTYPE FNCOCREATEINSTANCEEX)(REFCLSID
#define TypedData_Make_Struct(klass, type, data_type, sval)
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)