Type not correctly derived Py36
With py27:
displaywindow_names = self.com_object.DisplayWindowNames()
print(displaywindow_names)
yields:
<win32com.gen_py.ES Vision 3.3 Type Library.IStringCollection instance at 0x58593888>
With py36 and py35:
<win32com.gen_py.None.StringCollection>
When I do:
_oleobj_ = displaywindow_names._oleobj_.QueryInterface(STRINGCOLLECTION_CLSID, pythoncom.IID_IDispatch)
displaywindow_names= win32com.client.CastTo(displaywindow_names, 'IStringCollection')
displaywindow_names._oleobj_ = _oleobj_
I get a working object I can iterate.
Maybe related to
https://sourceforge.net/p/pywin32/bugs/549/
Thank you for your consideration
If looking at the strings probably you have a generated or gen_py wrapper in your cache in Python 2.7 while this is not available in Python 3.6. Look into [PythonRoot]\Lib\site-packages\win32com\gen_py or %TEMP%\gen_py if there is a difference.
Thank you for your response sschukat.
Yes it was not available in Py35, either in [Py35Root]\Lib\site-packages\win32com\gen_py or %TEMP%\gen_py\Py35. Running makepy created it in <[Py35Root]\Lib\site-packages\win32com\gen_py> but the problem persists.
What can I do to debug this ? Where can I read up on this ? Googled quite a bit already.
Thanks,
Arian
Linked issue is now https://github.com/mhammond/pywin32/issues/549