PRINTSCUPRINTERREPORTCALLBACK

#include "ltdic.h"

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

HDICOMPRINTSCU hCU; handle to DICOM Print SCU
L_INT16 uEventTypeID; event type ID
const pPRINTERREPORTINFO pReportInformation; printer report information
L_VOID* pUserData; user-defined data

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

Parameter Description
hCU Handle to the DICOM Print SCU
uEventTypeID The Event Type ID which indicates normal, warning, or failure conditions. The following values are possible:
  Value Meaning
  1 Normal condition (Event Type Name = Normal). In this case, the pReportInfo parameter will be NULL.
  2 Warning condition (Event Type Name = Warning).
  3 Failure condition (Event Type Name = Failure).
pReportInformation Pointer to a PRINTERREPORTINFO structure that specifies printer information under warning and failure conditions. This can be NULL and it is always NULL if the uEventTypeID parameter is equal to 1 (normal condition).
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 of the printer status, as follows:

Under the warning and failure conditions, the Print SCP is supposed to supply additional information about the printer status in the Attribute Printer Status Info (the pszPrinterStatusInfo member of the PRINTERREPORTINFO structure).

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

See Also

Functions:

L_DicomPrintSCUGetPrinterInfo, L_DicomPrintSCUGetPrinterConfiguration

Topics:

Print Management SCU

 

DICOM Print Management Service Class User: Functions

Example

L_VOID WINAPI MyPRINTSCUPRINTERREPORTCALLBACK (HDICOMPRINTSCU hCU, L_UINT16 uEventTypeID, const pPRINTERREPORTINFO pReportInfo, L_VOID* pUserData) 
{ 
   L_TCHAR  * pszEventTypeName = TEXT("Normal"); 
 
   switch (uEventTypeID)  
   { 
   case 2:  
      pszEventTypeName = TEXT("Warning"); 
      break;  
 
   case 3:  
      pszEventTypeName = TEXT("Failure"); 
      break;  
   } 
 
   L_TCHAR szMsg[256];  
 
   wsprintf(szMsg, TEXT("Event Type Name: %s"), pszEventTypeName);  
 
   if (uEventTypeID != 1 && pReportInfo)  
   { 
      if (pReportInfo->pszPrinterStatusInfo)  
      { 
         wsprintf(szMsg, TEXT("%s\nPrinter Status Info: %s"), 
            szMsg, pReportInfo->pszPrinterStatusInfo);  
      } 
 
      if (pReportInfo->pszFilmDestination)  
      { 
         wsprintf(szMsg, TEXT("%s\nFilm Destination: %s"), 
            szMsg, pReportInfo->pszFilmDestination);  
      } 
 
      if (pReportInfo->pszPrinterName)  
      { 
         wsprintf(szMsg, TEXT("%s\nPrinter Name: %s"), 
            szMsg, pReportInfo->pszPrinterName);  
      } 
   } 
 
   MessageBox(NULL, szMsg, TEXT("Printer Status Report"), MB_OK);  
} 
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