L_DicomPrintSCUGetPrintJobInfo

#include "ltdic.h"

L_LTDIC_API L_INT L_DicomPrintSCUGetPrintJobInfo(hPrintSCU, pszPrintJobInstanceUID, pRequiredPrintJobInfo)

HDICOMPRINTSCU hPrintSCU; A handle to Dicom Print SCU.
const L_TCHAR *pszPrintJobInstanceUID; SOP Instance UID of the Print Job.
const pPRINTJOBINFO pRequiredPrintJobInfo; Required Print Job information.

Parameter Description
hPrintSCU A handle to Dicom Print SCU.
pszPrintJobInstanceUID SOP Instance UID of the Print Job.
pRequiredPrintJobInfo Required Print Job information.

Returns

SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The function will not return until it receives the response of the Print SCP, or an error occurs. The function L_DicomPrintSCUGetLastOperationStatus can be used to obtain the status code specified in the response of the Print SCP. When the return value of the function GetPrintJobInfo is 0, then the required Print Job information was retrieved successfully, with either a Success or Warning status code in the response of the Print SCP.

The function L_DicomPrintSCUGetPrintJobInfo can be used to obtain the Print Job information retrieved from the Print SCP.

The parameter pRequiredPrintJobInfo points to a PRINTJOBINFO structure that specifies the Print Job information to be retrieved. In this structure, all the members that specify Attributes are string buffers. To query the Print SCP for the Value of an Attribute, the corresponding structure member must contain a non-empty string. If a structure member contains an empty string, the corresponding Attribute will not be included in the request; however, if all the members contain empty strings, the Print SCP will be queried for the Values of all the Attributes.

Required DLLs and Libraries

LTDIC
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64, Linux.

See Also

Functions: L_DicomPrintSCUGetPrintJobInstanceUID, PRINTSCUPRINTJOBREPORT, L_DicomPrintSCUGetPrintJobInfo, L_DicomPrintSCUGetLastOperationStatus
Topics: Print Management SCU

Example

L_INT DicomPrintSCUGetPrintJobInfoExample(HDICOMPRINTSCU hPrintSCU, L_PCTSTR pszPrintJobInstanceUID) 
 
{ 
   L_INT          nRet; 
   PRINTJOBINFO   PrintJobInfo;  
 
   // We need only the Execution Status and Execution Status Info 
 
   memset(&PrintJobInfo, 0, sizeof(PRINTJOBINFO));  
 
   PrintJobInfo.uStructSize = sizeof(PRINTJOBINFO);  
 
   lstrcpy(PrintJobInfo.szExecutionStatus, TEXT(" ")); 
 
   lstrcpy(PrintJobInfo.szExecutionStatusInfo, TEXT(" ")); 
 
   // Query the Print SCP for the Print Job information 
 
   nRet = L_DicomPrintSCUGetPrintJobInfo (hPrintSCU, pszPrintJobInstanceUID, &PrintJobInfo); 
   if(nRet != DICOM_SUCCESS) 
      return nRet; 
   else 
   { 
 
      // Display the retrieved information 
 
      L_TCHAR szPrintJobInfo[256];  
 
      wsprintf(szPrintJobInfo,  
               TEXT("Execution Status: %s\nExecution Status Info: %s"), 
               PrintJobInfo.szExecutionStatus,  
               PrintJobInfo.szExecutionStatusInfo);  
 
      MessageBox(NULL, szPrintJobInfo, TEXT("Print Job Info"), MB_OK);  
   } 
 
   return DICOM_SUCCESS; 
} 
Help Version 20.0.2019.3.12
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C API Help