none
Creating and controlling a Mouse Pointer with Display Driver RRS feed

  • Question

  • Hi Community,

    I am working on a kernel mode display driver (WDDM). We were returning "STATUS_NOT_SUPPORTED" from "DxgkDdiSetPointerShape" function which made OS (Windows) to softdraw the cursor for us. But now we want to control the cursor. At this point of time, I have information in bits and pieces but don't have a proper idea on where to start from and how to start. I know "DxgkDdiSetPointerShape" and "DxgkDdiSetPointerPosition" need to be defined substantially (so far, we were returning from the first line itself) with a proper implementation. I looked for some sample code in WDK Samples and internet but couldn't get any. Also, we don't have a section on Pointer Control for WDDM, though it is there for XPDM.

    Are the "Pointer Control" handling implementations same in XPDM and WDDM??

    It would be really appreciable if anyone could suggest/guide me so that I can move ahead...

    Thanks in advance..


    • Edited by deepak_ Monday, September 2, 2013 3:01 PM
    Monday, September 2, 2013 2:58 PM

Answers

  • The docs are pretty clear, you just copy the supplied pointer bitmap to your hardware (in a hardware-specific way). It really is that simple.
    You need to understand how to talk to your hardware and hopefully the hardware was designed properly and allows you to asynchronously update the pointer bitmap and position.

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting.

    • Marked as answer by Doron Holan [MSFT] Tuesday, September 3, 2013 3:49 AM
    • Unmarked as answer by deepak_ Tuesday, September 3, 2013 6:29 AM
    • Marked as answer by Brian CatlinModerator Wednesday, September 4, 2013 7:21 PM
    • Unmarked as answer by deepak_ Thursday, September 5, 2013 5:24 AM
    • Marked as answer by Doron Holan [MSFT] Monday, September 9, 2013 3:35 PM
    Monday, September 2, 2013 9:16 PM
    Moderator

All replies

  • The docs are pretty clear, you just copy the supplied pointer bitmap to your hardware (in a hardware-specific way). It really is that simple.
    You need to understand how to talk to your hardware and hopefully the hardware was designed properly and allows you to asynchronously update the pointer bitmap and position.

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting.

    • Marked as answer by Doron Holan [MSFT] Tuesday, September 3, 2013 3:49 AM
    • Unmarked as answer by deepak_ Tuesday, September 3, 2013 6:29 AM
    • Marked as answer by Brian CatlinModerator Wednesday, September 4, 2013 7:21 PM
    • Unmarked as answer by deepak_ Thursday, September 5, 2013 5:24 AM
    • Marked as answer by Doron Holan [MSFT] Monday, September 9, 2013 3:35 PM
    Monday, September 2, 2013 9:16 PM
    Moderator
  • "The docs are pretty clear"

    Brian,

    Which docs are you referring to??

    And again, Are the "Pointer Control" handling implementations same in XPDM and WDDM??

    Tuesday, September 3, 2013 6:33 AM
  • The WDK docs; http://msdn.microsoft.com/en-us/library/windows/hardware/ff560762(v=vs.85).aspx

    I have written 3 or 4 XPDM drivers and I taught a class in it, but that was many years ago, and I just don't remember off the top of my head. It is, of course, documented in the WDK, which you should be able to find pretty easily.

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting.

    Tuesday, September 3, 2013 6:37 AM
    Moderator
  • Brian, Thanks for responding.

    I am currently referring http://msdn.microsoft.com/en-us/library/windows/hardware/ff569164(v=vs.85).aspx for "Pointer Control" knowledge. But these have been written under XPDM tree if you see the WDK Documentation.

    What I was asking is whether the "Pointer Control" handling is same in XPDM and WDDM as well ??

    Thanks

    Tuesday, September 3, 2013 10:38 AM
  • How could it possibly matter? They are completely different driver models. Just update the shape or location of the pointer in your hardware when you are called back.

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting.

    Tuesday, September 3, 2013 6:53 PM
    Moderator
  • Thanks Brian, for responding all through my queries.

    Anyways, I am going with drawing the pointer first.

    Which function can I use for drawing a pointer?? I am doubtful about " DrvSetPointerShape and DrvMovePointer" as these may be GDI dependent and our driver is a WDDM.

    Community, please comment...

    • Marked as answer by deepak_ Wednesday, September 4, 2013 8:45 AM
    • Unmarked as answer by deepak_ Thursday, September 5, 2013 5:13 AM
    • Edited by deepak_ Thursday, September 5, 2013 5:26 AM
    Wednesday, September 4, 2013 8:45 AM