|
Converts a string that holds hexademical values into LongInt |
|
HexStr |
String that holds hexademical value (eg. "0xAD60") |
|
function Integer TestPrinterStatus(string printerstatus)
begin
Integer res;
LongInt l;
l = POSNETHexToLong(Left(printerstatus,4));
if (BitAnd(l,1)) then begin res = 0; end;//transmit buffer is empty //res = 22108;
if (BitAnd(l,2)) then begin res = 0; end;//receipt buffer is empty //res = 22109;
if (BitAnd(l,4)) then begin res = 0; end;//DTR line is active");//res = 22130;
if (BitAnd(l,8)) then begin res = 0; end;//RTS line is active//res = 22131;
if (BitAnd(l,16)) then begin res = 0; end;//DSR line is active//res = 22132;
if (BitAnd(l,32)) then begin res = 0; end;//CTS line is active //res = 22133;
TestPrinterStatus = res;
return;
end;
««