Announcement

Collapse
No announcement yet.

Using an external DLL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using an external DLL

    Hi Everyone,

    I am trying to use an external DLL.

    I need to pass several parameters to it in the form of a string, and get a single return.

    The DLL is called ZSSGLOCK.DLL (it performs a security check)

    the declaration from the vendor for this DLL is

    function ShareGuardLock(LocksmithParameter: PChar): stdcall external 'ZSSGLOCK.dll';

    I do have a C++ example for this DLL and have attached here (that's assuming I can attach a file)

    any help would be appreciated.

    many thanks
    Attached Files

  • #2
    Hello tj.dale,

    Have you seen our reference material on DLL usage in EFS? Let me know if this helps.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Thanks for the reply Jason,

      I have seen all the material on the site.

      It does help, but not much. What I want is a real example of a DLL being used, that has both a call to the DLL passing data from EFS to the DLL, and a call receiving data or a return from the DLL, do you have such a thing?

      many thanks in advance

      TJ

      Comment


      • #4
        Hello TJ,

        I'm not well versed in DLL development, but I think the reference material has the example you're looking for.

        PHP Code:
        var = new DLL("d:/testdll/debug/testdll.dll"); 

        d.addFunction("test"DLL.DOUBLEDLL.CDECL"Testing123"DLL.INTDLL.STRINGDLL.FLOATDLL.DOUBLEDLL.BYTE); 

         

        function 
        preMain() { 

         var 
        d.call("test"123"testing 123"45654465); 

         
        debugPrint("v = " "\n"); 



         

        function 
        main() { 

         


        The var v = d.call(... statement is passing some information to the DLL. The DLL returns some result, which is stored in the variable, v.
        Jason K.
        Project Manager
        eSignal - an Interactive Data company

        EFS KnowledgeBase
        JavaScript for EFS Video Series
        EFS Beginner Tutorial Series
        EFS Glossary
        Custom EFS Development Policy

        New User Orientation

        Comment


        • #5
          TJ:

          I have example code for a Delphi DLL here (the DPR file) as well as a test DLL. In the actual code (the DPR file which is basically a text file) I also listed the EFS language that would be used to call the DLL. When you are working with a 3rd party DLL, it is sometimes a trial-and-error process until you get it right, but it should be doable.

          The sample DLL can be found here:

          http://share.esignal.com/groupconten...Ls&groupid=114

          Chris
          Last edited by ckryza; 06-29-2004, 04:01 PM.

          Comment

          Working...
          X