IMoniker->BindToObject error: HRESULT: 0x80070002 to avscamera driver that is sample from windows driver sample

榮章 林 (Jethro Lin) 0 Reputation points

I use Windows-driver-samples on github to make an original camera driver The compiler environment is used the following combinations

  1. visual studio 2022 and wdk 10.0.22621.382
  2. visual studio 2019 and wdk 10.0.19041
  3. visual studio 2017 and wdk 10.0.17763 And I install the driver on Windows 10 19045 version. I failed to bind the IBasefilter object by "Selecting a Capture Device" with error code 0x80070002.
IBaseFilter *pCap = NULL; 
hr = pMoniker->BindToObject(0, 0, IID_IBaseFilter, (void**)&pCap);
// hr = 0x80070002

But it works on Windows 11 22000 and 22621. How to resolve this problem? I will be grateful for any help.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,780 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 43,996 Reputation points

    Hello there, As the driver sample works in other version I would suggest raise this in feedback hub. Also try this go to Extentions and updates then Search Nuget and uninstall it, restart visual studio, again install Nuget then again restart. you should be able to create your new project. The Feedback Hub app lets you tell Microsoft about any problems you run into while using Windows . You can also send suggestions to help us improve your Windows experience. Send feedback to Microsoft with the Feedback Hub app Hope this resolves your Query !! --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments