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
Ivan Araujo

Ivan Araujo

Responder

Assista grátis a nossa aula inaugural

Assitir aula

Saiba por que programar é uma questão de
sobrevivência e como aprender sem riscos

Assistir agora

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar