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 <2020> 2021 2022 2023 2024 | 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 <2020> 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: BASE 7.0.x@Windows_64 - Channel Access Context in shared library - "ca_context_destroy bug" |
From: | Freddie Akeroyd - UKRI STFC via Tech-talk <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 19 May 2020 17:18:10 +0000 |
Hi Carsten, I was just wondering if you had tried Michael’s suggestion of linking to ca.dll as you usually do, but adding a call to GetModuleHandleEx() with GET_MODULE_HANDLE_EX_FLAG_PIN to force it to ignore unloads of ca.dll? If that didn’t work, then it may be due to the way normal linking works. There is, however,
an option to do delayed dll loading on the linker line This embeds a LoadLibrary / GetProcAddress sequence into the executable/dll to load the specified DLL only when the first function in it is called. As it is effectively mirroring the
mechanism you had to implement by hand, I would hope combining this with use of GET_MODULE_HANDLE_EX_FLAG_PIN to ignore any FreeLibrary() calls that might occur from the main program would be equally successful. If that still doesn’t work, there look to
be ways to modify the DLL helper function involved too. Regards, Freddie From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Carsten Winkler via Tech-talk Hi there, the dirty workaround looks like that:
In my test case this workaround works well. But it is a huge effort to redefine all the structures and functions from the EPICS Base. It would be great, if we could use caLib and ComLib in a better way. Next few days I'll be on vacation. Am 19.05.20 um 11:40 schrieb Heesterman, Peter J:
This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. Opinions, conclusions or other information in this message and attachments that are not related directly to UKRI business are solely those of the author and do not represent the views of UKRI. |