Path: news.mathworks.com!not-for-mail
From: "Nishtha Nagrath" <get2nishtha@yahoo.co.uk>
Newsgroups: comp.soft-sys.matlab
Subject: Re: interface .NET/ VC++ and Matlab
Date: Fri, 7 Mar 2008 11:19:01 +0000 (UTC)
Organization: Banasthali Vidyapith
Lines: 66
Message-ID: <fqr8b5$417$1@fred.mathworks.com>
References: <fmkotq$4tv$1@fred.mathworks.com> <fn4rt6$2cq$1@fred.mathworks.com>
Reply-To: "Nishtha Nagrath" <get2nishtha@yahoo.co.uk>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1204888741 4135 172.30.248.37 (7 Mar 2008 11:19:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 7 Mar 2008 11:19:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1306959
Xref: news.mathworks.com comp.soft-sys.matlab:455936


"John Reilly" <jrhokie1.nospam@yahoo.com> wrote in message
<fn4rt6$2cq$1@fred.mathworks.com>...
> The answer depends upon the code you want to call from 
> MATLAB.
> 
> If unmanaged (i.e. straight C/C++), the (probably) easiest 
> thing to do is to wrap it in an old-school Windows DLL.  
> You can use MATLAB loadlibrary/calllib to access it.  don't 
> forget to export your DLL's entry points as extern "C".  If 
> your interface is simple, this will be the easiest.  If 
> your interface is more complicated, you may want to write a 
> C mex wrapper that you call from MATLAB, and that wrapper 
> links to your library, translating the MX-Array arguments 
> to/from C.
> 
> If your code is managed (i.e. runs on the CLR), much more 
> difficult.  In that case, you'll need to create a C mex 
> wrapper that hosts the CLR for you.  CodeProject.com will 
> help you out there.
> 
> hth.
> 
> reilly.
> 
> 
> 
> "Vihang Patil" <vihang_patil@yahoo.com> wrote in message 
> <fmkotq$4tv$1@fred.mathworks.com>...
> > Hello
> > I would like to interface .Net or VC++ with Matlab.
> > In brief, there is some code which is developed in .NET 
> or 
> > VC++ and now I want to execute that code in Matlab.
> > I have absolutely no programming knowledge and knowhow 
> > whatsoever about .NET and VC++ and one of my friend will 
> > be developing the code in either .NET or VC++ which I am 
> > interested to execute in Matlab
> > Now, my questions are;
> > 1. How do I do this? 
> > 2. Should I use the code from .NET/VC++ and modify 
> somehow 
> > to make it work in Matlab? or should I ask him to give me 
> > a dll? or something else which can be called in Matlab?
> > 
> > Please help. If some one can provide any small example 
> > would really be useful
> > 
> > Regards
> > Vihang
> > 
> > 
> >  
> 


Hi all
I am new to MATLAB.I want to write c++ wrappers in
MATLAB.For this i have made a project in VC++ and want to
use this.
What i want to know is that is it necesaary to write a
static library in VC++ to call it from MATLAB or any MFC
application can be used to do the same.
Kindly help.

Thanks in advance