none
devcon, wmi, RAS possible race condition RRS feed

  • Question

  • I was told I should try this forum (though why MS itself didn't move it, I don't know):

    Our policies require us to enable networking devices for a given remote machine only as needed. These are cellular and POTS modems of various sorts (though right now limited to Ericsson H5321gw and a USR external USB respectively). In order to ensure that the device is really the first in a RAS phonebook we rewrite phonebook entries as needed as well. It seems somehow there might be a race condition on checking whether or not the modem (of either sort) is enabled and when it is detectable with WMI. We enable through a version of the x64 devcon which has no help (in an attempt to allow it to be distributed). Does anyone know of such a problem? It looks as if device manager actually does not enable a device until perhaps sometime after devcon exits, but not knowing anything about device drivers per se I cannot be sure.

    This is my only guess as to why my "device check and phonebook rewrite code" sometimes does not seem to ever return. Everything else looks simple. If people here are adamant that devcon does wait, then my question has to be - what can make it last minutes enabling? can WMI take 30+ minutes (or more - it was interrupted at that point) to return? Can creating a RasDevice hang somehow? The author of the DotRas library exposed this method just so I could do this rewrite hack, and said it was dangerous - if the device is not actually present, he had no idea what would happen. Any thoughts there? Could that be it?

    Friday, May 24, 2013 4:32 PM

Answers

  • devcon will wait until the pnp stack has been started, but that doesn't mean it will wait for post processing by ras/DUN/etc that may take longer to occur after the pnp start. this really isn't a driver development question though (the purpose of this forum).  you should contact Microsoft support if you need further help.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Saturday, May 25, 2013 2:25 AM

All replies

  • devcon will wait until the pnp stack has been started, but that doesn't mean it will wait for post processing by ras/DUN/etc that may take longer to occur after the pnp start. this really isn't a driver development question though (the purpose of this forum).  you should contact Microsoft support if you need further help.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Saturday, May 25, 2013 2:25 AM
  • Ok, I was told to bring my case here on the off chance the folks here could help. You have told me something I suspected was the case, though and for that and the information about the forum, thanks!
    Monday, May 27, 2013 1:02 PM