-
Notifications
You must be signed in to change notification settings - Fork 799
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
Implement record pointers as [in, out] method parameters of a Dispatch Interface #2310
Conversation
to get server side modifications of a record marshaled back to the client.
I was hoping to receive some feedback about what would be required to merge this PR and have in the meantime taken a look into the testing facility of this project. I discovered the sources for the C++ PyComTest server-dll and the related Python unittest files which seem to me the most appropriate place to implement a test case for this PR. However, I've also noticed that in CI these tests are not used and that the PyCOMTest sources only contain rather old versions of Visual Studio 6.0 project files. Therefore I'm wondering if the PyComTest server-dll is still actively used locally by the maintainers of this project and if there are probably project files available for some recent version of Visual Studio? Another possibility to get this compiled would probably be to follow the message in the
However, this would require a version of Visual Studio that can still read the project to export which I don't have. Please let me know if PyComTest is the way to go. |
pycomtest is certainly the right vehicle for testing. I'm afraid I'm a bit swamped at the moment, so it might be a little time before I can give meaningful feedback here. |
I managed to compile the C++ PyComTest server-dll with Visual Studio 2022 and added the method The test case has been added to If the changes of commit 22b28ab are reverted, the test fails. |
Is there any chance that this gets merged? Please let me know what is missing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, this looks great, thanks!
Is this worth adding an entry in |
to get server side modifications of a record marshaled back to the client.
COM interfaces with an [in, out] method parameter of type pointer to record can get
server side changes to record fields marshaled back to the client.
The current implementation of win32com does not support this and drops
an indirection level on pointer to records, i.e. the VT_BYREF attribute from a VT_RECORD.
This pull request changes the handling of record pointers and enables server side modifications of record fields to be visible on the client side. The standard type library marshaler does marshal those server side modifications back to the COM client when the VARIANT type of a parameter in the DISPPARAMS structure is (VT_BYREF | VT_RECORD).
This pull request resolves #2304.