iddcx uses IddCxMonitorSetupHardwareCursor to report an error

兵 严 0 Reputation points
2023-04-05T11:25:33.83+00:00

system:windows11 development tools:Visual Studio 2019 iddcx Version:1.4 The reference code is as follows, Run the code and report an error:NewMonitorArrives IddCxMonitorSetupHardwareCursor Fail 0xc000000d(STATUS_INVALID_PARAMETER). May I ask how to use the IddCxMonitorSetupHardwareCursor() function correctly to configure successfully.

Status = IddCxMonitorArrival(MonitorCreateOut.MonitorObject, &ArrivalOut);

if (NT_SUCCESS(Status))

{

    IDARG_IN_SETUP_HWCURSOR cursorArgs;

    ZeroMemory(&cursorArgs, sizeof(cursorArgs));

    cursorArgs.hNewCursorDataAvailable = NULL; //CreateEvent(NULL, TRUE, FALSE, _T("iddCursorDataAvailable"));

    cursorArgs.CursorInfo.Size = sizeof(IDDCX_CURSOR_CAPS);

    cursorArgs.CursorInfo.ColorXorCursorSupport = IDDCX_XOR_CURSOR_SUPPORT_NONE;

    cursorArgs.CursorInfo.AlphaCursorSupport = true;

    cursorArgs.CursorInfo.MaxX = 128;

    cursorArgs.CursorInfo.MaxY = 128;

    Status = IddCxMonitorSetupHardwareCursor(MonitorCreateOut.MonitorObject, &cursorArgs);

    if (NT_SUCCESS(Status))

    {

        KdPrint(("%!FUNC! IddCxMonitorSetupHardwareCursor ok \n"));

    }

    else

    {

        KdPrint(("%!FUNC! IddCxMonitorSetupHardwareCursor Fail %!STATUS!", Status));

    }

}
Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,557 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,426 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,001 Reputation points
    2023-04-06T14:01:46.7566667+00:00

    Hello there, IddCxMonitorSetupHardwareCursor returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method may return an appropriate NTSTATUS error code. iddcx.h header https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/iddcx/ An IDDCX_MONITOR object which is the monitor's OS context handle created by IddCxMonitorCreate. https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/iddcx/nf-iddcx-iddcxmonitorsetuphardwarecursor Hope this resolves your Query !! --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments