Class: Object
| Relationships & Source Files | |
| Inherits: | BasicObject |
| Defined in: | ext/win32ole/win32ole_type.c, ext/win32ole/win32ole_event.c, ext/win32ole/win32ole_method.c, ext/win32ole/win32ole_param.c, ext/win32ole/win32ole_record.c, ext/win32ole/win32ole_typelib.c, ext/win32ole/win32ole_variable.c, ext/win32ole/win32ole_variant.c |
Constant Summary
-
WIN32OLE_EVENT =
# File 'ext/win32ole/win32ole_event.c', line 1268
WIN32OLE_EVENTobjects controls OLE event.cWIN32OLE_EVENT -
WIN32OLE_METHOD =
# File 'ext/win32ole/win32ole_method.c', line 931
WIN32OLE_METHODobjects represent OLE method information.cWIN32OLE_METHOD -
WIN32OLE_PARAM =
# File 'ext/win32ole/win32ole_param.c', line 426
WIN32OLE_PARAMobjects represent param information of the OLE method.cWIN32OLE_PARAM -
WIN32OLE_RECORD =
# File 'ext/win32ole/win32ole_record.c', line 598
WIN32OLE_RECORDobjects represents VT_RECORD OLE variant. Win32OLE returnsWIN32OLE_RECORDobject if the result value of invoking OLE methods.If COM server in
VB.NETComServer project is the following:Imports System.Runtime.InteropServices Public Class ComClass Public Structure Book <MarshalAs(UnmanagedType.BStr)> _ Public title As String Public cost As Integer End Structure Public Function getBook() As Book Dim book As New Book book.title = "The Ruby Book" book.cost = 20 Return book End Function End Classthen, you can retrieve getBook return value from the following Ruby script:
require 'win32ole' obj = WIN32OLE.new('ComServer.ComClass') book = obj.getBook book.class # => WIN32OLE_RECORD book.title # => "The Ruby Book" book.cost # => 20cWIN32OLE_RECORD -
WIN32OLE_TYPE =
# File 'ext/win32ole/win32ole_type.c', line 891
WIN32OLE_TYPEobjects represent OLE type library information.cWIN32OLE_TYPE -
WIN32OLE_TYPELIB =
# File 'ext/win32ole/win32ole_typelib.c', line 831
WIN32OLE_TYPELIBobjects represent OLE tyblib information.cWIN32OLE_TYPELIB -
WIN32OLE_VARIABLE =
# File 'ext/win32ole/win32ole_variable.c', line 373
WIN32OLE_VARIABLEobjects represent OLE variable information.cWIN32OLE_VARIABLE -
WIN32OLE_VARIANT =
# File 'ext/win32ole/win32ole_variant.c', line 699
WIN32OLE_VARIANTobjects represents OLE variant.Win32OLE converts Ruby object into OLE variant automatically when invoking OLE methods. If OLE method requires the argument which is different from the variant by automatic conversion of Win32OLE, you can convert the specified variant type by using
WIN32OLE_VARIANTclass.param = WIN32OLE_VARIANT.new(10, WIN32OLE::VARIANT::VT_R4) oleobj.method(param)WIN32OLE_VARIANTdoes not support VT_RECORD variant. Use WIN32OLE_RECORD class instead ofWIN32OLE_VARIANTif the VT_RECORD variant is needed.cWIN32OLE_VARIANT