On Wed, Aug 11, 2010 at 2:47 PM, Mark Miesfeld <miesf...@gmail.com> wrote:
> In the normal processing of
> RegistrationTable::registerLibraryCallback(), which is what
> RexxRegisterFunctionDll maps to, there are only 2 message results
> possible:
>
> DUPLICATE_REGISTRATION
>
> and
>
> REGISTRATION_COMPLETED
>
> but, in LocalRegistrationManager::mapReturnResult(), the switch
> doesn't check for DUPLICATE_REGISTRATION so the return is always
> mapped to RXSUBCOM_OK

Yes, that was intentional.  The net result is the same, the function
is registered.  The non-zero registration result always caused
confusion in the past.

>
> Is that intentional, or not?  I could see returning OK, if the
> function was already registered.  The end result is that the function
> is registered.  Just curious.
>
> ----------------
>
> Related to this, but a separate question.  In tracing the code, it
> looks like this always succeeds.  (Unless there is an exception thrown
> for a memory error.)  There is no check that the DLL name even exists.
>
> Since, as I understand it, that was the behavior of
> RexxRegisterFunctionDll() prior to 4.0, that makes sense.  But, I
> thought for 4.0 and on we were going to check that external functions
> were really loaded.

The check for the loading is done in the code that implements
RxFuncAdd (in {PackageManager::resolveRoutine()).  The validation of
the loading only makes sense in the local interpreter environment, not
in the global environment, and this is reflected in the return value
from RxFuncAdd().

Rick

>
> Does RegistrationTable::registerLibraryCallback() just never get
> invoked except for RexxRegisterFunctionDll()?  Or ... ?
>
> Of course I may have traced the code wrong, but I didn't think I did.
>
> --
> Mark Miesfeld
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to