-
-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Milestone
Description
Hi, I really appreciate the great work to develop comtypes. Many thanks! I miss one feature which is the transfer of BSTR arrays. I suggest to change the following code lines in automation.py:
elif isinstance(value, (list, tuple)):
isstr = [isinstance(x,str) for x in value]
if not False in isstr:
bstrlist = []
for item in value:
bstrlist.append(cast(SysAllocStringLen(item, len(item)),BSTR))
obj = midlSAFEARRAY(BSTR).create(bstrlist)
else:
obj = _midlSAFEARRAY(VARIANT).create(value)
memmove(byref(self._), byref(obj), sizeof(obj))
self.vt = VT_ARRAY | obj._vartype_
Metadata
Metadata
Assignees
Labels
No labels