Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2005
    Posts
    187

    VB Net DLL Problem

    Hi Everyone,

    I'm having a problem with a simple DLL I wrote, and I'm hoping someone could point me in the right direction...

    When I call the DLL from AMS, I receive a 2401 error - "Failed to find the specified function within the DLL."
    Code:
    sReturn = DLL.CallFunction("Autoplay\\Docs\\Test.dll", "Number", "", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    In troubleshooting, I've made the logic as simple as possible, but still receive the error. I'm thinking its because VB .Net requires functions to be inside a class and AMS can't see that. Any thoughts?

    DLL Source:
    Code:
    Public Class Class1
        Public Function Number() As Integer
            Dim i As Integer
            i = 9
            Return i
        End Function
    End Class

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    I'm not up on .Net stuff at all. I can say that the languages I've used to make DLLs required me to use an EXPORT AS or ProcedureDLL for my functions. Maybe that'll give you something to Google on.

  3. #3
    Join Date
    Mar 2005
    Posts
    187
    Thanks Worm, I'll look into it and report back!

  4. #4
    Join Date
    Oct 2005
    Posts
    572

    if you wont send all the files and i check them

    the vb files and the ams6 files
    in the text i dont see a problem.
    you check in vb6 or only in .net?

  5. #5
    Join Date
    Jan 2000
    Posts
    2,002
    I am not sure about how .NET DLLs export their functions, but I would be pretty surprised if they work. I think that .NET DLLs may export a Typelib file which means it may be COM callable. You could look at using LuaCOM with it.

    The other problem with VB.NET DLLs is that they require the .NET runtime to be installed in order to work.

    Personally, I would consider using a C/C++ DLL if possible.

  6. #6
    Join Date
    Mar 2005
    Posts
    187
    Thanks guys,

    Yeah VB .NET creates COM or ActiveX dlls, not standard dlls. I'm looking to see if there's a way to export functions, but it doesn't look like it'll be AMS compatible.

    Looks like its time to start learning some C/C++...

    Thanks!

  7. #7
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Thanks for the headsup with .NET and its version of DLLs.

    (yucky!)
    Intrigued

  8. #8
    Join Date
    Jan 2000
    Posts
    2,002
    Or, if you prefer the Basic language, look at PowerBasic and RealBasic. I think some of the folks on the forums here have used them to make native DLLs that are callable from AMS.

  9. #9
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    I've used PowerBasic and PureBasic to create the DLLs I've posted. PowerBasic is nice, but its pricey. I'd suggest PureBasic. The cost is relatively low, and the freatures are many.

    I have RealBasic too, but it won't compile to a DLL.

Similar Threads

  1. VB dll
    By Eliminator in forum AutoPlay Media Studio 6.0
    Replies: 2
    Last Post: 05-25-2006, 04:12 PM
  2. dll function problem (please)
    By gustavoAUDACES in forum Setup Factory 7.0
    Replies: 10
    Last Post: 05-04-2006, 08:18 AM
  3. Register ActiveX Dll problem
    By GregSS in forum Setup Factory 7.0
    Replies: 2
    Last Post: 06-07-2005, 10:42 AM
  4. My first VB DLL for AMS, or what am I doing wrong?
    By itamar in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 07-25-2004, 01:56 PM
  5. Calling DLL problem
    By Willis in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 05-11-2004, 03:57 PM

Posting Permissions

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