Method: WIN32OLE::Record#inspect

Defined in:
win32ole_record.c

#inspectString

Returns the OLE struct name and member name and the value of member

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

Imports System.Runtime.InteropServices
Public Class ComClass
    <MarshalAs(UnmanagedType.BStr)> _
    Public title As String
    Public cost As Integer
End Class

then

srver = WIN32OLE.new('ComServer.ComClass')
obj = WIN32OLE::Record.new('Book', server)
obj.inspect # => <WIN32OLE::Record(ComClass) {"title" => nil, "cost" => nil}>

Returns:

  • (String)


577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'win32ole_record.c', line 577

static VALUE
folerecord_inspect(VALUE self)
{
    VALUE tname;
    VALUE field;
    tname = folerecord_typename(self);
    if (tname == Qnil) {
        tname = rb_inspect(tname);
    }
    field = rb_inspect(folerecord_to_h(self));
    return rb_sprintf("#<WIN32OLE::Record(%"PRIsVALUE") %"PRIsVALUE">",
                      tname,
                      field);
}