From: SourceForge.net <no...@so...> - 2010-02-23 15:28:16
|
Bugs item #2894336, was opened at 2009-11-08 20:28 Message generated for change (Comment added) made by bigrixx You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684730&aid=2894336&group_id=119701 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: External Functions >Group: v4.0.1 Status: Pending Resolution: Fixed Priority: 5 Private: No Submitted By: Jeremy C B Nicoll (jeremynicoll) Assigned to: Rick McGuire (bigrixx) Summary: possible bug in rxfuncdrop() Initial Comment: ooRexx 4.0.0, Win XP Pro SP3 on x86 I experimented trying to get a non-rexx routine in a DLL to work from rexx. This failed, with rexx dumping. Once I was told that only rexx functions in DLLs could be rxfuncadd()-ed etc I was happy about that. (This is described in comp.lang.rexx thread "Problems with a DLL in ooRexx 4.0.0 under Windows XP" started on 2nd Nov 2009.) However in my experiments I was a little unsure of the significance of the different parameters to rxfuncadd(). So after having made my rxfuncadd() call, I tested various putative function names via rxfuncquery(), expecting only one of them to work. That was what happened. I then issued rxfuncdrop() to get rid of my external function definition (in fact I did so for all my 'test' function names). All of these calls returned the same return code, which seemed odd to me as I expected only the one that corresponded to the successful definition to be droppable. So I issued more rxfuncquery() calls, and they showed the same results as before the rxfuncdrop() calls. Although the 'external function' I was trying to define was not a rexx one, it seems to me that even if the add only worked in the sense that a function name & the address of its definition got added to a lookup table, surely the drop should have been able to discard that info? The code I used and its output were as follows: md5dllnm = "MDFile" /* function name as defined inside DLL */ md5dllrx = "rxMD5" /* name I'll use for it in this rexx exec */ md5dllpt = "C:\Program Files\~A-folder\AutoPatcher\bin\aamd532.dll" findadll = rxfuncadd(md5dllrx,md5dllpt,md5dllnm) say "funcadd rc="findadll "(0=ok, 1=err)" That shows a rc of 0 each time I run it, so I suppose it worked. I then tried querying 4 function names, three of which I expected the exec not to be able to find. In particular I was trying to show that the function name that rexx would now recognise was the 'rx' one rather than the 'nm' value: q.1 = "rxwibble" q.2 = md5dllrx /* hopefully this one will work */ q.3 = md5dllnm q.4 = "rxwobble" q.0 = 4 do qq = 1 to q.0 qqthname = q.qq queryfnm = rxfuncquery(qqthname) say " rxfuncquery for name:" right(qqthname,12) "was:" queryfnm end which produces: rxfuncquery for name: rxwibble was: 1 rxfuncquery for name: rxMD5 was: 0 rxfuncquery for name: MDFile was: 1 rxfuncquery for name: rxwobble was: 1 which I think means I have managed ok to define "rxMD5" as a function as far as rexx is concerned. Learning one step at a time, I thought I'd next try to drop the four functions (or at least one function and three irrelevant names), in which I expected to get one success and three failures, but that didn't happen, so I followed this by 4 more queries to see if the drops had done anything: do qq = 1 to q.0 qqthname = q.qq dropfunc = rxfuncdrop(qqthname) say " rxfuncdrop for name:" right(qqthname,12) "was:" dropfunc end say do qq = 1 to q.0 qqthname = q.qq queryfnm = rxfuncquery(qqthname) say " rxfuncquery for name:" right(qqthname,12) "was:" queryfnm end say which produces: rxfuncdrop for name: rxwibble was: 1 rxfuncdrop for name: rxMD5 was: 1 rxfuncdrop for name: MDFile was: 1 rxfuncdrop for name: rxwobble was: 1 rxfuncquery for name: rxwibble was: 1 rxfuncquery for name: rxMD5 was: 0 rxfuncquery for name: MDFile was: 1 rxfuncquery for name: rxwobble was: 1 Does this mean that none of the rxfuncdrop calls worked? ---------------------------------------------------------------------- >Comment By: Rick McGuire (bigrixx) Date: 2010-02-23 10:28 Message: Committed revision 5601. 4.0.1 merge ---------------------------------------------------------------------- Comment By: Rick McGuire (bigrixx) Date: 2009-11-13 13:59 Message: Committed revision 5320. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684730&aid=2894336&group_id=119701 |