我在Delphi中写一个DLL用来控制0x61(主机的喇叭)在98下调用是好的。可以到了win2k下就不行了。请高手指教.谢谢
pp616 2001-11-12 04:35:51 Delphi的代码如下。
单元文件:
unit speakIO;
interface
procedure out_port(skon:byte;f1:byte;f2:byte);stdcall
implementation
procedure out_port(skon:byte;f1:byte;f2:byte);
asm
mov al,skon
out $61,al
mov al,$0B6
out $43,al
mov al,f1
out $42,al
mov al,f2
out $42,al
end;
end.
项目文件:
library myspeakIO;
uses
SysUtils,
Classes,
speakIO in 'speakIO.pas';
exports
out_port index 1;
begin
end.