Getting Printer Configuration Information (Delphi)
Procedure TForm1.GetPrinterConfigInfo(LEADDicomPrintSCU: TLEADDicomPrintSCU);
var
i: Integer;
strMsg: String;
Attrib: LAttribute;
begin
// Assume that the Association is already established
// Query the Print SCP for the printer configuration information
with (LEADDicomPrintSCU.PrinterConfiguration) do
begin
if(Get () = DICOM_SUCCESS)then
begin
// We will display only the Attributes of the first Printer Configuration Item
if(PrinterConfigItems.Count > 0)then
begin
for i:= 0 to PrinterConfigItems.Item(0).Attributes.Count-1 do
begin
Attrib:= PrinterConfigItems.Item(0).Attributes.Item(i);
strMsg:= strMsg + Attrib.Name + ': ' + Attrib.Value + Chr(13);
end;
Application.MessageBox(PChar(strMsg), 'Printer Config Info', MB_OK);
end;
end;
end;
end;