Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DLL call issues

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

    DLL call issues

    Hello,

    I am working with a desk manager who has an external
    software compatable with NT.
    I am trying to use the Runtime.dll from the software
    folder in the NinjaTrader 7. However I am unsuccessful.
    My system is a 64bit Windows machine with .Net Frameworks 4.5 and
    4.6 installed.
    When trying the VB example from the programming examples folder, the
    program works fine. Similarly, if I try to use it in Visual Studio
    .Net in a C# project where I add the dll as a reference, everything
    works fine: I can instantiate a Runtime.DLL object.
    What I do, is I take the Interop.Runtime.dll generated
    in the Visual Studio when the Runtime.dll is added to the
    references, and place it in Documents/NT7/bin/Custom.
    Then, in NT 7 (32b) I add the reference in an Indicator and then I
    simply create and instantiate the Runtime.DLL. NT compiles
    the indicator fine but at runtime I get this error:
    : Could not load file or assembly 'Interop.Runtime,
    Version=1.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its
    dependencies. The system cannot find the file specified.
    I believe is something with the way Visual Studio converts the
    Assembly COM DLL to an Interop DLL but I can't seem to figure what it
    is. Can you help me with this issue ?

    or........

    Should I attempt a different method for this in NT8 ?

    Kind regards

    Ari

    #2
    Hello Ariseigle,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    As long as the file is in the bin/custom folder under Documents\NinjaTrader 7 (NinjaTrader 8 folder for NinjaTrader 8) and you have added the references and are stating using myDLL; in your code it should work.

    NinjaTrader 7 would not support a .NET 4.5 .dll and would need 3.5. Try creating the .dll as 3.5.

    Please let me know if you have any questions.

    Comment


      #3
      The original Dll is a COM Dll and we observed that it cannot be used directly in NT7 or NT8. If we place it at the right folder and add the reference NT7/8 can't compile. So what we did, we used the converted Dll into the InterOp Dll from the .Net project. That one compiles but NT7/8 complains with the original error at the runtime

      Comment


        #4
        Hello Ariseigle,

        Thank you for your response.

        I am actually not sure on that as I have never tried to work with libraries in that fashion. I will check with development. Anyone else that has attempted this is free to respond here as well.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        571 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        549 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        549 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X