Getting Print Job Information Example for VB.NET

Private Sub GetPrintJobInfo(ByRef objPrintSCU As LTDICPRNSCULib.LEADDicomPrintSCU, ByRef sPrintJobInstanceUID As String)
   With objPrintSCU.PrintJob
      ' We need only the Execution Status and Execution Status Info
      .RequiredInfo = LTDICPRNSCULib.PrintJobInfoAttribEnum.PJ_EXECUTION_STATUS + LTDICPRNSCULib.PrintJobInfoAttribEnum.PJ_EXECUTION_STATUS_INFO

      ' Query the Print SCP for the Print Job information
      If .GetInfo(sPrintJobInstanceUID) = LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS Then
         ' Display the retrieved information
         MessageBox.Show("Execution Status: " & .ExecutionStatus & vbNewLine & "Execution Status Info: " & .ExecutionStatusInfo, "Print Job Info")
      End If
   End With
End Sub