LDicomPrintSCU::GetPrinterInfo

#include "ltdic.h"

L_INT LDicomPrintSCU::GetPrinterInfo(pRequiredPrinterInfo, bBasicPrintManagement, bColorPrintManagement)

L_INT LDicomPrintSCU::GetPrinterInfo(pPrinterInfo, uStructSize) const

const pPRINTERINFO pRequiredPrinterInfo;

required printer information

L_BOOL bBasicPrintManagement;

Basic or Pull Stored Print Management

L_BOOL bColorPrintManagement;

Grayscale or Color Print Management

pPRINTERINFO pPrinterInfo;

Printer information

L_UINT uStructSize;

size of the structure

Queries the Print SCP for information about the printer.

Parameter

Description

pRequiredPrinterInfo

Pointer to a PRINTERINFO structure that specifies the printer information to be retrieved. If this is set to NULL, the Values of all the Attributes are required.

bBasicPrintManagement

The parameter is described below.

bColorPrintManagement

The parameter is described below.

pPrinterInfo

Pointer to a PRINTERINFO structure. The function will set the members of this structure to the retrieved printer information.

uStructSize

Size of the structure pointed to by pPrinterInfo.

Returns

0

The required printer information was retrieved successfully.

DICOM_ERROR_PRINTSCU_FAILURE_STATUS

The response of the Print SCP specifies a Failure status code.

DICOM_ERROR_PRINTSCU_CLASS_NOT_SUPPORTED

None of the three Meta SOP Classes (the Basic Grayscale Print Management Meta SOP Class, the Basic Color Print Management Meta SOP Class, or the Pull Stored Print Management Meta SOP Class) is supported on the Association, and hence the Printer SOP Class is not supported.

For L_INT LDicomPrintSCU::GetPrinterInfo(pRequiredPrinterInfo, bBasicPrintManagement, bColorPrintManagement)

> 0

An error occurred. Refer to Return Codes.

For L_INT LDicomPrintSCU::GetPrinterInfo(pPrinterInfo, uStructSize) const

<> 0

An error occurred. Refer to Return Codes.

Comments

L_INT LDicomPrintSCU::GetPrinterInfo(pRequiredPrinterInfo, bBasicPrintManagement, bColorPrintManagement)

The LDicomPrintSCU::GetPrinterInfo(pRequiredPrinterInfo, bBasicPrintManagement, bColorPrintManagement) function queries the Print SCP for information about the printer. It will not return until either it receives the response of the Print SCP, or an error occurs. Use the LDicomPrintSCU::GetLastOperationStatus function to obtain the status code specified in the response of the Print SCP. If the return value of the GetPrinterInfo function is 0, then the required printer information was retrieved successfully (with either a Success or Warning status code in the Print SCP's response).

The pRequiredPrinterInfo parameter points to a PRINTERINFO structure that specifies what printer information to retrieve. 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.

The Printer SOP Class is included in each of the three Meta SOP Classes (the Basic Grayscale Print Management Meta SOP Class, the Basic Color Print Management Meta SOP Class, and the Pull Stored Print Management Meta SOP Class). The bBasicPrintManagement and bColorPrintManagement parameters recommend which Meta SOP Class to specify in the request to the Print SCP. However, unless the Meta SOP Class specified by these parameters is supported on the Association, it will not be specified in the request and the function will choose a supported Meta SOP Class instead. Therefore, if only one Meta SOP Class is supported, the function will always choose it irrespective of the values of these parameters.

The bBasicPrintManagement parameter selects between the Basic Print Management Meta SOP Classes and the Pull Stored Print Management Meta SOP Class. The bColorPrintManagement parameter selects between the Basic Grayscale Print Management Meta SOP Class and the Basic Color Print Management Meta SOP Class.

Obtain the printer information retrieved from the Print SCP by calling the LDicomPrintSCU::GetPrinterInfo(pPrinterInfo, uStructSize) function.

L_INT LDicomPrintSCU::GetPrinterInfo(pPrinterInfo, uStructSize) const

The L_INT LDicomPrintSCU::GetPrinterInfo(pPrinterInfo, uStructSize) const function fills the members of the specified PRINTERINFO structure with the printer information retrieved previously from the Print SCP.

Query the Print SCP for printer information by calling the LDicomPrintSCU::GetPrinterInfo method. After the information is retrieved successfully, the function GetPrinterInfo can then be used to obtain the information sent by the Print SCP.

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:

Class Members, LDicomPrintSCU::GetPrinterInfo, LDicomPrintSCU::OnPrinterReport, LDicomPrintSCU::GetPrinterConfiguration, LDicomPrintSCU::GetLastOperationStatus

Topics:

Print Management SCU

 

DICOM Print Management Service Class User: Functions

Example

For an example, refer to LDicomPrintSCU::GetPrinterInfo.

L_INT LDicomPrintSCU_GetPrinterInfo2Example(LDicomPrintSCU& PrintSCU) 
{ 
   L_INT nRet; 
   // Assume that the Association is already established 
   PRINTERINFO PrinterInfo; 
   // We need only the Printer Status and Printer Status Info 
   memset(&PrinterInfo, 0, sizeof(PRINTERINFO)); 
   PrinterInfo.uStructSize = sizeof(PRINTERINFO); 
   lstrcpy(PrinterInfo.szPrinterStatus, TEXT(" ")); 
   lstrcpy(PrinterInfo.szPrinterStatusInfo, TEXT(" ")); 
   // Query the Print SCP for the information 
   nRet = PrintSCU.GetPrinterInfo(&PrinterInfo, TRUE, FALSE); 
   if(nRet != DICOM_SUCCESS) 
      return nRet; 
   else 
   { 
      // Display the retrieved information 
      nRet = PrintSCU.GetPrinterInfo(&PrinterInfo, sizeof(PRINTERINFO)); 
      if(nRet != DICOM_SUCCESS) 
         return nRet; 
      L_TCHAR szPrinterInfo[256]; 
      wsprintf(szPrinterInfo, TEXT("Printer Status: %s\nPrinter Status Info: %s"), 
      PrinterInfo.szPrinterStatus, PrinterInfo.szPrinterStatusInfo); 
      MessageBox(NULL, szPrinterInfo, TEXT("Printer Info"), MB_OK); 
   } 
   return DICOM_SUCCESS; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS DICOM C++ Class Library Help