'devcon remove' cannot remove device which is not present

Discussion in 'Windows Vista Drivers' started by Kevin, Aug 5, 2004.

  1. Kevin

    Kevin Guest

    I have a Cardbus Wireless Adapter installed on my Notebook. When it is
    unplugged from the Notebook, I run 'devcon remove [Hardware ID]'. It prompts
    'No Devices removed.'

    For this case, how can I remove those devices that are not present in the PC?

    Any comment is appreaciated.

    Kevin, Aug 5, 2004
    1. Advertisements

  2. Kevin

    Chris Guest

    devcon calls SetupDiGetClassDevs() with the DIGCF_PRESENT flag. This causes
    it to only enumerate present devices. If want to modify devcon, check out
    the call to EnumerateDevices() in cmdRemove(), located in cmds.cpp; You
    should change DIGCF_PRESENT to 0.

    Chris, Aug 5, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.