Guest mutant Posted January 20, 2003 Posted January 20, 2003 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 :) Quote
Moderators Robby Posted January 20, 2003 Moderators Posted January 20, 2003 Is the DLL referenced by your project? (right-click the project and 'Add References', then browse for the DLL) Does the DLL expose any of its' methods/properties/functions? Quote Visit...Bassic Software
*Gurus* divil Posted January 20, 2003 *Gurus* Posted January 20, 2003 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? Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Guest mutant Posted January 20, 2003 Posted January 20, 2003 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 Quote
*Gurus* divil Posted January 20, 2003 *Gurus* Posted January 20, 2003 If you're referencing a .NET dll you don't have to declare anything, as soon as the library is referenced you can create instances of the classes within in. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Guest mutant Posted January 20, 2003 Posted January 20, 2003 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? Quote
*Experts* Volte Posted January 20, 2003 *Experts* Posted January 20, 2003 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. Quote
Guest mutant Posted January 20, 2003 Posted January 20, 2003 i still doesnt work, even when i reference it. i guess i just gotta give up on DLLs :( Quote
*Experts* Nerseus Posted January 21, 2003 *Experts* Posted January 21, 2003 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 Quote "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 mutant Posted January 21, 2003 Posted January 21, 2003 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: Quote
*Experts* Nerseus Posted January 21, 2003 *Experts* Posted January 21, 2003 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 Quote "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
Recommended Posts