M
Michael Tissington
I have created a class with a number of methods and events as described in
the MSDN infor for handling events.
I am trying to use the attributes GuidAttribute and DispID. The problem that
I'm having is that when I try to use the tlb file the guid and dispid
attributes seem to have been ignored - here is some of the code I'm using.
Any ideas ?
-------- snip ---------------
<GuidAttribute("20000000-3371-0000-AF8A-AFFECC1B0967"),
InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)> _
Public Interface _Form
DispId(10)> _
Sub ShowForm(ByVal sCN As String, ByVal sGUID As String)
<DispId(20)> _
Event ShutDownForm()
End Interface
<GuidAttribute("10000000-3371-0000-AF8A-AFFECC1B0967"),
InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)> _
Public Interface MAPIFormEvents
Sub ShutdownForm()
End Interface
<GuidAttribute("30000000-3371-0000-AF8A-AFFECC1B0967"),
ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(GetType(MAPIFormEvents))> _
Public Class Form
Implements _Form
Public Event ShutDownForm() Implements _Form.ShutDownForm
--------- snip ----------------
the MSDN infor for handling events.
I am trying to use the attributes GuidAttribute and DispID. The problem that
I'm having is that when I try to use the tlb file the guid and dispid
attributes seem to have been ignored - here is some of the code I'm using.
Any ideas ?
-------- snip ---------------
<GuidAttribute("20000000-3371-0000-AF8A-AFFECC1B0967"),
InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)> _
Public Interface _Form
DispId(10)> _
Sub ShowForm(ByVal sCN As String, ByVal sGUID As String)
<DispId(20)> _
Event ShutDownForm()
End Interface
<GuidAttribute("10000000-3371-0000-AF8A-AFFECC1B0967"),
InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)> _
Public Interface MAPIFormEvents
Sub ShutdownForm()
End Interface
<GuidAttribute("30000000-3371-0000-AF8A-AFFECC1B0967"),
ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(GetType(MAPIFormEvents))> _
Public Class Form
Implements _Form
Public Event ShutDownForm() Implements _Form.ShutDownForm
--------- snip ----------------