Npcap installation failure with error code 0x80070006 (ERROR_INVALID_HANDLE)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 592
- PR merge metrics
- No merged PRs in 30d
Description
A customer has reported Npcap fails to install with the error 0x80070006. Logs show that the driver installation via SetupAPI succeeds (no errors in SetupAPI.dev.log), but the installation/binding as a NDIS LWF via the NetCfg API fails. OS is Microsoft Windows 10 Enterprise 2016 LTSB, build 14393, x86_64.
Relevant portion of NPFInstall.log:
[0000248C] 2022-04-07 13:17:04 --> wmain
[0000248C] 2022-04-07 13:17:04 _tmain: executing, argv[0] = C:\Program Files\Npcap\NPFInstall.exe.
[0000248C] 2022-04-07 13:17:04 _tmain: executing, argv[1] = -n.
[0000248C] 2022-04-07 13:17:04 _tmain: executing, argv[2] = -i.
[0000248C] 2022-04-07 13:17:05 --> InstallDriver
[0000248C] 2022-04-07 13:17:05 --> GetServiceInfFilePath
[0000248C] 2022-04-07 13:17:05 lpFilename = C:\Program Files\Npcap\NPCAP.inf
[0000248C] 2022-04-07 13:17:05 <-- GetServiceInfFilePath
[0000248C] 2022-04-07 13:17:05 --> InstallSpecifiedComponent
[0000248C] 2022-04-07 13:17:05 --> HrGetINetCfg
[0000248C] 2022-04-07 13:17:05 <-- HrGetINetCfg
[0000248C] 2022-04-07 13:17:05 --> HrInstallNetComponent
[0000248C] 2022-04-07 13:17:05 bWiFiService = 0.
[0000248C] 2022-04-07 13:17:05 HrInstallComponent: executing, szComponentId = INSECURE_NPCAP.
[0000248C] 2022-04-07 13:17:05 --> HrInstallComponent
[0000248C] 2022-04-07 13:17:06 INetCfgClassSetup::Install: error, szComponentId = INSECURE_NPCAP.
[0000248C] 2022-04-07 13:17:06 <-- HrInstallComponent
[0000248C] 2022-04-07 13:17:06 HrInstallComponent: error, szComponentId = INSECURE_NPCAP.
[0000248C] 2022-04-07 13:17:06 <-- HrInstallNetComponent
[0000248C] 2022-04-07 13:17:06 Error 0x80070006: Couldn't install the network component.
Possible cause:
Das Handle ist ungültig.
[0000248C] 2022-04-07 13:17:06 --> HrReleaseINetCfg
[0000248C] 2022-04-07 13:17:06 <-- HrReleaseINetCfg
[0000248C] 2022-04-07 13:17:06 <-- InstallSpecifiedComponent
[0000248C] 2022-04-07 13:17:06 Error 0x80070006: InstallSpecifiedComponent
Possible cause:
Das Handle ist ungültig.
[0000248C] 2022-04-07 13:17:06 <-- InstallDriver
[0000248C] 2022-04-07 13:17:06 _tmain: error, nStatus = -2147024890.
[0000248C] 2022-04-07 13:17:06 <-- wmain
Previously, we were unable to further diagnose problems like this because NetCfg does not provide a text log or event log entries. However, we have identified a way to use performance tracing to produce a log of NetCfg internals (posted below as comment). Unfortunately, we have so far not identified the reason for the error. Here are the relevant results from the most recent API call that failed:
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15627.833" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupSetObjectProperties"
FormattedMessage="Begin API NetSetupSetObjectProperties on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/Operation/Start" TimeMsec="15627.848" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084" OperationType="Modify object" ObjectType="NDIS light-weight filter driver" ObjectId="7daf2ac8-e9f6-4765-a842-f1f5d2501341" PropertyBuffer="01100800CCCCCCCCB000000000000000..."
FormattedMessage="Begin operation Modify object on NDIS light-weight filter driver in transaction e931c741-3daf-48bd-b2de-a820abab1084: 7daf2ac8-e9f6-4765-a842-f1f5d2501341 on 192:01100800CCCCCCCCB000000000000000... " />
<Event EventName="Microsoft-Windows-Network-Setup/Plugincallback/Start" TimeMsec="15628.749" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084" PluginId="-939,524,096" PluginName="Compatibility key projections"
Api="ObjectEventSink::OnModifyObject"
FormattedMessage="Begin calling into plugin Compatibility key projections " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15628.752" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupInitialize"
FormattedMessage="Begin API NetSetupInitialize on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15628.754" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.002" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupInitialize" Code="0"
FormattedMessage="End API NetSetupInitialize on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15628.756" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupGetObjects"
FormattedMessage="Begin API NetSetupGetObjects on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15628.761" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.005" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupGetObjects" Code="0"
FormattedMessage="End API NetSetupGetObjects on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15628.763" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="00000000-0000-0000-0000-000000000000"
Api="NetSetupFreeObjects"
FormattedMessage="Begin API NetSetupFreeObjects on transaction 00000000-0000-0000-0000-000000000000 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15628.766" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.002" TransactionGuid="00000000-0000-0000-0000-000000000000"
Api="NetSetupFreeObjects" Code="0"
FormattedMessage="End API NetSetupFreeObjects on transaction 00000000-0000-0000-0000-000000000000 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15628.779" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupGetObjectProperties"
FormattedMessage="Begin API NetSetupGetObjectProperties on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15628.785" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.005" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupGetObjectProperties" Code="0"
FormattedMessage="End API NetSetupGetObjectProperties on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15628.787" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="00000000-0000-0000-0000-000000000000"
Api="NetSetupFreeObjectProperties"
FormattedMessage="Begin API NetSetupFreeObjectProperties on transaction 00000000-0000-0000-0000-000000000000 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15628.789" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.002" TransactionGuid="00000000-0000-0000-0000-000000000000"
Api="NetSetupFreeObjectProperties" Code="0"
FormattedMessage="End API NetSetupFreeObjectProperties on transaction 00000000-0000-0000-0000-000000000000 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15629.606" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupGetObjectProperties"
FormattedMessage="Begin API NetSetupGetObjectProperties on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15629.618" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.012" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupGetObjectProperties" Code="0"
FormattedMessage="End API NetSetupGetObjectProperties on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15629.621" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="00000000-0000-0000-0000-000000000000"
Api="NetSetupFreeObjectProperties"
FormattedMessage="Begin API NetSetupFreeObjectProperties on transaction 00000000-0000-0000-0000-000000000000 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15629.623" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.002" TransactionGuid="00000000-0000-0000-0000-000000000000"
Api="NetSetupFreeObjectProperties" Code="0"
FormattedMessage="End API NetSetupFreeObjectProperties on transaction 00000000-0000-0000-0000-000000000000 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15629.625" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupGetObjectProperties"
FormattedMessage="Begin API NetSetupGetObjectProperties on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15629.631" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.006" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupGetObjectProperties" Code="0"
FormattedMessage="End API NetSetupGetObjectProperties on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15629.633" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="00000000-0000-0000-0000-000000000000"
Api="NetSetupFreeObjectProperties"
FormattedMessage="Begin API NetSetupFreeObjectProperties on transaction 00000000-0000-0000-0000-000000000000 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15629.635" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.002" TransactionGuid="00000000-0000-0000-0000-000000000000"
Api="NetSetupFreeObjectProperties" Code="0"
FormattedMessage="End API NetSetupFreeObjectProperties on transaction 00000000-0000-0000-0000-000000000000 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15629.638" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupGetObjectProperties"
FormattedMessage="Begin API NetSetupGetObjectProperties on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15629.643" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.005" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupGetObjectProperties" Code="0"
FormattedMessage="End API NetSetupGetObjectProperties on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15629.645" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="00000000-0000-0000-0000-000000000000"
Api="NetSetupFreeObjectProperties"
FormattedMessage="Begin API NetSetupFreeObjectProperties on transaction 00000000-0000-0000-0000-000000000000 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15629.647" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.002" TransactionGuid="00000000-0000-0000-0000-000000000000"
Api="NetSetupFreeObjectProperties" Code="0"
FormattedMessage="End API NetSetupFreeObjectProperties on transaction 00000000-0000-0000-0000-000000000000 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Start" TimeMsec="15630.195" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupClose"
FormattedMessage="Begin API NetSetupClose on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15630.198" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="0.003" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupClose" Code="0"
FormattedMessage="End API NetSetupClose on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
<Event EventName="Microsoft-Windows-Network-Setup/Plugincallback/Stop" TimeMsec="15630.201" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="1.452" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084" Output="0" Code="-2,147,418,113"
FormattedMessage="End calling into plugin " />
<Event EventName="Microsoft-Windows-Network-Setup/Operation/Stop" TimeMsec="15630.336" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" DURATION_MSEC="2.488" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084" Code="-2,147,024,890"
FormattedMessage="Operation e931c741-3daf-48bd-b2de-a820abab1084 ended with code -2,147,024,890 " />
<Event EventName="Microsoft-Windows-Network-Setup/ExternalAPI/Stop" TimeMsec="15630.372" ProcessName="Process(1624) (1624)" ThreadID="8,604" ProcessorNumber="1" TransactionGuid="e931c741-3daf-48bd-b2de-a820abab1084"
Api="NetSetupSetObjectProperties" Code="-2,147,024,890"
FormattedMessage="End API NetSetupSetObjectProperties on transaction e931c741-3daf-48bd-b2de-a820abab1084 " />
So the error stack appears to be:
- Plugin "Compatibility key projections"
ObjectEventSink::OnModifyObjectreturns -2,147,418,113, which is 0x8000ffff E_UNEXPECTED "Catastrophic failure" - Operation "Modify object" on NDIS LWF (Npcap, as evidenced by a dump of the OperationStart event) returns -2,147,024,890, which is 0x80070006 ERROR_INVALID_HANDLE, "The handle is invalid"
- NetSetupSetObjectProperties propagates the ERROR_INVALID_HANDLE up the stack to the INetCfgSetupClass::Install method, where we get the error in our installer.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with NPFInstall.exe, NPCAP.inf, NPFInstall.log, and the SetupAPI.dev.log context, then trace the NetCfg calls around HrGetINetCfg and HrInstallNetComponent. Use the posted Network-Setup performance trace to investigate the failing NetCfg operation; done means identifying and fixing the cause of error 0x80070006 and verifying installation on the reported Windows 10 build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100