Flowdock
method

ole_instance_variable_get

Importance_2
Ruby latest stable (v2_5_5) - 0 notes - Class: WIN32OLE_RECORD
ole_instance_variable_get(p1) public

Returns value specified by the member name of VT_RECORD OLE object. If the member name is not correct, KeyError exception is raised. If you can’t access member variable of VT_RECORD OLE object directly, use this method.

If COM server in VB.NET ComServer project is the following:

Imports System.Runtime.InteropServices
Public Class ComClass
    Public Structure ComObject
        Public object_id As Ineger
    End Structure
End Class

and Ruby Object class has title attribute:

then accessing object_id of ComObject from Ruby is as the following:

srver = WIN32OLE.new('ComServer.ComClass')
obj = WIN32OLE_RECORD.new('ComObject', server)
# obj.object_id returns Ruby Object#object_id
obj.ole_instance_variable_get(:object_id) # => nil
Show source
Register or log in to add new notes.