PDA

View Full Version : How can I load/unload external dll not exiting NT every time?


maxima
05-11-2008, 12:18 PM
Hi I have custom dll which is referenced in NT strategy script.

I found that the dll is being loaded by NT when it starts and it seems it locks it until the exit.

Therefore to test every change I have to exit NT, recompile in VS, start NT, connect to data, run strategy...

Quite boring and time-consuming nonsence.

Can you guys please do something that external dll bound/unbound on start/stop strategy which uses it.

In case with custom indicator you can reload the change by F5.

You have to provide something similar to users of custom dlls.

NinjaTrader_Ray
05-11-2008, 04:29 PM
I will forward this to development for consideration.

mktrend
01-09-2009, 02:55 PM
I second Maxima's suggestion, it causes huge loss of productivity.
I wish that this aspect to be addressed ASAP.

thanks, (no replies needed, was just bump..)

junkone
01-18-2009, 03:31 AM
i second the idea. i believe that NT loads all the dependenet dlls on startup rather than strategy startup.

NinjaTrader_Ben
01-18-2009, 11:41 AM
Hello,

Thank you for your suggestion. I will send it to our development department for consideration.

NinjaTrader_Dierk
01-19-2009, 08:06 AM
This is a .NET limitation: You can't unload assmebleis at runtime unless they would be located in a different AppDomain which would not work for NT, since there would be severe performance impact.

mrlogik
01-19-2009, 08:40 AM
That's right.

You cannot unload only 1 assembly (dll) file. You have to unload all assemblies, meaning all assemblies NT uses, which would be a killer in performance.

I have read things about external assembly loader / stub.exe? Anyone have any idea on this, or if it could even work with NT?

NinjaTrader_Dierk
01-19-2009, 08:43 AM
AFAIK, you can't even unload "all" assemblies (not talking about native code DLLs here!) without restarting the hosting .exe.