-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAFEARRAY(VT_RECORD) missing last element #2247
Comments
It seems to work fine with other COM objects though - can you demonstrate the array element missing from some well-known object (eg, any Office product, Windows Scripting Host, IE, etc?) |
To be honest I'm struggling to find a standard library that returns arrays of UDTs - I'll keep looking though - in my case it's an in-house piece of software that's returning the array, |
right, I missed that subtlety - only arrays of records are impacted. So yeah, it does sound like this might be a problem, thanks. |
Fixes #2247. Co-authored-by: Avasam <samuel.06@hotmail.com>
Fixes mhammond#2247. Co-authored-by: Avasam <samuel.06@hotmail.com>
Fixes mhammond#2247. Co-authored-by: Avasam <samuel.06@hotmail.com>
Fixes mhammond#2247. Co-authored-by: Avasam <samuel.06@hotmail.com>
My COM method call with retval of type SAFEARRAY(VT_RECORD) is missing the last element.
Looks like com/win32com/PyRecord.cpp @ lines 74 and (probably) 525 are missing a +1 in the array size calculation - I've changed this locally and it fixes my issue.
Steps to reproduce the problem
Call a method that returns a SAFEARRAY(VT_RECORD) see how the Python list is 1 element short.
System information
Python 3.11
pywin32 version:
Lastest installed from PIP + compiled from source.
Windows Version:
11
The text was updated successfully, but these errors were encountered: