Determinar el estatus de la impresora
Publicado por apc (5 intervenciones) el 31/05/2006 19:13:53
Hola amigos del foro, veran con la siguiente función puedo determinar si la impresora está encendida o no:
function TestPrinterStatus(LPTPort: Word): Byte;
var
Status: byte;
CheckLPT: word;
begin
Status := 0;
if (LPTPort >= 1) and (LPTPort <= 3) then
begin
CheckLPT := LPTPort - 1;
asm
mov dx, CheckLPT;
mov al, 0;
mov ah, 2;
int 17h;
mov &Status, ah;
end;
end;
Result := Status;
end;
El asunto es que solo me funciona con Windows 98, alguien conoce la manera de hacerlo en Windows Xp?
function TestPrinterStatus(LPTPort: Word): Byte;
var
Status: byte;
CheckLPT: word;
begin
Status := 0;
if (LPTPort >= 1) and (LPTPort <= 3) then
begin
CheckLPT := LPTPort - 1;
asm
mov dx, CheckLPT;
mov al, 0;
mov ah, 2;
int 17h;
mov &Status, ah;
end;
end;
Result := Status;
end;
El asunto es que solo me funciona con Windows 98, alguien conoce la manera de hacerlo en Windows Xp?
Valora esta pregunta
0