L_DicomPrintSCUGetPrintJobInfo

#include "ltdic.h"

L_LTDIC_API L_INT L_DicomPrintSCUGetPrintJobInfo(hPrintSCU, pszPrintJobInstanceUID, pRequiredPrintJobInfo)

Parameters

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.

Returns

Value Meaning
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

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

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.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C API Help