VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "CEntry"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Public path As String
Public ProgID As String
Public typeLib As String
Public version As String
Public Name As String
Public isControl As Boolean
Public isProgrammable As Boolean
Public clsid As String
'Public ProxyStubClsid32 As String 'used in Interfaces
'Public InProcServer32 As String   'is an inprocess dll
'Public LocalServer32 As String    'is an activex exe
Public AlreadyReferenced As Boolean

Dim x As Variant


Public Property Get GetProgID() As String
    If Len(ProgID) > 0 Then GetProgID = ProgID
End Property

Public Property Get GetName() As String
    GetName = Name
End Property

Public Property Get GetPath() As String
    GetPath = path
End Property

Public Property Get GetVersion() As String
    GetVersion = version
End Property

Public Property Get GetTypeLib() As String
    If Len(typeLib) > 0 Then GetTypeLib = typeLib
End Property

Public Property Get GetCLSID() As String
    GetCLSID = clsid
End Property

Function ToString() As String
Dim tmp() As String
    
    push tmp, "Name:    " & Name
    If Len(ProgID) > 0 Then push tmp, "ProgID:  " & ProgID
    push tmp, "Path:    " & path
    push tmp, "Version: " & version
    If Len(typeLib) > 0 Then push tmp, "TypeLib: " & typeLib
    push tmp, "CLSID:   " & clsid
    
    ToString = Join(tmp, vbCrLf)
End Function

Function Output() As String
Dim tmp() As String, sPath As String
Dim part() As String
    
  part = Split(path, "\")
  sPath = part(UBound(part))

  If Len(typeLib) > 0 Then
    push tmp, "Object=" & typeLib & "#"
    push tmp, version & "#0; "
    push tmp, sPath
  End If
  
  Output = Join(tmp, vbCrLf)
End Function

Private Sub push(ary, Value) 'this modifies parent ary object
    On Error GoTo init
    x = UBound(ary) '<-throws Error If Not initalized
    ReDim Preserve ary(UBound(ary) + 1)
    ary(UBound(ary)) = Value
    Exit Sub
init:     ReDim ary(0): ary(0) = Value
End Sub
