Erro ao instalar fortesreport no lazarus
10/08/2022
0
Tento instalar o fortesreport no lazarus e dá erros na linha 4 - OpenPrinter
PrinterDevice := TPrinterDevice(Printer.Printers.Objects[Printer.PrinterIndex])
else
Exit;
if not OpenPrinter(PChar(PrinterDevice.Name),hPrinter,@foodefs) then
RaiseLastOSError;
try
GetPrinter(hPrinter,2,nil,0,bytesNeeded);
if bytesNeeded=0 then
bytesNeeded:=32768;
pInfo:=AllocMem(bytesNeeded);
try
GetPrinter(hPrinter,2,pInfo,bytesNeeded,bytesNeeded);
if pInfo^.pServerName<>emptystr then
Result:=pInfo^.pServerName+''+pInfo^.pShareName
else
Result:=pInfo^.pPortName;
finally
FreeMem(pInfo);
end;
finally
ClosePrinter(hPrinter);
end;
end
PrinterDevice := TPrinterDevice(Printer.Printers.Objects[Printer.PrinterIndex])
else
Exit;
if not OpenPrinter(PChar(PrinterDevice.Name),hPrinter,@foodefs) then
RaiseLastOSError;
try
GetPrinter(hPrinter,2,nil,0,bytesNeeded);
if bytesNeeded=0 then
bytesNeeded:=32768;
pInfo:=AllocMem(bytesNeeded);
try
GetPrinter(hPrinter,2,pInfo,bytesNeeded,bytesNeeded);
if pInfo^.pServerName<>emptystr then
Result:=pInfo^.pServerName+''+pInfo^.pShareName
else
Result:=pInfo^.pPortName;
finally
FreeMem(pInfo);
end;
finally
ClosePrinter(hPrinter);
end;
end
Ivan Araujo
Curtir tópico
+ 0
Responder
Clique aqui para fazer login e interagir na Comunidade :)