why didn't DrvLineTo in mirror driver get called

Discussion in 'Windows Vista Drivers' started by lee, Jul 9, 2005.

  1. lee

    lee Guest


    I'm working on a project in which we are trying to capture all GDI
    calls and send them to a user-mode application. I thought that a mirror
    driver could do so. I installed the windows DDK mirror driver and
    modified it a little bit. it works fine. I found that the functions in
    mirror driver, such as, DrvTextOut, DrvBitBlt, DrvStrokePath, got
    called. But when I implemented the DrvLineTo function in mirror driver,
    I got stuck. I put DrvLineTo index/address pair in the driver function
    table in enable.c, also in enable.c, I wrote a simple function
    DrvLineTo that just stores the function name and parameters in a buffer
    and return TRUE.
    In a user-mode application, I draw a line using LineTo function, and
    debug the mirror driver with WINDBG. I found other Drvfunctions, such
    as DrvBitBlt and DrvTextOut were called, but DrvLineTo in Mirror Driver
    was never called.

    Does any driver guru help me out? I really appreciate any suggestions.
    lee, Jul 9, 2005
    1. Advertisements

  2. I'm not familiar with the DDK sample, but, as a first shot,
    did you add the HOOK_LINETO flag ?

    Without that, you should have received a DvrCopyBits call with the
    invalidated area coming from LineTo.
    Ivan Brugiolo [MSFT], Jul 10, 2005
    1. Advertisements

  3. lee

    lee Guest

    Hi Ivan,

    Thank you so much for your reply! No, I did not add HOOK_LINETO flag.
    It's true that DrvCopyBits was called. Maybe It's the reason. Could you
    please tell me where I should add the HOOK_LINETO flag if you happen
    know it?

    Thank you very much,
    lee, Jul 10, 2005
  4. lee

    lee Guest

    Hi Ivan,

    Thanks so much for your suggestion. You're right. I added the
    HOOK_LINETO flag. Now it works.

    lee, Jul 10, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?
