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, then it will be assumed that 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.

> 0

An error occurred. Refer to Return Codes.

Comments

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

The function LDicomPrintSCU::GetPrinterInfo(pPrinterInfo, uStructSize) can be used to obtain the printer information retrieved from the Print SCP.

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

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 parameters bBasicPrintManagement and bColorPrintManagement recommend the Meta SOP Class to be specified 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 parameter bBasicPrintManagement selects between the Basic Print Management Meta SOP Classes and the Pull Stored Print Management Meta SOP Class, while the parameter bColorPrintManagement selects between the Basic Grayscale Print Management Meta SOP Class and the Basic Color Print Management Meta SOP Class.

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

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.