ole_type()
public
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;
}