×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

MATLAB and DCOM server -> passing function parameters

MATLAB and DCOM server -> passing function parameters

MATLAB and DCOM server -> passing function parameters

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources