Hi Ben,
On 09/18/2014 04:23 AM, Benjamin Franksen wrote:
> This comment is in shareLib.h (base 3.14.12.2):
>
> * epicsShareAPI is deprecated for new routines, don't use it!
> * In a future major release (R3.15) we will remove this keyword
> * from most EPICS APIs, although CA may continue to use it.
> * This is a major release though, since it affects the order
> * that arguments are pushed onto the stack on Windows and we
> * don't want a replacement DLL to silent cause mayhem...
>
> This leaves me guessing what support modules should do if they are
> supposed to run with 3.14 and 3.15: use epicsShareAPI or not? In the
> sequencer I have removed them for version 2.2 and I wonder now if that
> could cause problems..,
>
> Looking at the current 3.15 sources I see header files where it is still
> present. What's the status?
The epicsShareAPI was needed to allow some Windows older code such as
Visual Basic to call routines in libCom and libCa; on Windows compilers
it expands out to __stdcall
http://en.wikipedia.org/wiki/X86_calling_conventions
Note that __stdcall does not permit varargs to be used because the code
being called is responsible for removing arguments from the stack,
whereas in the __cdecl convention the caller does that.
For code that does not implement a public API there is no reason to use
epicsShareAPI. The only time when it might be worth considering is when
you are creating an API that might be used on Windows by languages that
only support the __stdcall convention. I have removed epicsShareAPI from
many of the internal APIs inside the IOC.
I don't intend to remove the keyword, so whether you use it is up to
you; the declarations in cadef.h and some of the libCom headers will
probably continue to use it for the foreseeable future.
HTH,
- Andrew
- Replies:
- Re: Status of epicsShareAPI Benjamin Franksen
- References:
- Status of epicsShareAPI Benjamin Franksen
- Navigate by Date:
- Prev:
Status of epicsShareAPI Benjamin Franksen
- Next:
Re: Status of epicsShareAPI Benjamin Franksen
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Status of epicsShareAPI Benjamin Franksen
- Next:
Re: Status of epicsShareAPI Benjamin Franksen
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|