A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/enthought/comtypes/issues/212 below:

Argument lifetime issue when calling COM/ATL methods with array of strings (and probably others) as of at least Python 3.8.3 (which worked with Python 3.7.x) · Issue #212 · enthought/comtypes · GitHub

Consider the following, very simple COM/ATL project made with MSVC 2017 (15.9.24, Windows 10 Pro 2004): comProjectWithArray-v2.zip. It does not contain any functionality and is used to reproduce the empty array as described below only.

Registration is disabled in the project settings here, so to test it you have to register
ATLTestServer.exe /RegServer
regsvr32 ATLTestServerPS.dll

After successful registration, it can be tested with the following Python-Snippet:
from comtypes.client import CreateObject
obj = CreateObject("ATLTestServer.ATLTestObject")
obj.concatenateStrings(["New", " ", "York"])

When using comtypes 1.1.7 (6fb4403) with Python 3.7.7 x64 the call from the Python snipped gets properly routed to the C++ method:

However, when using the same comtypes version with Python 3.8.3 x64, the array in C++ contains only nullptr:

Is this a known issue?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4