Unable to find an entry point

D

David Browne

Pratibha said:
hi,
i made a dll named rtbdts.dll and call it from vb.net through dllimport

<DllImport("C:\misc\rtbdll\rtbdts.dll")>
Public Shared Function Init() As String
End Function

But it returns the following error
"Unable to find an entry point named 'Init' in DLL
'C:\misc\rtbdll\rtbdts.dll'."

From the Visual Studion Command prompt run

dumpbin /exports C:\misc\rtbdll\rtbdts.dll

That will show you what the entry points are.

David
 
T

Tom Shelton

Thanks..
it showed me the following names
DllCanUnloadNow
DllGetClassObject
DllRegisterServer
DllUnregisterServer

How to know which is entry point.. So i tried all of them one by one. But
the function returns nothing while it should return "sucess"

Any suggestion??

That's a COM dll... You should be able to add a reference to it from
the references dialog box.
 
H

Herfried K. Wagner [MVP]

Pratibha said:
I know that but i can add only .NET component and not COM ... so i have to
use dllimport.

I cant add refence of it.

Simply add the reference on the "COM" tab of the "Add Reference..."
dialog...
 
P

Pratibha

hi,
i made a dll named rtbdts.dll and call it from vb.net through dllimport

<DllImport("C:\misc\rtbdll\rtbdts.dll")>
Public Shared Function Init() As String
End Function

But it returns the following error
"Unable to find an entry point named 'Init' in DLL
'C:\misc\rtbdll\rtbdts.dll'."

Any solution?
Thanks in advance
 
P

Pratibha

Thanks..
it showed me the following names
DllCanUnloadNow
DllGetClassObject
DllRegisterServer
DllUnregisterServer

How to know which is entry point.. So i tried all of them one by one. But
the function returns nothing while it should return "sucess"

Any suggestion??
 
P

Pratibha

I know that but i can add only .NET component and not COM ... so i have to
use dllimport.

I cant add refence of it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top