#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.
Handle to the DICOM Print SCU
Pointer to the character string that contains the SOP Instance UID of the Print Job SOP Instance for which the status report was sent.
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 |
Pointer to a PRINTJOBREPORTINFO structure that specifies Print Job information. This can be NULL.
Pointer to user-defined data
None.
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
Win32, x64
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 Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document