Walter,
Yes, I'm still getting this error after I added the prog id. I was getting
errors before and after adding the prog id. My current code is below...
<Guid("26014480-5D35-49ed-B83C-1B862BF92517")> _
<InterfaceType(ComInterfaceType.InterfaceIsIDispatch)> _
Public Interface ILoggingEvents
<DispId(1)> _
Sub LogExitDisplayLoggingWindow()
<DispId(2)> _
Sub LogErrorOccurred(ByVal outEx As Exception)
End Interface
<Guid("542FA6CF-F2C8-46d3-8601-EF370BBEF146")> _
<InterfaceType(ComInterfaceType.InterfaceIsIDispatch)> _
Public Interface ILogging
Property LogToFile() As Boolean
Property LogToScreen() As Boolean
End Interface
#End Region
<Guid("64439B0F-D1BF-43d7-BCD9-BA908BF2CCF6")> _
<ClassInterface(ClassInterfaceType.None)> _
<ProgId("CLA_Logging.Logging")> _
<ComSourceInterfaces(GetType(ILoggingEvents))> _
Public Class Logging
Implements IDisposable
Implements ILogging
Public Delegate Sub LogExitDisplayLoggingWindowHandler()
Public Delegate Sub LogErrorOccurredHandler(ByVal outEx As Exception)
Public Event LogExitDisplayLoggingWindow As
LogExitDisplayLoggingWindowHandler
Public Event LogErrorOccurred As LogErrorOccurredHandler
Public Sub New()
Try
If m_formInstance Is Nothing Then
m_formInstance = New frmLogDisplay()
m_formInstance.ParentLogging = Me
End If
Catch ex As Exception
ProcessException(ex)
End Try
End Sub
Public Property LogToFile() As Boolean Implements ILogging.LogToFile
Private Get
Try
Return m_LogToFile
Catch ex As Exception
ProcessException(ex)
End Try
End Get
Set(ByVal value As Boolean)
Try
m_LogToFile = value
Catch ex As Exception
ProcessException(ex)
End Try
End Set
End Property
Public Property LogToScreen() As Boolean Implements ILogging.LogToScreen
Private Get
Try
Return m_LogToScreen
Catch ex As Exception
ProcessException(ex)
End Try
End Get
Set(ByVal value As Boolean)
Try
m_LogToScreen = value
Catch ex As Exception
ProcessException(ex)
End Try
End Set
End Property
'*** Other code not shown.
End Class
Great Links:
(Part 1)
http://www.15seconds.com/issue/040721.htm (Part 2)...
http://www.15seconds.com/issue/060309.htm http://www.codeproject.com/dotnet/cominterop.asp ....(See Part 2)
Yes Walter I am all over the place on this COM InterOp topic. It would be
nice to have one good source of docuemntation and code examples of how to
use these attributes and when and where each one is needed, etc... It still
blows my mind that I can't inherit from a base class and for my derived
class see my public methods, properties and event when exposed via COM
Attributes. Maybe after I have a working module of the proper and best way
to do COM InterOp I a can explore the "Inheritance Option".
* See newest post named: "COM InterOp - Interace ?s" for continued
descussion's on this topic.
Thanks! JerryM