I am running a python script to interface with a c# dll registered as a com application and having difficulty handling an output struct parameter. I create a COM record and successfully pass this into my COM function call but the data does not change.
My c# function is declared as
void GetData(ref MyData data);
MyData is a struct, and the entry in the tlh file is generated as
virtual HRESULT __stdcall GetData (
/*[in,out]*/ struct MyData * data ) = 0;
In the python script I declare
self.myData = win32com.client.Record("MyData", self.myComServerObj)
And call the function
self.myComServerObj.GetData(self.myData)
But the data items in self.myData remain unchanged following the function call.
I can debug the function call in the server side and confirm that the data is changing and can also assign test values at the client side and confirm that these are being received by the server. i.e. the struct parameter works okay as an [In] parameter but not an [out] parameter.
I can also confirm that the function works well with a 'C' COM client program. Can anyone help?
Thanks.