Support Board
Date/Time: Mon, 24 Feb 2025 04:26:45 +0000
Callback on unload DLL
View Count: 929
[2021-02-28 20:50:22] |
User819016 - Posts: 9 |
How can I detect when my DLL is unloaded? I am not seeing a study callback with LastCallToFunction set, and my DLL's DllMain() is not getting a DLL_PROCESS_DETACH/THREAD callback. I am seeing a message log that shows the DLL getting unloaded. Does "unload DLL" call FreeLibrary()? |
[2021-03-01 04:50:56] |
|
Does "unload DLL" call FreeLibrary()? Yes.What are you doing which is causing the DLL to be unloaded? Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2021-03-01 14:22:44] |
User819016 - Posts: 9 |
I am sending a UDP unload command as part of the Visual Studio build process Closing Sierra Chart does not generate a LastCallToFunction callback, but I do get a DllMain() DLL_PROCESS_DETACH Removing the study gives me both Unloading via UDP is not generating either callback and is preventing me from doing clean-up |
[2021-03-01 19:00:00] |
User819016 - Posts: 9 |
I created a simple test study and it is getting a detach callback. Apparently something in my DLL is preventing the process from detaching. If it doesn't already exist, it would be useful (to me) if Sierra Chart added some sort of dispose callback on study removal, DLL unload, and app close. |
[2021-03-01 21:35:14] |
|
I am sending a UDP unload command as part of the Visual Studio build process This will not cause LastCallToFunction to be called.Only removing the study or closing the Chartbook will. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: