Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS DICOM C++ Class Library Help

LDicomPrintSCU::GetPrinterInfo

Show in webframe

#include "ltdic.h"

L_INT LDicomPrintSCU::GetPrinterInfo(pPrinterInfo, uStructSize) const

pPRINTERINFO pPrinterInfo;

/* Printer information */

L_UINT uStructSize;

/* size of the structure */

Fills the members of the specified PRINTERINFO structure with the printer information retrieved previously from the Print SCP.

Parameter

Description

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 function was successful.

<> 0

An error occurred. Refer to Return Codes.

Comments

The Print SCP can be queried for printer information using the function LDicomPrintSCU::GetPrinterInfo. Once the information is retrieved successfully, the function GetPrinterInfo can then be used to obtain the information sent by the Print SCP.

If an Attribute was not included in the response of the Print SCP, the corresponding structure member will be set to an empty string.

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

Topics:

Print Management SCU

 

DICOM Print Management Service Class User: Functions

Example

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;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.