I am trying to access a vb.net dll from vb6. I get the error" Can't
find dll entry point VbDoNetEventSender in c:\.......
The purpose of this exercise is to learn how to access a vbnet dll from
vb6. I'm not sure if this is a problem in the call or the dll.
Note: I get the same error when I try to regsvr32 the dll. Both
routines compile without errors and run without errors except the call
line in vb6 which generates the cant find entry point.
VB Call:
Private Declare Sub VbDoNetEventSender Lib "C:\Documents and
Settings\Bob\My Documents\Docs\Projects\City of
Rochester\RPU\xFormer\Testdll\Testdll\Testdll\bin\Testdll.dll" (n As
Integer)
Dim i As Integer
i = 0
n = 1
Call VbDoNetEventSender(n)
VBNET DLL Code:
Imports System.Runtime.InteropServices
'This is the name of the event interface to be generated
<InterfaceType(ComInterfaceType.InterfaceisIDispatch), _
Guid("68E53BB4-48F9-45cc-96C6-72033295E26A")> _
Public Interface _DEventInterface
<DispId(1)> Sub TheEvent(ByVal msg As String)
End Interface
<ClassInterface(ClassInterfaceType.AutoDual), _
Guid("7D6A1F10-0224-4fbf-8C17-B7A4B707372A"), _
ComSourceInterfaces(GetType(_DEventInterface))> _
Public Class VbDoNetEventSender
Public Event TheEvent(ByVal msg As String)
Public Sub FireTheEvent()
RaiseEvent TheEvent("heelo from the DotNetEventSender")
End Sub
End Class