From: SourceForge.net <no...@so...> - 2006-09-17 20:13:39
|
Bugs item #1149952, was opened at 2005-02-23 10:03 Message generated for change (Comment added) made by miesfeld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684730&aid=1149952&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: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Rony G. Flatscher (orexx) Assigned to: Nobody/Anonymous (nobody) Summary: OLEObject - OUT-part of INOUT not supported Initial Comment: If invoked Windows functions contain INOUT arguments, then changing of the arguments (due to OUT) on the Windows side cannot be retrieved on the ooRexx side. Using the OLEObject method getOutParameters() will return .nil in the case of INOUT arguments. Here is a small example demonstrating this behaviour automating MS Internet Explorer: -------------------- cut here ------------------- msie=.oleobject~new("InternetExplorer.Application") msie~visible=.true -- show window msie~navigate("http://www.ibm.com") l=msie~left t=msie~top w=msie~width h=msie~height say "left:" l "top:" t ", width:" msie~width ", height:" msie~height x=0 y=0 msie~clientToWindow(x, y) say "x=[" || x || "], y=["y"]" -- values not changed! arr=msie~getOutparameters -- try to get OUT arguments if arr<>.nil then do i=1 to arr~items say "arr["i"]="arr[i] end call sysSleep 10 -- show window another 10 seconds msie~quit -------------------- cut here ------------------- ---------------------------------------------------------------------- Comment By: Mark Miesfeld (miesfeld) Date: 2006-09-17 14:13 Message: Logged In: YES user_id=191588 Patch # 1551673 has fixed this bug. Both Rony Flatscher and myself have tested the fix for several weeks and agree the fix corrects the problem Rony reported. I believe this bug should be changed from open to pending. ---------------------------------------------------------------------- Comment By: Mark Miesfeld (miesfeld) Date: 2006-09-03 18:32 Message: Logged In: YES user_id=191588 This reason the getOutParameters method returns nil, in this case is as follows: When an OLE Automation proxy object is created by ooRexx, the type info for the OLE Automation object is used to construct a table containing all the known methods and their parameters for that object. This table is used by the proxy ooRexx object when inovking a method on the OLE Automation object. If the table does not contain information for a method, usually the method can still be invoked by using an OLE Automation interface method called GetIDsOfNames. However, ooRexx then has no idea of the type of the parameters, and no outParameter array will be returned. The problem here is that the method used to get the type information to build the table is slightly different than the method used in the getKnownMethods method. I have submitted a patch that uses the same method to obtain all information on an OLE Object type as the getKnownMethods method uses. I believe this is the correct method, it follows the outline MicroSoft provides in the MSDN Library. Which is: find the containing type library of the object and the index in the library of the type information for that object. Then use this to get the correct TypeInfo structure for the object. This patch fixes this bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684730&aid=1149952&group_id=119701 |