Getting Print Job Information Example for C#

private void GetPrintJobInfo(ref LTDICPRNSCULib.LEADDicomPrintSCU objPrintSCU, ref string sPrintJobInstanceUID)
{
   // We need only the Execution Status and Execution Status Info;
   objPrintSCU.PrintJob.RequiredInfo = LTDICPRNSCULib.PrintJobInfoAttribEnum.PJ_EXECUTION_STATUS | LTDICPRNSCULib.PrintJobInfoAttribEnum.PJ_EXECUTION_STATUS_INFO;
   // Query the Print SCP for the Print Job information
   if (objPrintSCU.PrintJob.GetInfo(sPrintJobInstanceUID) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
   {
      // Display the retrieved information
      MessageBox.Show("Execution Status: " + objPrintSCU.PrintJob.ExecutionStatus + System.Environment.NewLine + "Execution Status Info: " + objPrintSCU.PrintJob.ExecutionStatusInfo, "Print Job Info");
   }
}