import user32.dll and use the 'BlockInput' function in it
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi,
I am sending a series of keystrokes to the notepad application from Matlab and through the total process I would like to lock the user input form both keyboard and mouse till the process completes and then release the lock. I found that there is a function called 'BlockInput' MSDN function in 'user32.dll'. So I am trying to import this dll into Matlab and use the function but I am getting the following error when I am trying to load the dll using 'loadlibrary' command.
loadlibrary('"C:\WINDOWS\system32\user32.dll"','winuser'); Warning: The library class 'user32' already exists. Use a classname alias.
Any guidance is appreciated.
Thanks, Krishna.
채택된 답변
추가 답변 (5개)
Kaustubha Govind
2011년 6월 10일
Try:
addpath('C:\WINDOWS\system32\')
loadlibrary user32 winuser.h
If you continue to see the same error, try:
loadlibrary user32 winuser.h alias user32lib
댓글 수: 1
Vishnu
2015년 1월 25일
Matlab removed my previous post, here is my new post with source code..
And to my knowledge the loadlibrary method I followed is undocumented...
Ignacio
2014년 10월 23일
Hi Krishna, I would like to disable temporality my keyboard and mouse through Matlab and I would like to know how did you do that.
Could you please post your solution or somehow send it to me?
Thanks!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!