roshkins / IddSampleDriver

Add virtual monitors to your windows 10 device! Works with Oculus software, obs, and any desktop sharing software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I tested the driver on Windows 10 version 1709, 1803, 1903, 1909 all have this problem

jennaric opened this issue · comments

i found the iddcxadapterinitasync function returned error code 0xC00000BB STATUS_ NOT_ Supported,
I test the your code directly github.com/roshkins/IddSampleDriver

I don't know why return 0xC00000BB ,Could you give me some help, please? Thank you very much

According to this: https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/building-a-wdf-driver-for-multiple-versions-of-windows it should run on any version 1803+.

Are you running it in a virtual machine or otherwise may not have a display adapter? Do you have a GPU?

Hello I have tested on real computers, virtual machines also tested, graphics card is Intel and NVIDIA, both have this problem

Yes, only the display adapter, but no monitor, so I debug step by step and find that the function returns an error

I'm not using WdfFdoQueryForInterface

Just use the code from your repository and it will appear,and no code has been changed
ddcxadapterinitasync function returned error code 0xC00000BB STATUS_ NOT_ Supported

Here's the code I'm using in my project -- this works for all versions of Windows 10 that you mentioned, so maybe you can compare with your code and see what's different?

/**
 * \brief Creates/initializes the IddCx adapter object and embedded \c CAdapter instance.
 * \details
 *      Called from our \c EVT_WDF_DEVICE_D0_ENTRY event handler (\c CAdapter::OnWdfDeviceD0Entry). Triggers a call to our
 *      \c EVT_IDD_CX_ADAPTER_INIT_FINISHED event handler (\c CAdapter::OnIddCxAdapterInitFinished) after this method returns.
 * \return
 *      \c STATUS_SUCCESS if the operation is successful; otherwise, an appropriate \c NTSTATUS error code.
 * \see CAdapter::Create()
 */
NTSTATUS CAdapter::Initialize()
{
    //////////////////////////////////////////
    // Declare hardware and firmware versions

    IDDCX_ENDPOINT_VERSION endpointVersion{};
    endpointVersion.Size     = sizeof endpointVersion;  // Total size of the structure
    endpointVersion.MajorVer = 2;                       // The major version defined by the driver
    endpointVersion.MinorVer = 0;                       // The minor version defined by the driver
    endpointVersion.Build    = 0;                       // The build number defined by the driver

    /////////////////////////////////////////////////
    // Declare basic feature support for the adapter

    IDDCX_ADAPTER_CAPS capabilities{};
    capabilities.Size                                 = sizeof capabilities;
    capabilities.MaxMonitorsSupported                 = static_cast<UINT>(CMonitor::NUM_CONNECTORS);
    capabilities.EndPointDiagnostics.Size             = sizeof capabilities.EndPointDiagnostics;
    capabilities.EndPointDiagnostics.GammaSupport     = IDDCX_FEATURE_IMPLEMENTATION_NONE;
    capabilities.EndPointDiagnostics.TransmissionType = IDDCX_TRANSMISSION_TYPE_WIRED_OTHER;

    ////////////////////////////////////////
    // Declare device strings for telemetry

    capabilities.EndPointDiagnostics.pEndPointFriendlyName     = L"SpazzCo IddCx Adapter";
    capabilities.EndPointDiagnostics.pEndPointManufacturerName = L"SpazzCo";
    capabilities.EndPointDiagnostics.pEndPointModelName        = L"SpazzCoAdapterModelX";
    capabilities.EndPointDiagnostics.pFirmwareVersion          = &endpointVersion;
    capabilities.EndPointDiagnostics.pHardwareVersion          = &endpointVersion;

    /////////////////////////////////////////////////////////////////////////////////////////////////
    // Initialize a WDF (Windows Driver Frameworks) context that can store an instance of this class

    WDF_OBJECT_ATTRIBUTES attributes{};
    WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, CAdapterPtr);

    /////////////////////////////////////////
    // IddCxAdapterInitAsync input arguments

    IDARG_IN_ADAPTER_INIT initIn{};
    initIn.WdfDevice        = _hWdfDevice;   // The device that will be hosting this WDDM adapter object
    initIn.pCaps            = &capabilities; // Adapter capabilities
    initIn.ObjectAttributes = &attributes;   // Optional object attributes used to initialize the IddCx adapter object

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Start the initialization of the IddCx adapter, which will trigger a call to CAdapter::OnIddCxAdapterInitFinished after this
    // method returns.

    IDARG_OUT_ADAPTER_INIT initOut{};
    auto ntStatus = ::IddCxAdapterInitAsync(&initIn, &initOut);
    if (!NT_SUCCESS(ntStatus))
        TraceError("IddCxAdapterInitAsync failed; %!STATUS!", ntStatus);

Note that I'm defining a CAdapterPtr type so that I can store a pointer to my (wrapper) class in the WDF object:

WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(CAdapterPtr, GetIddCxAdapterCtx) // IDDCX_ADAPTER --> &(CAdapterPtr) --> points to CAdapter

...you may not want/need to do this.

Hope that helps.

Hello, thank you very much for your answer. I have compared them and they are basically the same,It's almost the same

commented

Windows 10 2004 before, need Testing Mode or signed by Microsoft.

i found the iddcxadapterinitasync function returned error code 0xC00000BB STATUS_ NOT_ Supported, I test the your code directly github.com/roshkins/IddSampleDriver

I don't know why return 0xC00000BB ,Could you give me some help, please? Thank you very much

hello,How did you solve the problem?