by Aaron » Sun Nov 18, 2007 3:40 am
Hi Carl,
zeofunc_Execute was replaced by zeofunc_Execute2 for Zeolite v2.3, back in March. The reason for the change was that zeofunc_Execute was not thread-safe. The second version requires the user to supply the variable to contain the return value, which is threadsafe, whereas the first version used a shared, internal variable to store the return value, and returned a handle to that. If that function was called simultaneously in two threads, one may incorrectly pick up the return value of the other. Basically, zeofunc_Execute was a mistake, and could not be fixed without changing the prototype (thus zeofunc_Execute2).
The down-side to zeofunc_Execute2 is that users must now manually create and initialise the return value variable before passing it to the function. If this is a problem, I suggest having a look at the CzFunc helper class. It makes using zeofuncs much easier, and I always use it in preference to the CExtAPI::zeofunc_ functions.
By the way, older plugins that used zeofunc_Execute will still work, because zeofunc_Execute is still available in L3DT for plugins that ask for it (i.e. those compiled before Zeolite v2.3.) If this function is still required, you can un-comment the relevant code from the CExtAPI header and source files. However, this is not recommended as a long-term solution.
Best regards,
Aaron.