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

Ignoring .dll since it was not recognized as a .NET assembly

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

    Ignoring .dll since it was not recognized as a .NET assembly

    I'm just starting to play with NinjaScript. So excuse my ignorance.

    I'm planning on using an external unmanaged DLL file. When I try to use it, I get an error in my trace file, saying:

    2009-12-14 17:42:34:328 WARNING: Ignoring 'C:\Documents and Settings\Paul\My Documents\NinjaTrader 6.5\bin\Custom\PivotsDLL.dll' since it was not recognized as .NET assembly.

    And then later in the trace file it says:

    2009-12-14 17:44:01:906 ERROR: Failed to call method 'Initialize' for indicator 'CustomLinesIndicator': Unable to load DLL 'PivotsDLL.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

    The DLL file is actually there, obviously, since it says it is not a .NET assembly. So, it looks like there is some amount of work to do to use an unmanged DLL.

    I notice that some of the third-party indicators I have, they include two DLL's, it looks like one is managed, one un-managed. So, I'm guessing (perhaps) that to use unmanaged DLL's, you need a managed DLL go-between?

    #2
    Unfortunately we do not provide support for accessing unmanaged DLLs. As a last resort you may consider contacting a certified NinjaScript consultant.

    Comment


      #3
      Originally posted by NinjaTrader_Dierk View Post
      Unfortunately we do not provide support for accessing unmanaged DLLs. As a last resort you may consider contacting a certified NinjaScript consultant.
      Okay, well, maybe another user might chime in. Thanks.

      Comment


        #4
        Maybe you had your solution, and it could be better to post it here if you found it. I'm posting what I know. But maybe you can post the correct solution sometime (I will be using an unmanaged DLL myself in the near future)

        I'm new to Ninja Trader, but I've used one unmanaged DLL in a past project.

        You have to use DllImport above the definition of your method:

        [DllImport("mycustom.dll")]
        public extern static int myCustomMethod(parameters list);

        Google it...

        Maybe we have to set the Path or something like that, so Ninja Trader could access the DLL file.

        From another post here in this forum I've found we have to pun the DLL file in bin\custom\, where NinjaTraderVendor.dll and NinjaTraderCustom.dll exist.

        In my installation, these 2 DLL's are in bin\Custom\Backup... So you have to experiment a little.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ursavent, Today, 12:54 PM
        0 responses
        1 view
        0 likes
        Last Post ursavent  
        Started by Mizzouman1, Today, 07:35 AM
        3 responses
        17 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by RubenCazorla, Today, 09:07 AM
        2 responses
        13 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by i019945nj, 12-14-2023, 06:41 AM
        7 responses
        82 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by timmbbo, 07-05-2023, 10:21 PM
        4 responses
        158 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X