3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
|
# File 'win32ole.c', line 3514
static VALUE
fole_type(VALUE self)
{
ITypeInfo *pTypeInfo;
HRESULT hr;
struct oledata *pole = NULL;
LCID lcid = cWIN32OLE_lcid;
VALUE type = Qnil;
pole = oledata_get_struct(self);
hr = pole->pDispatch->lpVtbl->GetTypeInfo( pole->pDispatch, 0, lcid, &pTypeInfo );
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLEQueryInterfaceError, "failed to GetTypeInfo");
}
type = ole_type_from_itypeinfo(pTypeInfo);
OLE_RELEASE(pTypeInfo);
if (type == Qnil) {
rb_raise(rb_eRuntimeError, "failed to create WIN32OLE_TYPE obj from ITypeInfo");
}
return type;
}
|