microsoft / Network-Adapter-Class-Extension

Network Adapter Class Extension to WDF (NetAdapter Cx) makes it easy to write high quality and high speed drivers for Network Interface Controllers
MIT License
54 stars 17 forks source link

NetAdapterStart fails with status 0xc0000001 #8

Closed dapaulid closed 4 years ago

dapaulid commented 4 years ago

I followed the instructions and the RtEthSample code to implement a NetAdapter client in my WDF driver. The adapter is created successfully and I can see the corresponding network connection in the control panel.

The problem is that when I call NetAdapterStart from my EvtDevicePrepareHardware handler, it fails with status 0xc0000001.

Now, I'm not sure if I got everything correct when setting the adapter's capabilities using NetAdapterSetLinkLayerCapabilities and friends, so I left the stuff out where I'm unsure.

Therefore I wonder, are there any preconditions that must be met before calling NetAdapterStart other than passing a valid handle from NetAdapterCreate?

dapaulid commented 4 years ago

Calling NetAdapterSetDataPathCapabilities before NetAdapterStart solved my issue. Credits to @tylerretzlaff.