[pywin32-bugs] [ pywin32-Bugs-733540 ] Calling com server w/VB "Call" changes 1st param's value
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: SourceForge.net <no...@so...> - 2003-05-06 21:57:51
|
Bugs item #733540, was opened at 2003-05-06 14:57 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=733540&group_id=78018 Category: com Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ryan Groe (ryangroe) Assigned to: Nobody/Anonymous (nobody) Summary: Calling com server w/VB "Call" changes 1st param's value Initial Comment: python version: 2.2.2 win32all version: 152 platform: win2k server with WSH 5.6 description: I have a pythoncom server (using DynamicPolicy) with a function that takes a single parameter. Calling that function from VB/VBScript using "Call" (ignoring the return value) causes the passed parameter to be set to the return value of that function. If I assign the return value to a VB variable the parameter's value doesn't change: 'Python COM server class Object: def _dynamic_(self, name, lcid, wFlags, args): return getattr( self, string.lower(name) )(*args) def func1(self, S1): pass 'Called From VBScript Call obj.func1(param) 'Bad, param gets set to Null rval = obj.func1(param) 'OK, param retains its value I'm at a loss as to why this is. The only difference I can see at the policy level is wFlags, with one style it's 3 (DISPATCH_METHOD | DISPATCH_PROPERTYGET) and the other it's 1 (DISPATCH_METHOD) Attached is a zip containing a pythoncom server, a VBScript test file and a batch (cmd) file to run the test. Please let me know if I've done something incorrectly. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=733540&group_id=78018 |