Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Custom DLL incorrect format error CS0009

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

    Custom DLL incorrect format error CS0009

    Hi,


    I am using NT 7.0.1000.37 and have written a custom DLL in Delphi XE7 (version 21.0.17017.3725). NT7 is 64 bit and the DLL generated is 64 bit.



    When compiling my indicator I get the error:


    Metadata file 'c:\Users\xxx\Documents\NinjaTrader 7\bin\Custom\DLLname.DLL' could not be opened -- 'An attempt was made to load a program with an incorrect format.' CS0009.


    There is no specific help for CS0009. Other custom DLL errors on the forum are not for Delphi.


    What needs to change about the format of my Delphi DLL to load and work with NT7?


    Thanks

    #2
    Hello AusTrader,

    An assembly written for a different platform may be dependent on other namespaces and classes that are not available.

    This would fall outside of what is supported by NinjaTrader Support, however this thread will remain open for any community members that are able to assist.

    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Which version of .NET did you target?

      Comment


        #4
        .NET 3.5. That is the correct version for NT7 isn't it?

        I'm currently working on writing a Visual Studio .NET 3.5 wrapper for the Delphi DLL. No success yet. But will post when I make progress or need help. Which ever comes first :-)

        Comment


          #5
          Msvcp1

          Your DLL may not be compatible with .NET or with .NET’s 32-bit mode. Ensure that your DLL is .NET compatible. After that check DLL file format is correct or incorrect. It is common errors occur mostly. You need to download msvcp140 file .I am pretty sure after install dll files your error message must disappear .

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by kevinenergy, 02-17-2023, 12:42 PM
          115 responses
          2,699 views
          1 like
          Last Post kevinenergy  
          Started by prdecast, Today, 06:07 AM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by Christopher_R, Today, 12:29 AM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by chartchart, 05-19-2021, 04:14 PM
          3 responses
          577 views
          1 like
          Last Post NinjaTrader_Gaby  
          Started by bsbisme, Yesterday, 02:08 PM
          1 response
          15 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X