Login Page - Create Account

Support Board


Date/Time: Sat, 30 Nov 2024 04:36:02 +0000



[Programming Help] - Run code when DLLs are released?

View Count: 370

[2022-12-17 20:13:09]
ycomp - Posts: 321
Hello, I would like to run some code when the dlls get released, if you tell sierra to release the dlls.

I tried DllMain but that didn't work for me.

Do you have any sugggestions?

I need to stop a thread of mine from running.

sc.LastCallToFunction() will execute when I close a chartbook, so that's good.. but I'm often testing and need to stop the dlls.
[2022-12-17 21:15:27]
User431178 - Posts: 545
sc.LastCallToFunction is also true when dlls are released.
[2022-12-17 23:43:54]
ycomp - Posts: 321
are you 100% sure about that? because I had a breakpoint set and it only activated when I closed the chartbook, not when I had the chartbook still open and I disabled dlls.. I tested both of those ways on "fresh" instances but also what version do you use? I'm only on 2400.

now my code is a bit involved so there is a chance that I'm wrong about this. I'll have to test it further tomorrow. But that is good to hear that it should work. I was going to make a workaround like have a heartbeat that if it wasn't received would exit the thread.
[2022-12-18 08:29:55]
ycomp - Posts: 321
yes you are right, thanks! I guess something else is going on here

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account