Include
#include "Ltprinter.h"
Syntax
L_LTPRINTER_API L_INT EXT_FUNCTION L_PrnGetPrinterInfo(pszPrinterName, pPrnInfo)
L_WCHAR * pszPrinterName; | /* name of the printer */ | |
PRNPRINTERINFO * pPrnInfo; | /* pointer to PRNPRINTERINFO structure to be updated with the printer information of the specified printer */ |
Summary
Gets the information about the LEADTOOLS Virtual Printer from the system.
Parameters
Parameter | Description | |
---|---|---|
pszPrinterName | Character string containing the name of the LEADTOOLS Virtual Printer. | |
pPrnInfo | Pointer to the PRNPRINTERINFO structure containing the information that was used when the LEADTOOLS Virtual Printer was installed on the system. |
Returns
SUCCESS | The function was successful. | |
< 1 | An error occurred. Refer to Return Codes. |
Remarks
L_PrnGetPrinterInfo does not fill the pPrnInfo.pszPassword member. The password is always returned as NULL.
When the information in PRNPRINTERINFO is no longer needed, be sure to call L_PrnFreePrinterInfo to free the allocated memory.
Required DLLs and Libraries
LTPRINTER
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your LEADTOOLS Network Virtual Printer Driver Server Application.
Win32, x64.
Example
L_INT GetPrinterinfoExample()
{
L_BOOL bLEADTOOLSPrinter = FALSE;
L_INT nRet = L_PrnIsLeadtoolsPrinter(TEXT("TEST LEADTOOLS Printer"), &bLEADTOOLSPrinter);
if(nRet != SUCCESS)
return nRet;
if(bLEADTOOLSPrinter == TRUE)
{
PRNPRINTERINFO info;
memset(&info, 0, sizeof(PRNPRINTERINFO));
info.uStructSize=sizeof(PRNPRINTERINFO);
// Get the printer info
nRet = L_PrnGetPrinterInfo(TEXT("TEST LEADTOOLS Printer"), &info);
if(nRet != SUCCESS)
return nRet;
// Display the Printer EXE
MessageBox(0, info.pszPrinterExe, TEXT("TEST LEADTOOLS Printer"), 0);
// Free the printer info struct
L_PrnFreePrinterInfo(&info);
}
return nRet;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET