RE: DxgkDdiSetPointerPosition not getting called in WDDM Miniport Driver

Hello again !!

I have been looking for so long regarding this but could not get any clues. Still the pointer functions are not getting called properly. No calls after logging in.
Even MSDN has minimal documentation and no sample code for these.

I got R200 Sample which came with WDK6000 just to get some more info on the implementation. There a function named “SetPointerShape” has been called from “DxgkDdiSetPointerShape” and the definition for that is (probably) put in some library as I could not find it in the code. The same is true for DxgkDdiSetPointerPosition.

What exactly the body/implementation of DxgkDdiSetPointerShape and DxgkDdiSetPointerPosition constitutes??
As Marcel suggested, I have not put anything in the body of DxgkDdiSetPointerPosition.
What about DxgkDdiSetPointerShape’s body??

On Wed, Oct 30, 2013 at 10:27 AM, wrote:

> DxgkDdiSetPointerShape

Return STATUS_SUCCESS if you handled the pointer shape "in hardware’ else
return STATUS_NOT_SUPPORTED indicating that windows should use a software
cursor for this shape.

DxgkDdiSetPointerPosition

Do whatever is appropriate to turn on/off your hardware pointer as directed
by pSetPointerPosition->Flags.Visible.
If appropriate do something with the x/y VidPnSourceId position values.
Return STATUS_SUCCESS.

Mark Roddy

Mark, Thanks for your reply.

DxgkDdiSetPointerShape
Can you please elaborate a bit on “handling the pointer shape in hardware”?
I’m sorry if this is a fundamental question but neither MSDN nor any other forums/guys are showing up more details on it.
Actually we don’t want a software cursor so this hardware cursors is what we need.

DxgkDdiSetPointerPosition
Up to now, I had been simply returning STATUS_SUCCESS from DxgkDdiSetPointerPosition as *Marcel Ruedinger* suggested in my previous post.
I also tried to change the visibility of the pointer by changing “pSetPointerPosition->Flags.Visible” but was not allowed to do so as compiler errors were coming.

  1. I can’t elaborate on “handling the pointer shape in hardware” because
    that entirely depends on you hardware. My “hardware” is X on linux and it
    can’t handle “xor cursors” or color cursors so we make those software.
  2. If you don’t turn your hardware cursor off when windows tells you to you
    will have more cursors than you should have. Conversely if you don’t turn
    on the cursor when windows tells you to, you will have fewer cursors than
    your should have. pSetPointerPosition->Flags.Visible is not a value you
    write it is a value you read, it is an instruction to your driver telling
    you to do whatever is appropriate for your hardware to turn off the cursor
    or turn it back on.

Mark Roddy

On Thu, Oct 31, 2013 at 6:22 AM, wrote:

> Mark, Thanks for your reply.
>
> >DxgkDdiSetPointerShape
> Can you please elaborate a bit on “handling the pointer shape in hardware”?
> I’m sorry if this is a fundamental question but neither MSDN nor any other
> forums/guys are showing up more details on it.
> Actually we don’t want a software cursor so this hardware cursors is what
> we need.
>
>
> >DxgkDdiSetPointerPosition
> Up to now, I had been simply returning STATUS_SUCCESS from
> DxgkDdiSetPointerPosition as Marcel Ruedinger suggested in my previous
> post.
> I also tried to change the visibility of the pointer by changing
> “pSetPointerPosition->Flags.Visible” but was not allowed to do so as
> compiler errors were coming.
>
> —
> 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
>

Mark, Thanks again for the explanation.

So if pSetPointerPosition->Flags.Visible is set to zero, pointer should be hidden and if set to 1, pointer should be shown. I guess this is what you mean, right?

One question which came to my mind about hardware pointers: In case of a virtual WDDM driver where no real hardware is present,
Can a virtual WDDM driver have a hardware pointer or not?