mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/win32ole/win32ole.c: refactoring. move
ole_typelib_from_itypeinfo into win32ole_typelib.c. * ext/win32ole/win32ole.h: ditto. * ext/win32ole/win32ole_typelib.h: ditto. * ext/win32ole/win32ole_typelib.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
eac5e58bb4
commit
7bf7bb84d3
5 changed files with 25 additions and 17 deletions
|
@ -1,3 +1,11 @@
|
|||
Tue Aug 12 22:59:48 2014 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||
|
||||
* ext/win32ole/win32ole.c: refactoring. move
|
||||
ole_typelib_from_itypeinfo into win32ole_typelib.c.
|
||||
* ext/win32ole/win32ole.h: ditto.
|
||||
* ext/win32ole/win32ole_typelib.h: ditto.
|
||||
* ext/win32ole/win32ole_typelib.h: ditto.
|
||||
|
||||
Tue Aug 12 21:49:40 2014 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||
|
||||
* ext/win32ole/win32ole.c (ole_create_dcom): use the converted
|
||||
|
|
|
@ -3962,22 +3962,6 @@ fole_type(VALUE self)
|
|||
return type;
|
||||
}
|
||||
|
||||
VALUE
|
||||
ole_typelib_from_itypeinfo(ITypeInfo *pTypeInfo)
|
||||
{
|
||||
HRESULT hr;
|
||||
ITypeLib *pTypeLib;
|
||||
unsigned int index;
|
||||
VALUE retval = Qnil;
|
||||
|
||||
hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &index);
|
||||
if(FAILED(hr)) {
|
||||
return Qnil;
|
||||
}
|
||||
retval = create_win32ole_typelib(pTypeLib);
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* WIN32OLE#ole_typelib -> The WIN32OLE_TYPELIB object
|
||||
|
|
|
@ -115,7 +115,6 @@ VALUE ole_wc2vstr(LPWSTR pw, BOOL isfree);
|
|||
BOOL ole_initialized();
|
||||
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 ole_typelib_from_itypeinfo(ITypeInfo *pTypeInfo);
|
||||
VALUE ole_type_from_itypeinfo(ITypeInfo *pTypeInfo);
|
||||
VALUE make_inspect(const char *class_name, VALUE detail);
|
||||
VALUE ole_variant2val(VARIANT *pvar);
|
||||
|
|
|
@ -103,6 +103,22 @@ itypelib(VALUE self)
|
|||
return ptlib->pTypeLib;
|
||||
}
|
||||
|
||||
VALUE
|
||||
ole_typelib_from_itypeinfo(ITypeInfo *pTypeInfo)
|
||||
{
|
||||
HRESULT hr;
|
||||
ITypeLib *pTypeLib;
|
||||
unsigned int index;
|
||||
VALUE retval = Qnil;
|
||||
|
||||
hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &index);
|
||||
if(FAILED(hr)) {
|
||||
return Qnil;
|
||||
}
|
||||
retval = create_win32ole_typelib(pTypeLib);
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* Document-class: WIN32OLE_TYPELIB
|
||||
*
|
||||
|
|
|
@ -7,4 +7,5 @@ void Init_win32ole_typelib();
|
|||
ITypeLib * itypelib(VALUE self);
|
||||
VALUE typelib_file(VALUE ole);
|
||||
VALUE create_win32ole_typelib(ITypeLib *pTypeLib);
|
||||
VALUE ole_typelib_from_itypeinfo(ITypeInfo *pTypeInfo);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue