S
Sai Prakash
Hi,
I am creating a vb.net interop dll which implements an interface to
access the functions and properties of the class. Is there any way I
can raise the events of the class too ? The events were working fine
before adding the interface. I read through a number of articles, but
could not implement them in my code. The structure of my dll is as
follows:
.................................................................................................................
Imports System.Runtime.InteropServices
<ComVisible(True)> _
<Guid(InteropUserControl.InterfaceId)> _
Public Interface IInteropUserControl
Function OleConnected() As String
Property Layers() As Integer
End Interface
<ComVisible(True)> _
<Guid(InteropUserControl.ClassId)> _
<ComDefaultInterface(GetType(IInteropUserControl))> _
Public Class InteropUserControl
Implements IInteropUserControl
Dim iLayers as Integer
Public Property Layers() As Integer Implements
IInteropUserControl.Layers
Get
Return iLayers
End Get
Set(ByVal value As Integer)
iLayers = value
End Set
End Property
Public Function OleConnected() As String Implements
IInteropUserControl.OleConnected
Return "Connected to VB.Net"
End Function
End Class
......................................................................................................
Thanks for any help.
Priya
I am creating a vb.net interop dll which implements an interface to
access the functions and properties of the class. Is there any way I
can raise the events of the class too ? The events were working fine
before adding the interface. I read through a number of articles, but
could not implement them in my code. The structure of my dll is as
follows:
.................................................................................................................
Imports System.Runtime.InteropServices
<ComVisible(True)> _
<Guid(InteropUserControl.InterfaceId)> _
Public Interface IInteropUserControl
Function OleConnected() As String
Property Layers() As Integer
End Interface
<ComVisible(True)> _
<Guid(InteropUserControl.ClassId)> _
<ComDefaultInterface(GetType(IInteropUserControl))> _
Public Class InteropUserControl
Implements IInteropUserControl
Dim iLayers as Integer
Public Property Layers() As Integer Implements
IInteropUserControl.Layers
Get
Return iLayers
End Get
Set(ByVal value As Integer)
iLayers = value
End Set
End Property
Public Function OleConnected() As String Implements
IInteropUserControl.OleConnected
Return "Connected to VB.Net"
End Function
End Class
......................................................................................................
Thanks for any help.
Priya