L_PrnUninstallPrinter

#include "Ltprinter.h"

L_LTPRINTER_API L_INT EXT_FUNCTION L_PrnUninstallPrinter(pPrnInfo)

PRNPRINTERINFO * pPrnInfo;

/* pointer to a structure */

Uninstalls the LEADTOOLS Virtual Printer Driver from the system.

Parameter

Description

pPrnInfo

Pointer to the PRNPRINTERINFO structure that contains the LEADTOOLS Virtual Printer Driver information that was used in installing it to the system.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Fill the uStructSize, pszMonitorName, pszPortName, and pszDriverName members of the pPrnInfo parameter with valid data.

This function removes all printers that use the driver name in the pszDriverName member of the pPrnInfo parameter.

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 Virtual Printer Driver Application.

See Also

Functions:

L_PrnLockPrinter, L_PrnUnlockPrinter, L_PrnInstallPrinter

Topics:

LEADTOOLS Virtual Printer: Installing and Uninstalling LEADTOOLS Virtual Printer Drivers

 

Working with the LEADTOOLS Virtual Printer Driver

Example

L_LTPRINTERTEX_API  L_INT UninstallPrinter()
{
   PRNPRINTERINFO PrnInfo;
   memset(&PrnInfo, 0, sizeof(PRNPRINTERINFO));
   PrnInfo.uStructSize=sizeof(PRNPRINTERINFO);
   PrnInfo.pszDriverName= TEXT("TEST LEADTOOLS Printer DRIVER");
   PrnInfo.pszPrinterName= TEXT("TEST LEADTOOLS Printer");
   PrnInfo.pszMonitorName = NULL;
   PrnInfo.pszPortName = NULL;

   L_INT nRet = L_PrnUninstallPrinter(&PrnInfo );
   return nRet;
}