Looking for the simplest method to send some bytes from mirror display driver to application?

Discussion in 'Windows Vista Drivers' started by lucy, Aug 23, 2004.

  1. lucy

    lucy Guest

    Hi all,

    I have tried to compile and run the MS DDK sample mirror display driver. My
    purpose is to get some bytes of data from the GDIINFO out to send to the
    application.

    I understand that the mirror display driver runs in kernel mode and my
    application runs in user mode.

    I want the mirror driver to either write to a file, or store the information
    somewhere in the Windows memory. Then my application, upon lauching, can
    query that information.

    The information is only several bytes; and my application just needs to
    query the information not very frequently, as long as the display hardware
    does not change.

    So is there any simple way of programming to get that information out of the
    mirror driver?

    Thanks a lot,

    -Lucy
     
    lucy, Aug 23, 2004
    #1
    1. Advertisements

  2. lucy

    Calvin Guan Guest

    I think custom escape(s) is the way to go.
     
    Calvin Guan, Aug 23, 2004
    #2
    1. Advertisements

  3. lucy

    lucy Guest

    Hi Calvin,

    Can I use global variable in mirror driver?

    The information I want is in DrvEnablePDEV, but the DrvEscape is another
    function, how can I transfer values?

    Thanks a lot
     
    lucy, Aug 23, 2004
    #3
  4. lucy

    Calvin Guan Guest

    Yes, you can.
    -
    Calvin Guan Software Engineer
    ATI Technologies Inc. www.ati.com
     
    Calvin Guan, Aug 23, 2004
    #4
  5. lucy

    Brian Catlin Guest

    Be careful with global variables in display (mirror) drivers!!! The will be
    allocated in session space - not system-wide memory. This means that the
    variables will only be available when the session is mapped. For your
    application, this probably won't be a problem, but I've had students who have
    run into this problem, when they try to access global variables that were
    defined in a different session

    -Brian

    Brian Catlin, Sannas Consulting 310-944-9492
    Windows Network, Video, WDM Device Driver Training & Consulting
    See WWW.AZIUS.COM.bad for courses and scheduling
    REMOVE .BAD FROM EMAIL AND WEB ADDRESS
     
    Brian Catlin, Aug 23, 2004
    #5
  6. lucy

    Calvin Guan Guest

    Good point. I think at the point driver's DrvEscape got called by win32k,
    the session space is valid.

    Thanks,
    Calvin
    -
    Calvin Guan Software Engineer
    ATI Technologies Inc. www.ati.com
     
    Calvin Guan, Aug 23, 2004
    #6
  7. lucy

    Brian Catlin Guest

    Sure, but if the variable was set during driver initialization, then it won't be

    -Brian

    Brian Catlin, Sannas Consulting 310-944-9492
    Windows Network, Video, WDM Device Driver Training & Consulting
    See WWW.AZIUS.COM.bad for courses and scheduling
    REMOVE .BAD FROM EMAIL AND WEB ADDRESS
     
    Brian Catlin, Aug 23, 2004
    #7
  8. lucy

    lucy Guest

    Ah, that's a big problem. Because I am exactly going to store some GDIINFO
    information into this global variable during driver initialization... then
    fetch it using DrvEscape function...

    Is that the problem you've mentioned?

    Thank you very much,

    -Lucy
     
    lucy, Aug 23, 2004
    #8
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.