For DataFlex 20.0 we pretty much rewrote external function. Mainly because the original implementation could not be ported to 64-bit, was also hard to maintain and had its issues (bigints didn't work for example). We are now using a library called libffi to actually make the call. This library is linked into the runtime and the runtime pretty much prepares the parameters, as it did before, and now passes it on to this library which does the rest. To be honest, I am not sure of the exact details regarding which calling conventions it supports and if / how it performs auto detection, but we have done some limited testing with CDECL and it did appear to work.