Results 1 to 3 of 3

Thread: ActiveXDLL

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 1999
    Location
    Ireland
    Posts
    8

    Post

    I've created a function. I want to create the DLL so it can be called within another project at run-time. It's an ActiveX DLL in VB5 SP3.

    Private Declare Function DisplayText Lib "c:\ProjGerry.dll" (ByVal r As String) As Boolean

    r = DisplayText("gerry")

    It's just a small thing to display text. I'm just trying to get it to work.

    Now, the functin is inside a Class object. The object is set to GlobalMultiUse. So the object should be created automatically. So I can just reference function like normal.

    Can someone help please!
    I get this error. Seems common, but doesn't really answer my problem..


    Run-time Error '453'
    Can't find DLL entry point DisplayText in c:\ProjGerry.dll.

    Help!!

    Thanks,
    Gerry

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Post

    You don't use the Declare statement with ActiveX DLL files. You have to set a reference to your DLL (click references on the project menu and check your file).

    It's true that a Global Multi Use object is created by itself but you still have to use the object to call the function:

    YourObjectName.DisplayText("Gerry")

    Just as you would with other Global Multi Use objects like Screen, Printer, Clipboard, App and so on.

    Good luck!

    ------------------
    Joacim Andersson
    [email protected]
    [email protected]
    www.YellowBlazer.com



  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 1999
    Location
    Ireland
    Posts
    8

    Post

    I understand.
    I had :
    dim r as new myobject
    r.displaytext("Gerry").

    What type of prject in VB can I write to include it as a DECLARE. It needs to be called @ run-time.

    Question. If I have it as a reference. I then update the dll. How does this affect Binary Compatibility. Versioning, etc....

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