> I've been thinking about this and ran the same test under 3.2.0. The > RexxStart() return code itself was always 0, except for when a a > condition is raised. In which case it is the negated condition code. > > If someone has a compiled binary that takes some action if the return > is not 0, then that is now broke. Something like: > > return_code = RexxStart(,,,); > if ( return_code > 0 ) > { > // Some serious problem, abort. > return errorHandler(...); > }
fwiw ... the code I have tests for returncode < 0, not > 0... (see typical code below). The doc says: A.3.3.2. Return Codes The possible RexxStart return codes are: negative Interpreter errors. See the Appendix in the Open Object Rexx: Reference for the list of Rexx errors. 0 No errors occurred. The Rexx procedure ran normally. positive A system return code that indicates problems finding or loading the interpreter. See the return codes for the Windows functions LoadLibrary and GetProcAddress for details. I don't check for positive because I load the DLL explicitly with GetProcAddress earlier. Mike // printf("Rexx starting...\n"); rc=RexxStart((LONG) args, (PRXSTRING) rxarg, (PSZ) filtername, (PRXSTRING) cacheptr, /* -> instore/macrospace pointers */ (PSZ) SUBCOMNAME, (LONG) RXSUBROUTINE, (PRXSYSEXIT) exitlist, (PSHORT) &rexxrc, (PRXSTRING) &rexxretval); if (rc<0) return rc; /* Error: caller will handle */ // printf("Postcall -- instore[1] ptr: %08x\n", instore[1].strptr); /* rc>=0 */ if (rexxretval.strptr==NULL) retval[0]='\0';/* null return */ else { /* got a result */ len=rexxretval.strlength; /* some return */ if (len>MAXCOMM) len=MAXCOMM; /* truncate */ memmove(retval, rexxretval.strptr, len); /* copy the data */ retval[len]='\0'; /* terminate */ RexxFreeMemory(rexxretval.strptr); /* drop the result */ } /* got result string */ Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
------------------------------------------------------------------------------
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel