PRINTSCUPRINTJOBREPORT

#include "ltdic.h"

L_VOID pEXT_CALLBACK Your Function(hCU, pszPrintJobInstanceUID, uEventTypeID, pReportInformation, pUserData)

Called when a Print Job status report is received from the Print SCP.

Parameters

HDICOMPRINTSCU hCU

Handle to the DICOM Print SCU

const L_TCHAR pszPrintJobInstanceUID

Pointer to the character string that contains the SOP Instance UID of the Print Job SOP Instance for which the status report was sent.

L_INT16 uEventTypeID

The Event Type ID which indicates the status of the Print Job. The following values are possible:

Value Meaning
1 Event Type Name = Pending
2 Event Type Name = Printing
3 Event Type Name = Done
4 Event Type Name = Failure

pPRINTERREPORTINFO pReportInformation

Pointer to a PRINTJOBREPORTINFO structure that specifies Print Job information. This can be NULL.

L_VOID* pUserData

Pointer to user-defined data

Returns

None.

Comments

This callback function is called whenever the Print SCU receives a report from the Print SCP about the changes in the status of a Print Job. The intended Print Job is specified by its SOP Instance UID. If the Print Job SOP Class is supported on the Association, this function is expected to be called. Otherwise, it will never be called.

If the status of the Print Job is Pending or Failure, the Print SCP is supposed to supply additional information about the pending/error condition in the Attribute Execution Status Info (the pszExecutionStatusInfo member of the PRINTJOBREPORTINFO structure).

Required DLLs and Libraries

Platforms

Win32, x64

See Also

Functions

Topics

Example

L_VOID EXT_CALLBACK MyPRINTSCUPRINTJOBREPORT (HDICOMPRINTSCU hCU, const L_TCHAR * pszPrintJobInstanceUID, L_UINT16 uEventTypeID, const pPRINTJOBREPORTINFO pReportInfo, L_VOID* pUserData) 
{ 
   L_TCHAR szMsg[512];  
 
   wsprintf(szMsg, TEXT("Print Job SOP Instance UID: %s"), pszPrintJobInstanceUID);  
 
   L_TCHAR  * pszEventTypeName = TEXT("Pending"); 
 
   switch (uEventTypeID)  
   { 
   case 2:  
      pszEventTypeName = TEXT("Printing"); 
      break;  
 
   case 3: 
      pszEventTypeName = TEXT("Done"); 
      break;  
 
   case 4:  
      pszEventTypeName = TEXT("Failure"); 
      break; 
   } 
 
   wsprintf(szMsg, TEXT("%s\nEvent Type Name: %s"), szMsg, pszEventTypeName);  
 
   if (pReportInfo)  
 
   { 
      if (pReportInfo->pszExecutionStatusInfo)  
 
      { 
         wsprintf(szMsg, TEXT("%s\nExecution Status Info: %s"), 
            szMsg, pReportInfo->pszExecutionStatusInfo);  
      } 
 
      if (pReportInfo->pszFilmSessionLabel)  
 
      { 
         wsprintf(szMsg, TEXT("%s\nFilm Session Label: %s"), 
            szMsg, pReportInfo->pszFilmSessionLabel);  
      } 
 
      if (pReportInfo->pszPrinterName)  
 
      { 
         wsprintf(szMsg, TEXT("%s\nPrinter Name: %s"), 
            szMsg, pReportInfo->pszPrinterName);  
      } 
   } 
 
   MessageBox(NULL, szMsg, TEXT("Print Job Status Report"), MB_OK);  
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.