Page 1 of 1

Sobre IsPrinter

Posted: Thu Aug 23, 2007 12:51 am
by Willi Quintana
Hola amigos,
Encontre esto escrito para Dephi, se podra convertir a Harbour??
Salu2


function IsPrinter : Boolean;
Const
PrnStInt : Byte = $17;
StRq : Byte = $02;
PrnNum : Word = 0; { 0 para LPT1, 1 para LPT2, etc. }
Var
nResult : byte;
Begin (* IsPrinter*)
Asm
mov ah,StRq;
mov dx,PrnNum;
Int $17;
mov nResult,ah;
end;
IsPrinter := (nResult and $80) = $80;
End;

Posted: Thu Aug 23, 2007 8:50 am
by Antonio Linares
Willi,

> Int $17;

Ese código es para 16 bits, no para 32 bits

De todas formas, Harbour/xHarbour proporcionan IsPrinter()