要是锁定所有键盘则:<br>procedure Lockkey(lock: boolean);//锁定用汇编<br>var<br> temp:integer;<br>begin<br> if lock = true then<br> begin<br> asm //封锁20端口98&95<br> IN AL,21H<br> OR AL,02H<br> OUT 21H,AL<br> end;<br> //封锁Ctrl-Alt-Del<br> SystemParametersInfo(SPI_SCREENSAVERRUNNING, 1, @temp, 0);<br> end<br> else<br> begin<br> asm //解开20端口<br> IN AL,21H<br> AND AL,0FDH<br> OUT 21H,AL<br> end;<br> //解开Ctrl-Alt-Del<br> SystemParametersInfo(SPI_SCREENSAVERRUNNING, 0, @temp, 0);<br> end;<br>end;