CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Calling error

  1. #1
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Calling error

    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
    [email protected]

    The best way to escape a problem, is to solve it.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Calling error

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured