ALP4lib
ALP4lib copied to clipboard
Incorrectly passing C-struct by reference in [def DevControlEx(self, controlType, userStruct):]
Hello, Your wrapper code has been very helpful and I want to thank you for creating it! However, I did notice one error in how you passed the tAlpDynSynchOutGate structure to the C ALP
it should be changed from:
self._checkError(self._ALPLib.AlpDevControlEx(self.ALP_ID, controlType, userStruct.byref), 'Error sending request.')
to
self._checkError(self._ALPLib.AlpDevControlEx(self.ALP_ID, controlType, ct.byref(userStruct)), 'Error sending request.')
this will correctly pass by reference the userStruct to the C ALP