Thread Subject: calling Matlab generated dll

Subject: calling Matlab generated dll

From: vinay chinti

Date: 5 Sep, 2008 03:57:02

Message: 1 of 6

Hi all,
   Please let me know the procedure to call a matlab
generated dll using c program.

Thanks,
Vinay

Subject: calling Matlab generated dll

From: James Tursa

Date: 5 Sep, 2008 04:31:01

Message: 2 of 6

"vinay chinti" <vinay.chinti@wipro.com> wrote in message
<g9qamd$920$1@fred.mathworks.com>...
> Hi all,
> Please let me know the procedure to call a matlab
> generated dll using c program.
>
> Thanks,
> Vinay

Not sure exactly what you need, but you can look at
mexCallMATLAB, and use it to call any MATLAB function from
C. And maybe you need to look at the MATLAB function
loadlibrary as well.

James Tursa

Subject: calling Matlab generated dll

From: vinay chinti

Date: 5 Sep, 2008 04:47:01

Message: 3 of 6

"James Tursa" <aclassyguywithaknotac@hotmail.com> wrote in
message <g9qcm5$gcp$1@fred.mathworks.com>...
> "vinay chinti" <vinay.chinti@wipro.com> wrote in message
> <g9qamd$920$1@fred.mathworks.com>...
> > Hi all,
> > Please let me know the procedure to call a matlab
> > generated dll using c program.
> >
> > Thanks,
> > Vinay
>
> Not sure exactly what you need, but you can look at
> mexCallMATLAB, and use it to call any MATLAB function
from
> C. And maybe you need to look at the MATLAB function
> loadlibrary as well.
>
> James Tursa
>
Hi,
   Consider I have a dll file created by Matlab. Now i
want to call this dll file using c program.
         Or
   Consider it as a C wrapper for dll created by matlab.
   I want to know the procedure to do this.

  vinay

Subject: calling Matlab generated dll

From: vinay chinti

Date: 5 Sep, 2008 08:11:01

Message: 4 of 6

"vinay chinti" <vinay.chinti@wipro.com> wrote in message
<g9qdk5$44a$1@fred.mathworks.com>...
> "James Tursa" <aclassyguywithaknotac@hotmail.com> wrote
in
> message <g9qcm5$gcp$1@fred.mathworks.com>...
> > "vinay chinti" <vinay.chinti@wipro.com> wrote in
message
> > <g9qamd$920$1@fred.mathworks.com>...
> > > Hi all,
> > > Please let me know the procedure to call a matlab
> > > generated dll using c program.
> > >
> > > Thanks,
> > > Vinay
> >
> > Not sure exactly what you need, but you can look at
> > mexCallMATLAB, and use it to call any MATLAB function
> from
> > C. And maybe you need to look at the MATLAB function
> > loadlibrary as well.
> >
> > James Tursa
> >
> Hi,
> Consider I have a dll file created by Matlab. Now i
> want to call this dll file using c program.
> Or
> Consider it as a C wrapper for dll created by matlab.
> I want to know the procedure to do this.
>
> vinay

   Please can any one do this for me...its urgent
   
   vinay

Subject: calling Matlab generated dll

From: Steve Amphlett

Date: 5 Sep, 2008 08:33:02

Message: 5 of 6

"vinay chinti" <vinay.chinti@wipro.com> wrote in message
<g9qpil$78$1@fred.mathworks.com>...
> "vinay chinti" <vinay.chinti@wipro.com> wrote in message
> <g9qdk5$44a$1@fred.mathworks.com>...
> > "James Tursa" <aclassyguywithaknotac@hotmail.com> wrote
> in
> > message <g9qcm5$gcp$1@fred.mathworks.com>...
> > > "vinay chinti" <vinay.chinti@wipro.com> wrote in
> message
> > > <g9qamd$920$1@fred.mathworks.com>...
> > > > Hi all,
> > > > Please let me know the procedure to call a
matlab
> > > > generated dll using c program.
> > > >
> > > > Thanks,
> > > > Vinay
> > >
> > > Not sure exactly what you need, but you can look at
> > > mexCallMATLAB, and use it to call any MATLAB function
> > from
> > > C. And maybe you need to look at the MATLAB function
> > > loadlibrary as well.
> > >
> > > James Tursa
> > >
> > Hi,
> > Consider I have a dll file created by Matlab. Now i
> > want to call this dll file using c program.
> > Or
> > Consider it as a C wrapper for dll created by matlab.
> > I want to know the procedure to do this.
> >
> > vinay
>
> Please can any one do this for me...its urgent

You could probably use LoadLibrary() to open the DLL and
GetProcAddress() to locate the gateway function. But the
Matlab-created DLL will have many external dependencies (in
LIBMX.DLL and LIBMEX.DLL), so it'll be quite a challenge to
resolve everything.

Subject: calling Matlab generated dll

From: Ashish Uthama

Date: 5 Sep, 2008 20:54:24

Message: 6 of 6

If you are referring to a DLL created using the MATLAB compiler, you could
follow the process given in the example:


Please find more details online at:
     http://www.mathworks.com/access/helpdesk/help/toolbox/compiler/f2-972343.html#f2-1000836
Or please paste this in the MATLAB command window:
     web([docroot,'/toolbox/compiler/f2-972343.html#f2-1000836'])

look at the code for matrixdrive.c which is the wrapper around the DLL.

The might also be of interest (level3.c)
http://www.mathworks.com/support/solutions/data/1-6IJZJP.html?solution=1-6IJZJP


On Fri, 05 Sep 2008 00:47:01 -0400, vinay chinti <vinay.chinti@wipro.com>
wrote:

> "James Tursa" <aclassyguywithaknotac@hotmail.com> wrote in
> message <g9qcm5$gcp$1@fred.mathworks.com>...
>> "vinay chinti" <vinay.chinti@wipro.com> wrote in message
>> <g9qamd$920$1@fred.mathworks.com>...
>> > Hi all,
>> > Please let me know the procedure to call a matlab
>> > generated dll using c program.
>> >
>> > Thanks,
>> > Vinay
>>
>> Not sure exactly what you need, but you can look at
>> mexCallMATLAB, and use it to call any MATLAB function
> from
>> C. And maybe you need to look at the MATLAB function
>> loadlibrary as well.
>>
>> James Tursa
>>
> Hi,
> Consider I have a dll file created by Matlab. Now i
> want to call this dll file using c program.
> Or
> Consider it as a C wrapper for dll created by matlab.
> I want to know the procedure to do this.
>
> vinay

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com