Passing arguments to COM object

  • Follow


Hello, 

I have a matlab script that invokes a COM object. The COM objects accepts a 64-bit unsigned integer as an input argument passed from matlab. I had my code running for weeks with no problems, its only today when I tried to run it again when I was faced with this Warning message:

"Warning: ActiveX - attempt to convert unsupported SAFEARRAY type failed - substituting NAN"

and as a result, the COM object returns a NAN. My question is, if I didnt change anything in my code, what could make this to happen? At first I thought it might be the last windows update could be the reason, but am not sure. 
By the way, I have tried to re-registering the COM object several times, restarting MATLAB and even rebooting machine, nothing worked. 

Matlab version: 7.8.0.347 (R2009a) 
Platform: Windows XP / Service Pack 3

Code snippet:
ComObj = actxserver(ComName);
A = [1 2 3; 4 5 6; 7 8 9]
Results = ComObj.ProcessData((uint64) A)

thanks, 
A.
0
Reply Ahmed 4/21/2010 3:18:04 AM

Hi,

according to MATLAB documentation (int64) is not supported. Strange that it worked before. Maybe you can try double precision.
0
Reply Marc 7/28/2010 12:44:05 PM


1 Replies
280 Views

(page loaded in 0.027 seconds)

Similiar Articles:













7/14/2012 4:44:55 PM


Reply: