none
NDIS miniport state query from application level RRS feed

  • Question

  • Hi,

    We have a scripted automation used for testing our device. Is there a robust way to know when the device is being enabled and disabled? Relying on the devcon doesn't seem to be very reliable since it appears to be not in exact sync with the actual miniport state. We can add a proprietary event from miniport driver on enable but it's not possible for disable since the disable operation completes later, causing races with our automation.

    Thanks

    Wednesday, March 26, 2014 8:57 AM

Answers

  • Sure, just call SetupDi API to enumerate your device. If you find the device, check its state (a.k.a. "Problem code"): if it is 0, the device is up and running, some other values mean device disabled, etc.  Then try to open (CreateFile) your backdoor devices if any...

    -- pa

    Wednesday, March 26, 2014 3:48 PM