Printer driver: Calling EngBitBlt from DrvBitBlt ok to do?

From: Scott Robins (ScottRobins_at_discussions.microsoft.com)
Date: 01/27/05


Date: Thu, 27 Jan 2005 12:05:05 -0800

The printer that my (monolithic, user mode) driver is for doesn't handle
certain raster ops well.

So, in an attempt to improve image quality, I am trying to do more rendering
in my
driver.

My first attempt was to take certain operations and attempt to do them myself,
by creating a bitmap and calling EngBitBlt instead of passing the request to
the printer. Here is a code excerpt from my driver's implementation of
BitBlt:

if (I decide the printer can't handle this rop)
{
    SURFOBJ* psoTmp=NULL;
    HSURF hbmTmp;
    BOOL bSuccess;

    hbmTmp = (HSURF)EngCreateBitmap(sizl, (LONG)sizl.cx, BMF_24BPP, 0, NULL);

    if (hbmTmp != NULL) {
       if ((psoTmp = EngLockSurface((HSURF)hbmTmp)) != NULL) {
       if ((psoSrc->iType == STYPE_BITMAP) && (psoTrg->iType ==
STYPE_DEVICE))
      {
         bSuccess = EngBitBlt(psoTmp, psoSrc, psoMask, pco, pxlo,
                                      prclTrg,pptlSrc,ptlMask, pbo,
pptlBrush, rop4);
         if (!bSuccess) {
             ASSERT(0);
             return(FALSE);
        }
    }
  }
 }
}

My theory is that I'll now take psoTmp and send it to the printer, already
rendered. But, the call to EngBitBlt ALWAYS returns false.

Is this just not possible? I do something *very* similar in my driver's
CopyBits (calling EngCopyBits) and that works.

Any ideas?

Thanks,
ScottR

-- 
Scott Robins
Scott dot Robins at usa dot xerox dot com


Relevant Pages

  • Re: Non-CUPS Printer Drivers on OS X
    ... _if the printer driver was properly CUPS-compliant_. ... Past experience also suggests that setting that printer to be shared ... Actually it's much easier to share PostScript printers than non-PS printers. ... email to oshea dot j dot j at gmail dot com. ...
    (comp.sys.mac.system)
  • Re: Developing a driver targeting both 5.0 and 6.0
    ... I was actually wondering about the dot verisons. ... I guess the idea is to target new hardware folks so ... But if you're a driver developer, or even a WM 5.0 or 6.0 developer who ... It is important to understand that WM versions do not match Windows CE ...
    (microsoft.public.windowsce.embedded)
  • Re: how to install RTL driver for vxwork in X86 architecture
    ... which is stored in D driver of my PC. ... "dyates" home location on the target server. ... Harmonic Software Systems Ltd ... gavin DOT nottage AT harmonicss DOT co DOT uk ...
    (comp.os.vxworks)
  • Re: LCD monitor - missing OSD
    ... Your link goes to their dedicated support site ... was no help and it refused to load the 100B2 driver. ... standard resolution in XP, the nVidia Control Panel ... j dot mccartney atte blueyonder dot co dot uk ...
    (comp.sys.acorn.hardware)