com >> Cant find dll entry point

by bob » Tue, 01 Nov 2005 23:52:56 GMT

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



com >> Cant find dll entry point

by Ralph » Wed, 02 Nov 2005 03:24:44 GMT






It appears you are confusing two technologies: Importing a regular Dll and
Importing an ActiveX component.

You can't register a regular dll (it has no entry point) and you can't
access an external interface/class without it being an ActiveX.

Your problem is not with VB6 - it is making up your mind what the dotNet
character is.

You need to post in a .net newsgroup concerning the type of component you
are trying to create.

--
<response type="generic" language="VB.Net">
This newsgroup is for users of Visual Basic version 6.0
and earlier and not the misleadingly named VB.Net
or VB 200x. Solutions, and often even the questions,
for one platform will be meaningless in the other.
When VB.Net was released Microsoft created new newsgroups
devoted to the new platform so that neither group of
developers need wade through the clutter of unrelated
topics. Look for newsgroups with the words "dotnet" or
"vsnet" in their name. For the msnews.microsoft.com news
server try these:

microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb

</response>





Similar Threads

1. cant find entry point in dll

when i use the function inside this DLL
it said cant find DLL entry point GetAddr() in D:\....
what should i do?


2. cant find entry point

3. Error: Unable to find an entry point named FUNCATIONNAME in DLL DLLNAME

4. Unable to find an entry point named in DLL - VB.Net

5. Unable to find an entry point named FUNCATIONNAME in DLL DLLNAME

I have a third party dll and I am sure that it is not an activeX or dotnet 
assembly .
I have check it up with Dependency Walker software and found the list of 
it's exported function in C++ syntax
for example :

void __cdecl TelEnd(void)
void __cdecl FaxStop(void)

and so on ...

I can not call them from VB/VB.NET and I received the following error 
message
" Unable to find an enry point named FUNCTIONNAME in  Dll DLLNAME "

I use the following declaration :

Declare Sub TelEnd Lib "......\MultiFunc.dll" ()

what is wrong with that?


Thanks
Saman



6. Error 453: Can't find DLL entry point (VB6) - Visual Basic/VB

7. Can't find DLL entry point GetPrivateProfileStringA in kernel32

I am getting this error:-

Error Code: 453
Can't find DLL entry point GetPrivateProfileStringA in kernel32

My declarations are like this:-

Public Declare Function GetPrivateProfileString% Lib "kernel32" Alias
"GetPrivateProfileStringA" (ByVal lpAppName$, ByVal lpKeyName$, ByVal
lpDefault$, ByVal lpReturnedString$, ByVal nSize%, ByVal m_iniFile$)

Any idea why I am getting this error

Thanks


8. can't find entry point in external dll - Visual Basic/VB