Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

DxgkDdiSetPointerPosition routine

The DxgkDdiSetPointerPosition function sets the location and visibility state of the mouse pointer.



NTSTATUS APIENTRY DxgkDdiSetPointerPosition(
  _In_ const HANDLE                     hAdapter,
  _In_ const DXGKARG_SETPOINTERPOSITION *pSetPointerPosition
{ ... }


hAdapter [in]

[in] A handle to a context block that is associated with a display adapter. The display miniport driver previously provided this handle to the Microsoft DirectX graphics kernel subsystem in the MiniportDeviceContext output parameter of the DxgkDdiAddDevice function.

pSetPointerPosition [in]

[in] A pointer to a DXGKARG_SETPOINTERPOSITION structure that describes where and how to display the mouse pointer.

Return value

DxgkDdiSetPointerPosition returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h.


The DirectX graphics kernel subsystem calls the display miniport driver's DxgkDdiSetPointerPosition function to set the location of the mouse pointer. The DxgkDdiSetPointerPosition function is called independently of all of the other display miniport driver functions. Therefore, a DxgkDdiSetPointerPosition thread can run simultaneously with another display miniport driver thread. However, the system ensures that DxgkDdiSetPointerPosition and DxgkDdiSetPointerShape threads cannot run simultaneously.

If you run a DxgkDdiSetPointerPosition thread simultaneously with another display miniport driver thread, the display miniport driver should be able to program the mouse pointer hardware independently of other activities, such as operations that send a command buffer through direct memory access (DMA) to the graphics hardware, operations that program the graphics hardware by using memory-mapped I/O (MMIO), and so on.

DxgkDdiSetPointerPosition can be called even if the video present network (VidPN) topology that is associated with the VidPnSourceId member of the DXGKARG_SETPOINTERPOSITION structure that the pSetPointerPosition parameter points to is disabled. In this case, the driver should return STATUS_SUCCESS but should make no changes to the state of the driver or hardware.

DxgkDdiSetPointerPosition should be made pageable.


Target platform



Available in Windows Vista and later versions of the Windows operating systems.


D3dkmddi.h (include D3dkmddi.h)



See also




Send comments about this topic to Microsoft

© 2015 Microsoft