method
ole_obj_help
v1_8_7_72 -
Show latest stable
- Class:
WIN32OLE
ole_obj_help()public
Returns WIN32OLE_TYPE object.
excel = WIN32OLE.new('Excel.Application') tobj = excel.ole_obj_help
/*
* call-seq:
* WIN32OLE#ole_obj_help
*
* Returns WIN32OLE_TYPE object.
*
* excel = WIN32OLE.new('Excel.Application')
* tobj = excel.ole_obj_help
*/
static VALUE
fole_obj_help( self )
VALUE self;
{
unsigned int index;
ITypeInfo *pTypeInfo;
ITypeLib *pTypeLib;
HRESULT hr;
struct oledata *pole;
BSTR bstr;
LCID lcid = LOCALE_SYSTEM_DEFAULT;
VALUE type = Qnil;
OLEData_Get_Struct(self, pole);
hr = pole->pDispatch->lpVtbl->GetTypeInfo( pole->pDispatch, 0, lcid, &pTypeInfo );
if(FAILED(hr)) {
ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
}
hr = pTypeInfo->lpVtbl->GetContainingTypeLib( pTypeInfo, &pTypeLib, &index );
if(FAILED(hr)) {
OLE_RELEASE(pTypeInfo);
ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
}
hr = pTypeLib->lpVtbl->GetDocumentation( pTypeLib, index,
&bstr, NULL, NULL, NULL);
if (SUCCEEDED(hr)) {
type = foletype_s_allocate(cWIN32OLE_TYPE);
oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));
}
OLE_RELEASE(pTypeLib);
OLE_RELEASE(pTypeInfo);
return type;
} Related methods
- Instance methods
- []
- []=
- _getproperty
- _invoke
- _setproperty
- each
- invoke
- method_missing
- ole_activex_initialize
- ole_free
- ole_func_methods
- ole_get_methods
- ole_method
- ole_method_help
- ole_methods
- ole_obj_help
- ole_put_methods
- setproperty
- Class methods
- codepage
- codepage=
- connect
- const_load
- new
- ole_free
- ole_reference_count
- ole_show_help