unable to call windows API "FindWindow" and errors in using calllib
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (1)
QiQin Zhan
el 20 de Mzo. de 2015
0 votos
Categorías
Más información sobre Call C from MATLAB en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!