ole_type

WIN32OLE_PARAM#ole_type Instance Public methods Returns OLE type of WIN32OLE_PARAM object(parameter of OLE method). tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs') param1 = method.params[0] puts param1.ole_type # => VARIANT

ole_type_detail

WIN32OLE_PARAM#ole_type_detail Instance Public methods Returns detail information of type of argument. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'IWorksheetFunction') method = WIN32OLE_METHOD.new(tobj, 'SumIf') param1 = method.params[0] p param1.ole_type_detail # => ["PTR", "USERDEFINED", "Range"]

optional?

WIN32OLE_PARAM#optional? Instance Public methods Returns true if argument is optional. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs') param1 = method.params[0] puts "#{param1.name} #{param1.optional?}" # => Filename true

output?

WIN32OLE#output? Instance Public methods Returns true if argument is output. tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'DWebBrowserEvents') method = WIN32OLE_METHOD.new(tobj, 'NewWindow') method.params.each do |param| puts "#{param.name} #{param.output?}" end The result of above script is following: URL false Flags false TargetFrameName false PostData false Headers false Processed true

retval?

WIN32OLE_PARAM#retval? Instance Public methods Returns true if argument is return value. tobj = WIN32OLE_TYPE.new('DirectX 7 for Visual Basic Type Library', 'DirectPlayLobbyConnection') method = WIN32OLE_METHOD.new(tobj, 'GetPlayerShortName') param = method.params[0] puts "#{param.name} #{param.retval?}" # => name true

to_s

to_s() Instance Public methods Alias for: name

new

WIN32OLE_TYPE.new(typelib, ole_class) â WIN32OLE_TYPE object Class Public methods Returns a new WIN32OLE_TYPE object. The first argument typelib specifies OLE type library name. The second argument specifies OLE class name. WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') # => WIN32OLE_TYPE object of Application class of Excel.

ole_classes

WIN32OLE_TYPE.ole_classes(typelib) Class Public methods Returns array of WIN32OLE_TYPE objects defined by the typelib type library. This method will be OBSOLETE. Use WIN32OLE_TYPELIB.new.ole_classes instead.

progids

WIN32OLE_TYPE.progids Class Public methods Returns array of ProgID.

typelibs

WIN32OLE_TYPE.typelibs Class Public methods Returns array of type libraries. This method will be OBSOLETE. Use WIN32OLE_TYPELIB.typelibs.collect{|t| t.name} instead.