I have a .NET dll which provides the following capability:
TMCTL cTmctl = new TMCTL();
int ret = 0;
ret = cTmctl.Initialize(TMCTL.TM_CTL_ETHER, "18.104.22.168,anonymous,", ref id );
I need to use this dll file in Matlab, and so far I can succesfully reference the dll and create the necessary object:
YK_TMCTL = NET.addAssembly('C:\Windows\SysWOW64\TmctlAPINet64.dll');
Oscilloscope = TmctlAPINet.TMCTL;
However, I have difficulties in callig the Initialize function, this code always retunrs 1, wihch means the function could not establish a connection:
int32DeviceID = int32(0);
int32InstrumentAnswer = Oscilloscope.Initialize(Oscilloscope.TM_CTL_ETHER,'10.60.142.50,anonymous',int32DeviceID);
Oscilloscope.TM_CTL_ETHER is just a constant, it's not giving me any trouble. But I believe the int32DeviceID is the problem and I do not know how to succesfully pass this 'reference' variable.
Note that I have looked at this answer and I have subsequently tried:
[int32InstrumentAnswer,int32DeviceID] = Oscilloscope.Initialize(Oscilloscope.TM_CTL_ETHER,'10.60.142.50,anonymous')
Unfortunatelly this fails with the following error: No method 'Initialize' with matching signature found for class 'TmctlAPINet.TMCTL'.
Hence, the question in the title.