EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  2025  2026  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  2025  2026 
<== Date ==> <== Thread ==>

Subject: Re: Clean up library upon ioc exit
From: Ralph Lange via Tech-talk <[email protected]>
To: EPICS Tech Talk <[email protected]>
Date: Sat, 21 Nov 2020 18:38:05 +0100
Try epicsAtExit() and friends.

Cheers,
~Ralph


On Sat, 21 Nov 2020 at 17:58, Laurenz Rettig via Tech-talk <[email protected]> wrote:
Hi,

I am trying to build a model 3 motor driver for a manipulator, that is
interfaced by a vendor-DLL on windows. I can load the the DLL within the
motor driver class library, however this library needs to be explicitly
unloaded (using FreeLibrary) before exiting the program, otherwise it
crashes on exit. Therefore, I am looking for a way to invoke this unload
function upon exit of the ioc, i.e. when "exit" is called in the ioc or
it is stopped otherwhise. I tried building a destructor for my motor
driver class, but this does not ever seem to be invoked. Is there any
proper way of doing this?

Best regards,

Laurenz

--
Dr. Laurenz Rettig
Fritz Haber Institute of the Max Planck Society
Department of Physical Chemistry
Dynamics of Correlated Materials
Faradayweg 4-6
14195 Berlin, Germany

phone: +49-(0)30-8413 5225
email: [email protected]



References:
Clean up library upon ioc exit Laurenz Rettig via Tech-talk

Navigate by Date:
Prev: Clean up library upon ioc exit Laurenz Rettig via Tech-talk
Next: New Focus Motor support John Dobbins via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  2025  2026 
Navigate by Thread:
Prev: Clean up library upon ioc exit Laurenz Rettig via Tech-talk
Next: New Focus Motor support John Dobbins via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  2025  2026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·