From: Keith L. <new...@kl...> - 2007-10-24 14:02:44
|
I have successfully implemented RXINI, RXTER, RXSIO and the are working without problems. I am now attempting to implement External Function Call exit (RXFNC). I have a simple script that registers a function in a DLL (written in Delphi Pascal and containing a simple user input form) and invokes it. Before registering the function it checks to see if it is already registered and deletes it if it is. This all works perfectly, until I try to trap the function call, then if fails during the RXFUNCQUERY call. According to the Delphi IDE debugger, I never get to my code exit handler code, so I assume it is failing while preparing to call my handler. I cannot see any difference between the signatures of the new RXFNC handler and the existing ones that work perfectly. Does anybody have any hints about where I should be looking? Thanks in advance Keith ---------------------------- Here are the error messages: 4 *-* if rxfuncquery('DelphiNewContact') = 0 Error 48 running Command In Storage line 4: Failure in system service Error 48.1: Failure in system service: STD_FNC ---------------------------- Here is the exit handler function signature (in Pascal of course :-) ). It is identical to the working exit handlers except for name. Function exit_RXFNC( ExitNumber : long; ///exit function code SubFunction : long; ///exit subfunction code ParmBlock : pExit ///function control block ): LONG; stdcall; --------------------- Here is the Rexx script I am using for the test: /**************************/ /* trace intermediates */ if rxfuncquery('DelphiNewContact') = 0 then rc = rxfuncdrop('DelphiNewContact') rc = rxfuncadd('DelphiNewContact', 'S:\Delphi Projects\Project OORexx\demos\bin\REXXFORM.DLL', 'DelphiNewContact') if rc = 0 then say 'DelphiNewContact Loaded' else say 'DelphiNewContact NOT Loaded' if rxfuncquery('DelphiEditContact') = 0 then rc = rxfuncdrop('DelphiEditContact') rc = rxfuncadd('DelphiEditContact', 'S:\Delphi Projects\Project OORexx\demos\bin\REXXFORM.DLL', 'DelphiEditContact') if rc = 0 then say 'DelphiEditContact Loaded' else say 'DelphiEditContact Already Loaded' me.fullname = 'fullname' me.number = 'number' me.street = 'street' me.city = 'city' me.state = 'state' me.postcode = 'postcode' me.country = 'country' RC = DelphiEditContact('me'); say 'Return from Delphi = ' rc say 'Fullname' me.fullname say ' Number' me.number say ' Street' me.street say ' City' me.city say ' State' me.state say 'PostCode' me.postcode say ' Country' me.country |