Re: [python-win32] win32com, server/policy.py bug? policy.py Line 639

2023-04-17 Thread Mark Hammond
On 16/4/2023 11:48 pm, Wuping Xin wrote: A better fix is to change Line 639 of win32com/server/policy.py to the following: import inspect if len(inspect.getfullargspec(func).args) == 1: return func() else:

Re: [python-win32] win32com, server/policy.py bug? policy.py Line 639

2023-04-17 Thread Wuping Xin via python-win32
Thanks. I'll submit a PR. When calling from a Delphi COM client (using OleVariant ), arg[0] will be set by Delphi a value of 0x8002000C, when the target Python method has NO argument (i.e., taking only "self"). This makes args non-empty. When calling from a C++ MFC/COM client, arg[0] will be s

Re: [python-win32] win32com, server/policy.py bug? policy.py Line 639

2023-04-17 Thread Wuping Xin via python-win32
I created a new issue (with sample Delphi project to replicate the issue, including the Python source file where the COM server is defined): https://github.com/mhammond/pywin32/issues/2043 And I submit a PR: https://github.com/mhammond/pywin32/pull/2044 Thank you. Wuping -- Original Messag