Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi.

 

When im trying to use my DLL in my app i get an error that it couldnt find an entry point for the given function. :confused:

 

Can anyone help me plz? Im new to DLLs :)

  • *Gurus*
Posted

I would assume if it's complaining about not finding an entry point, you're trying to use a C-style DLL from .NET, in which case you've got the name of the function wrong.

 

Can you paste your declare here if it still doesn't work?

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted

Yeh, i referenced it in the project.

Im using the class library vb template for making the dll.

I referenced it, then declared the function, its still complaining about no entry point.

 

What declaration you want to see?

 

Can anyone give me an example of a simple DLL plz, and the declaration for it

Posted

and when i try to register the dll it says it cannot find the entry point for the system to register it.

im just gonna past a simple code, can you tell me what to add to it, cause it doesnt work when i just do this.

 

Public Class Class1
   Public Function Funct(ByVal functi As String) As Boolean
       'function body...
   End Function
End Class

 

can you plz tell me what am i supposed to add to this?

  • *Experts*
Posted

You don't register the DLL with RegSvr32. They are not activeX

DLLs. Simply add a reference to it in your project and you can

use it.

Posted

i still doesnt work, even when i reference it.

i guess i just gotta give up on DLLs :(

  • *Experts*
Posted

Maybe you could include the project, or at least the entire source for the file that's trying to use the DLL? Also, exactly what is the DLL you're using (a C DLL, an ActiveX COM DLL, or a managed .NET DLL)? If you don't know, just describe where you got it or what it does.

 

The more details the better. :)

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

Ok, i will try to answer all your questions :)

 

I dont think there is a need to include source cause it just contains one line that i typed with the name of function and values, cause before i do anything real with the dlls i wanna learn how all that works.

 

The DLL was made using the Class Library Template from vb section of the New Project dialog. Its something simple like add two numbers, cause as i said before im just experimenting now with DLLs

 

I just dont know what to do :confused:

  • *Experts*
Posted

You don't need a declare statement at all. After you build your first project, you'll end up with a DLL.

 

From your test project, you'll have to add a reference to that DLL. Once you've got the reference, you'll have to create an object of that type. Suppose the class in your DLL is called ClassA with a method named AddNumbers(), use something like this in your test project:

Dim o As New ClassA()
Dim i As Integer
i = o.AddNumbers(5, 6)

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...