roshkins / IddSampleDriver

Add virtual monitors to your windows 10 device! Works with Oculus software, obs, and any desktop sharing software
626 stars 249 forks source link

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

Open jennaric opened 3 years ago

jennaric commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

roshkins commented 3 years ago

And no monitor is being displayed in the settings?

On Wed, Aug 11, 2021 at 9:56 PM jennaric @.***> wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/roshkins/IddSampleDriver/issues/4#issuecomment-897348248, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERAHK35WQTH6HONXTU5N3T4NH7XANCNFSM5B75BTFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

jennaric commented 3 years ago

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

roshkins commented 3 years ago

I found https://social.msdn.microsoft.com/Forums/windowshardware/en-US/7d488406-3d56-4fa5-a2ef-fc5921f922d2/wdffdoqueryforinterface-return-error-code-0xc00000bb-which-is-statusnotsupported-hid-miniport , does this help at all?

On Wed, Aug 11, 2021 at 9:58 PM jennaric @.***> wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/roshkins/IddSampleDriver/issues/4#issuecomment-897348947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERAHMHG6D2QDAHXQU5UJ3T4NIIBANCNFSM5B75BTFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

jennaric commented 3 years ago

I'm not using WdfFdoQueryForInterface

jennaric commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

UMU618 commented 1 year ago

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

ZhouHanyu18 commented 1 year ago

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?