Thread Subject: Windows API calls from MATLAB: how?

Subject: Windows API calls from MATLAB: how?

From: Blueblood Kingroyale

Date: 14 Mar, 2008 05:49:01

Message: 1 of 5

Hi, can somebody please let me know if there is a way to
call Windows API calls from within MATLAB code. (For
instance I need to provide a "system reboot" or "shutdown"
option for the user in the GUI I am preparing. )

Subject: Windows API calls from MATLAB: how?

From: John reilly

Date: 14 Mar, 2008 10:27:02

Message: 2 of 5

you can use loadlibrary() and calllib(). you may have
trouble pointing loadlibrary() at the full-up windows header
file, but you can craft a little one for yourself that only
includes the calls you care about.

alternatively, you can write yourself a little bitty C mex
function that you link to the Windows library, and call the
API from C.

reilly.
 

"Blueblood Kingroyale" <edproject.cec@gmail.com> wrote in
message <frd3kd$fn2$1@fred.mathworks.com>...
> Hi, can somebody please let me know if there is a way to
> call Windows API calls from within MATLAB code. (For
> instance I need to provide a "system reboot" or "shutdown"
> option for the user in the GUI I am preparing. )

Subject: Windows API calls from MATLAB: how?

From: Steven Lord

Date: 14 Mar, 2008 13:40:07

Message: 3 of 5


"Blueblood Kingroyale" <edproject.cec@gmail.com> wrote in message
news:frd3kd$fn2$1@fred.mathworks.com...
> Hi, can somebody please let me know if there is a way to
> call Windows API calls from within MATLAB code. (For
> instance I need to provide a "system reboot" or "shutdown"
> option for the user in the GUI I am preparing. )

I'd probably go with the MEX-file approach John mentioned in his reply.
However, if all you need to do is "system reboot" or "shutdown", look at the
shutdown.exe program located in the main Windows directory (for me, it's in
the system32 subdirectory of my main Windows directory; your computer may
vary.)

--
Steve Lord
slord@mathworks.com


Subject: generic dll in Matlab version 7

From: Blueblood Kingroyale

Date: 17 Mar, 2008 08:35:08

Message: 4 of 5

Hi,

I need to use 'user32.dll' in my program. However the
MatlabGenericDll is not supported in Matlab version 7...
what can i do about this?
I want to be able to call functions available in user32
dll in Windows... Any assistance would be much appreciated.

Blueblood

Subject: generic dll in Matlab version 7

From: Ashish Uthama

Date: 19 Mar, 2008 19:22:07

Message: 5 of 5

CALLLIB
?
On Mon, 17 Mar 2008 04:35:08 -0400, Blueblood Kingroyale
<edproject.cec@gmail.com> wrote:

> MatlabGenericDll

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
dll Blueblood Kingroyale 17 Mar, 2008 04:40:19
api calls Blueblood Kingroyale 14 Mar, 2008 01:50:22
rssFeed for this Thread

Contact us at files@mathworks.com