unable to call windows API "FindWindow" and errors in using calllib
Show older comments
I want to use the windows api of "FindWindow" to get the handle of an opened window. The following is the code.
addpath('C:\WINDOWS\system32');
addpath('C:\Program Files (x86)\Windows Kits\8.0\Include\um');
loadlibrary('user32.dll', 'Windows.h','alias','user');
libfunctions('user','-full')
calllib('user','FindWindow','SunAwtCanvas','MATLAB R2014b');
unloadlibrary('user')
But somehow when I want to list the functions contained in user32 using the "libfunctions", Matlab tells me that "No methods for class lib.user". And then an error comes out:
Error using calllib
Method was not found.
It confuses me a lot. What's wrong with calllib? Any suggestions would be appreciated.
Accepted Answer
More Answers (1)
QiQin Zhan
on 20 Mar 2015
0 votes
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!