Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

MATLAB and DCOM server -> passing function parameters

Status
Not open for further replies.

mos7you

Computer
Aug 1, 2006
1
Hi,

I am a new user in MATLAB and DCOM. I created a dcom server object in MATLAB with the line:
h = actxserver('simulator.simgencontrol')
Till here no problems. I have an external file 'Structs.h' which contains many structs defenitions, so i loaded it in MATLAB so matlab would know those defenitions. Till here no problems. In the DCOM interface i have a function:
GetStructs([out] NewStruct_S* m_s)
I want to call this function from the MATLAB. In order to do so i need to create an object which is a pointer to NewStruct_S and i do it matlab with this line:
p = libpointer('NewStruct_S')]
Till Here also no problems (p gets the appropriate fields). Now, from the matlab i want to make a call to the given function, so i write:
h.GetStructs(p)
Here i get an error:
Invoke Error: The parameter is incorrect

Does anyone can advice me how whould i handle this problem.

Thanks.
mos
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor