Announcement

Collapse
No announcement yet.

Visual Basic DLL Integration

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

  • Visual Basic DLL Integration

    I am not sure if this is the correct section to post this question, but I am interested in using Visual Basic version 6 to create a DLL for use with eSignal.

    Can anyone post a description of how to create a basic DLL in VB, such as moving average and an example of how to link the DLL in an efs study.


    Thanks


    Pawnbroker

  • #2
    I, unfortunately, don't have enough knowledge yet in VB to help with this. Since this doesn't relate directly to our ActiveX product, I'm going to move the thread over to the EFS Studies forum in hopes more eyes can see it.
    Regards,
    Jay F.
    Product Manager
    _____________________________________
    Have a suggestion to improve our products?
    Click Support --> Request a Feature in eSignal 11

    Comment


    • #3
      Hello Pawnbroker,

      You can find some info on using DLLs within EFS in our EFS Help Center & Library. See DLL Functions in the EFS Function Reference Folder.
      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


      • #4
        Jason,

        Thanks for the reply.

        eSignal is the only application I know that requires the user to know the manner in which the functions are created in the DLL.

        The help file states

        If your C/C++ function uses the __cdecl keyword, use DLL.CDECL
        If your C/C++ function uses the __stdcall keyword, use DLL.STDCALL


        With VB, I can create a DLL and the type of the paramaters will be known, e.g. INT, Float and so on, but VB does not state if the functions are exported as CDECL or STDCALL (it is not normal to need to know this when DLL's are used in VB).

        So, should I use DLL.CDECL or DLL.STDCALL. If I don't know, is it safe to try both to see which one works?


        If you know the answer - please let me know.


        Pawnbroker

        Comment


        • #5
          If it helps, I have found a couple of articles on a google search, but the content is over my head.

          http://www.codeguru.com/forum/showth...hreadid=249006


          http://www.fullspectrum.com/deeth/pr...ing/vbdll.html


          http://www.constantthought.com/yabbs...ay;threadid=34


          Pawnbroker


          P.S. I could always did out a book on C++ and use a free compiler, see the echo.c example in http://www.csharphelp.com/archives2/archive402.html. However, I know VB and it is easy to use and to debug!

          Comment


          • #6
            I'm not sure what VB generates. It does not appear that we have any VB programmers in house. I would suggest trying both and seeing what you get. One or the other will just reverse the order of variables that get passed to your function, so write a dummy function that outputs the values of the variables to see which one echos the correct order.

            Comment


            • #7
              I'm not 100% sure but I don't think eSignal will accept VB ActiveX DLL's (same goes for TradeStation's EasyLanguage). These are not the same as C++ DLL's which typically look like:

              #include "stdafx.h"

              BOOL APIENTRY DllMain( HANDLE hModule,
              DWORD ul_reason_for_call,
              LPVOID lpReserved )
              {
              return TRUE;
              }

              int __stdcall myFunction( PCSTR sPath, PCSTR sData )
              {

              //C++ code

              return myValue;

              }
              Paul Williams
              Strategy & Applications
              www.futurenets.co.uk

              Comment


              • #8
                Paul,

                Thank you for the pointer to C++.


                Ny the way, I downloaded your Market Profile efs script from the free downloads section of your site today. The script will be very useful.


                Thanks Again


                Pawnbroker

                Comment


                • #9
                  Hello pawnbroker,

                  Last I heard the dlls from VB were not "full strength" dlls, meaning that they could be called from another program created with VB but usually could not be called from programs created with other languages.

                  I'm sure this will change at some point, but until then ...

                  There is another product, PowerBasic, that I use for dlls. I've just solved a problem related to making sounds from eSignal under WXP using one. PB is turning out to be a pretty good product. It is like VB in some ways and like C++ in others. Easier to use than C, but not as easy as VB. More powerful than VB and, as far as I can tell at this point, just as powerful as C.

                  A fairly decent cross-breed, all in all. And it makes small, fast code that PB claims is generally smaller and faster than most other compilers. It certainly LOOKS small and fast.

                  Regards,
                  LB

                  Comment

                  Working...
                  X