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

how to manage 3rd party DLL and enum reference in exported ninjascript

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

    how to manage 3rd party DLL and enum reference in exported ninjascript

    I have a 3rd-party C++ DLL that exposes numerous methods that take an enum value as a parameter. This DLL also defines those enums.



    The ninjascript incorporates the 'using XXXX' in the header and thus is able to use the enum defined in the 3rd party DLL. There are parameter values to the indicator that use the enum so in keeping with the 3rd party type definitions.

    When i export the indicator as a protected assembly (ie not the source) when the client tries to import the ZIP file numerous error messages are in the trace file stating that 'the type or namespace name 'xxxx' could not be found (are you missing a using directive or an assembly reference).

    When i look at the ZIP file with the created xxx.dll files and the .cs wrapper it is noted in the wrapper the 'using xxx' i defined in the indicator header section is dropped and thus the wrapper code which makes reference to the 3rd party DLL enum doesnt know about the enum type.

    Can you advise on how to manage this situation in delivering this code as a dll to the client. The client does have the 3rd party DLL and assembly loaded and is confirmed in the ninjascript editor and right clicking on the references .. so the 3rd party reference is indeed present.

    any insight greatly appreciated

    thank you

    #2
    Hello soulfx,

    Thank you for your post.

    I will follow up with you in e-mail.

    Comment


      #3
      Can anyone who has insight to the original post please disregard the ninja post - this is something else that is being dealt with seperately. Any insight appreciated

      thanks

      Comment


        #4
        Update to this even though no responses were submitted ;
        After a call with Ninja it was determined ( as i sensed but needed confirmation )
        The export assembly process within NT7 has a limitation for this type of export and creating a DLL based on a 3rd party DLL with the protected assembly process.

        The recommended route to handle this is apparently effected by many of the 3rd party ninja partner/vendors is to use something like Visual Studio to manage the build process.

        This i am now investigating : any tips on use of this and to keep simple ie build a DLL from ninja code environment and using a 3rd party DLL to create a DLL with a wrapper .cs file for client to import in the ZIP import process : would be appreciated

        thanks

        Comment


          #5
          Do you have any issue to call a DLL which also have other dependencies? It seems like NT cannot find other dependencies for the target DLL.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by algospoke, Today, 06:40 PM
          0 responses
          10 views
          0 likes
          Last Post algospoke  
          Started by maybeimnotrader, Today, 05:46 PM
          0 responses
          7 views
          0 likes
          Last Post maybeimnotrader  
          Started by quantismo, Today, 05:13 PM
          0 responses
          7 views
          0 likes
          Last Post quantismo  
          Started by AttiM, 02-14-2024, 05:20 PM
          8 responses
          168 views
          0 likes
          Last Post jeronymite  
          Started by cre8able, Today, 04:22 PM
          0 responses
          10 views
          0 likes
          Last Post cre8able  
          Working...
          X