Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jennaric opened this issue Aug 12, 2021 · 12 comments

Comments

@jennaric
Copy link

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

@roshkins
Copy link
Owner

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?

@jennaric
Copy link
Author

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

@roshkins
Copy link
Owner

roshkins commented Aug 12, 2021 via email

@jennaric
Copy link
Author

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

@roshkins
Copy link
Owner

roshkins commented Aug 12, 2021 via email

@jennaric
Copy link
Author

I'm not using WdfFdoQueryForInterface

@jennaric
Copy link
Author

jennaric commented Aug 12, 2021

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

@mr-intj
Copy link

mr-intj commented Aug 26, 2021

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);

@mr-intj
Copy link

mr-intj commented Aug 26, 2021

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.

@jennaric
Copy link
Author

jennaric commented Aug 27, 2021

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

@UMU618
Copy link

UMU618 commented Nov 24, 2022

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

@ZhouHanyu18
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants