How can I pass arguments to an ActiveX server from MATLAB 7.0 (R14) as one-dimensional arrays?
Show older comments
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
ERROR: ??? 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.
Accepted Answer
More Answers (0)
Categories
Find more on ActiveX in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!