Getting Printer Information (Delphi)
Procedure TForm1.GetPrinterInfo(LEADDicomPrintSCU: TLEADDicomPrintSCU);
var
strMsg: String;
begin
// Assume that the Association is already established
// We need only the Printer Status and Printer Status Info
LEADDicomPrintSCU.Printer.RequiredInfo:= PRN_PRINTER_STATUS + PRN_PRINTER_STATUS_INFO;
// Query the Print SCP for the information
if(LEADDicomPrintSCU.Printer.GetInfo (True, False) = DICOM_SUCCESS)then
begin
strMsg:= 'Printer Status: ' + LEADDicomPrintSCU.Printer.PrinterStatus + Chr(13) +
'Printer Status Info: ' + LEADDicomPrintSCU.Printer.PrinterStatusInfo;
// Display the retrieved information
Application.MessageBox(PChar(strMsg), 'Printer Info', MB_OK);
end;
end;