Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


DxgkDdiSetPointerPosition not getting called in WDDM Miniport Driver

John_DayJohn_Day Member Posts: 29
Hi all,

We are implementing hardware pointers for a WDDM display driver on Windows 7. In my DxgkDdiSetPointerShape function, I am making copies of the pointer structures and returning STATUS_SUCCESS. But after that I am not seeing calls to DxgkDdiSetPointerPosition. Is there something else I have to do other than return STATUS_SUCCESS in DxgkDdiSetPointerShape? Any ideas why Windows wouldn't call my DxgkDdiSetPointerPosition function?

Thanks

Comments

  • Krzysztof_UchronskiKrzysztof_Uchronski Member - All Emails Posts: 165
    Are you correctly advertising pointer properties in DxgkDdiQueryAdapterInfo?

    Kris

    On Tue, Sep 24, 2013 at 7:38 AM, <[email protected]> wrote:
    > Hi all,
    >
    > We are implementing hardware pointers for a WDDM display driver on Windows 7. In my DxgkDdiSetPointerShape function, I am making copies of the pointer structures and returning STATUS_SUCCESS. But after that I am not seeing calls to DxgkDdiSetPointerPosition. Is there something else I have to do other than return STATUS_SUCCESS in DxgkDdiSetPointerShape? Any ideas why Windows wouldn't call my DxgkDdiSetPointerPosition function?
    >
    > Thanks
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
    >
    > OSR is HIRING!! See http://www.osr.com/careers
    >
    > For our schedule of WDF, WDM, debugging and other seminars visit:
    > http://www.osr.com/seminars
    >
    > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



    --
    Kris
  • John_DayJohn_Day Member Posts: 29
    Krzysztof, Thanks for reply.
    Yes, I am doing it in DxgkDdiQueryAdapterInfo.
    I set the pointer capabilities TRUE for both Mono and Color cursor.
  • Mark_RoddyMark_Roddy Member - All Emails Posts: 4,375
    For my driver I have Mono, color, and masked color all set to 1 plus
    non-zero values for MaxPointerWidth and MaxPointerHeight. I can't actually
    support masked color so I reject the operation in SetPointerShape. I get
    both shape and position callbacks. I think I remember having to set all the
    capabilities to TRUE or I got nothing.

    The user mode driver has to cooperate too.

    Mark Roddy


    On Tue, Sep 24, 2013 at 7:47 AM, wrote:

    > Krzysztof, Thanks for reply.
    > Yes, I am doing it in DxgkDdiQueryAdapterInfo.
    > I set the pointer capabilities TRUE for both Mono and Color cursor.
    >
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
    >
    > OSR is HIRING!! See http://www.osr.com/careers
    >
    > For our schedule of WDF, WDM, debugging and other seminars visit:
    > http://www.osr.com/seminars
    >
    > To unsubscribe, visit the List Server section of OSR Online at
    > http://www.osronline.com/page.cfm?name=ListServer
    >
  • John_DayJohn_Day Member Posts: 29
    Mark,

    Thanks for the valuable info. I'll try these and check what happens.
    Will you be able to clarify these two:

    1) Up to now, I had been setting these values of Mono and Color to "1". Do you say to do something like:
    pDriverCaps->PointerCaps.Monochrome = 1 + MaxPointerWidth + MaxPointerHeight;
    and so on..

    2) "The user mode driver has to cooperate too."
    What extra functionality I need to add to the user mode driver?

    Thanks!
  • Krzysztof_UchronskiKrzysztof_Uchronski Member - All Emails Posts: 165
    On Wed, Sep 25, 2013 at 7:17 AM, <[email protected]> wrote:
    > 1) Up to now, I had been setting these values of Mono and Color to "1". Do you say to do something like:
    > pDriverCaps->PointerCaps.Monochrome = 1 + MaxPointerWidth + MaxPointerHeight;
    > and so on..
    No, he meant that MaxPointerWidth and MaxPointerHeigh need to be set
    to non-zero values *and* Monochrome, Color and MaskedColor flags set.

    > 2) "The user mode driver has to cooperate too."
    > What extra functionality I need to add to the user mode driver?
    It's been a while since I last dealt with full WDDM driver but I'm
    pretty sure that I didn't have to do anything special in UMD just to
    get DxgkDdiSetPointerPosition called.

    Kris

    >
    > Thanks!
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
    >
    > OSR is HIRING!! See http://www.osr.com/careers
    >
    > For our schedule of WDF, WDM, debugging and other seminars visit:
    > http://www.osr.com/seminars
    >
    > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



    --
    Kris
  • John_DayJohn_Day Member Posts: 29
    Kris,

    Thanks a lot for the clarification. I am already setting these values..
    Now the one thing I need to know is "What exactly is needed to be Added/Modified in the User-Mode Driver?"
  • John_DayJohn_Day Member Posts: 29
    Adding to it: I am getting the "pSetPointerPosition->Flags.Visible" 's value as zero. Can anyone guide me on how do i get a "visible" pointer??

    Thanks!
  • Mark_RoddyMark_Roddy Member - All Emails Posts: 4,375
    On Thu, Sep 26, 2013 at 10:29 AM, wrote:

    > SetPointerPosition


    You should return STATUS_SUCCESS from SetPointerPosition regardless of the
    visibility.

    Mark Roddy
  • John_DayJohn_Day Member Posts: 29
    Hi Mark,

    I am already returning STATUS_SUCCESS from SetPointerPosition. Now I have two queries:

    1) What else should be put in the BODY of SetPointerPosition??

    2) You mentioned "The user mode driver has to cooperate too." How? What extra capabilities i need to add to the user mode driver?

    Thanks!
  • Marcel_RuedingerMarcel_Ruedinger Member Posts: 147
    1) Nothing

    2) Not much to do in the User Mode Driver.
    Only 3D caps like e.g. DWORD D3DCAPS9::CursorCaps.
    Not even sure if this is really evaluated
    by Desktop Window Manager.

    Suggestion:
    Start on Win7 with "AERO Transparency Glass Look" switched off.
    Then you don't have to worry about the User Mode Driver.

    Hint:
    I can indeed see a lot of DxgkDdiSetPointerPosition with coordinates 0;0 and visibility set to false upon initial DWM startup after login on Windows 7 while "AERO Transparency Glass Look" switched on (never noticed before). Hope that this is not the source of confusion. Reasonable mouse movements with coordinates and visibility will follow later, after startup of DWM.

    Marcel Ruedinger
    datronicsoft
  • Krzysztof_UchronskiKrzysztof_Uchronski Member - All Emails Posts: 165
    Yeah, I'm not sure if I ever touched CursorCaps either.

    On win8 pointer usually gets invisible (in terms of visibility flag
    being unset, but still visually visible) when moving windows - it was
    for KMDOD driver though (but I'm pretty sure that it was pretty much
    the same case with VBOX WDDM running on win8 as well), I don't recall
    seeing similar behavior on vista/win7.

    Kris

    On Fri, Sep 27, 2013 at 11:57 AM, <[email protected]> wrote:
    > 1) Nothing
    >
    > 2) Not much to do in the User Mode Driver.
    > Only 3D caps like e.g. DWORD D3DCAPS9::CursorCaps.
    > Not even sure if this is really evaluated
    > by Desktop Window Manager.
    >
    > Suggestion:
    > Start on Win7 with "AERO Transparency Glass Look" switched off.
    > Then you don't have to worry about the User Mode Driver.
    >
    > Hint:
    > I can indeed see a lot of DxgkDdiSetPointerPosition with coordinates 0;0 and visibility set to false upon initial DWM startup after login on Windows 7 while "AERO Transparency Glass Look" switched on (never noticed before). Hope that this is not the source of confusion. Reasonable mouse movements with coordinates and visibility will follow later, after startup of DWM.
    >
    > Marcel Ruedinger
    > datronicsoft
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
    >
    > OSR is HIRING!! See http://www.osr.com/careers
    >
    > For our schedule of WDF, WDM, debugging and other seminars visit:
    > http://www.osr.com/seminars
    >
    > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



    --
    Kris
  • Marcel_RuedingerMarcel_Ruedinger Member Posts: 147
    Hardware pointer invisible while dragging windows on Windows 8?
    Probably fixing the old problem of missing sync
    between hardware cursor and screen update
    which caused multiple mouse cursors and
    dragging windows lagging behind the cursor,
    especially on slower (e.g. network connected) displays.

    Marcel Ruedinger
    datronicsoft
  • John_DayJohn_Day Member Posts: 29
    Hi Marcel and Kris,
    Thanks for responding.

    One more observation I'd like to mention is: With the driver loaded, if i log off, i see a bunch of calls (5 to 7) to the SetPointerShape and a few calls to SetPointerPosition. However, once i log in, i don't see any calls to the pointer functions. This all is with "Aero Disabled" so I don't think it is a D3D driver issue.
    Any ideas??

    Thanks!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Internals & Software Drivers 25 Jan 2021 LIVE ONLINE
Developing Minifilters 8 March 2021 LIVE ONLINE