I have created an ActiveX server that I instantiate in MATLAB with ACTXSERVER. I would like to pass data from MATLAB to a server method as a one-dimensional array, but my arguments are converted to two-dimensional arrays when passed.
One example of this issue is when using the ADODB.Stream ActiveX Server. When executing the following code
a=uint8(zeros(23,1));sqlstream=actxserver('ADODB.Stream')sqlstream.Type = 1;sqlstream.Open()sqlstream.Write(a)
you receive the following error message
??? Invoke Error, Dispatch Exception: Source: ADODB.Stream Description: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. Help File: C:\WINNT\HELP\ADO270.CHM Help Context ID: 12ee41
For different COM objects, the error message returned will be different.
Best Answer