Click to See Complete Forum and Search --> : Calling error


Cakkie
February 7th, 2000, 11:53 PM
I created a DLL from a VB class. When I declare a function of the dll and use it, I get this message like : "DLL entry point getFile not found in DLL 'd:\myDLL.dll'".

I declared the function this way:

Declare function getFile Lib "d:\myDLL.dll" (byval package as string, byval fileTitle as string, byval returnPath as string) as string



I call it like this:

retval = getFile(strPackage,strTitle,strRetPath)



I compiled the DLL in VB from a class object, startup object (none) (no sub main)
What am I doing wrong, or have I created it the wrong way?

Tom Cannaerts
slisse@planetinternet.be

The best way to escape a problem, is to solve it.

Lothar Haensler
February 8th, 2000, 01:33 AM
if you created your DLL in VB, it is not a DLL that can be called via Declare statements. It's rather an ActiveX DLL. You need to add a reference to your dll in VB via project/References and call it "the COM way":
instantiate an object and call its methods