GetPrinterType VC++ Example
void CEPrintDemoView::OnGetPrinterType()
{
//This example gets a printer type
IEPrint * pLeadPrnt;
HRESULT hr;
hr = ::CoCreateInstance(CLSID_EPrint, NULL, CLSCTX_ALL, IID_IEPrint, (void**) &pLeadPrnt);
if(FAILED(hr))
return;
if(pLeadPrnt->GetPrinterType("LEADTOOLS ePrint 5") == PRINTER_NORMAL)
{
MessageBox("NORMAL PRINTER");
}
if(pLeadPrnt)
{
pLeadPrnt->Release();
pLeadPrnt = NULL;
}
}