Flowdock
method

typename

Importance_2
v2_4_6 - Show latest stable - 0 notes - Class: WIN32OLE_RECORD
typename() public

Returns the type name of VT_RECORD OLE variable.

If COM server in VB.NET ComServer 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 Class

then, the result of WIN32OLE_RECORD#typename is the following:

require 'win32ole'
obj = WIN32OLE.new('ComServer.ComClass')
book = obj.getBook
book.typename # => "Book"
Show source
Register or log in to add new notes.