Hi All & Thomas (Devine),
I thought I would resurrect this topic since I spent at least 8 hours
trying to track down a bug related to it, and I did a search on the
Internet and found nothing about it, and frankly, I am surprised that
no one else has mentioned the problem.
I decided to use PROTINSTALL from (http://www.ndis.com/papers/
ndisinstall/programinstall.htm) to install my NDIS protocol driver.
Instead of building the application as is, I decided to integrate the
source code into my own application. Thereafter there were many
crashes during the InetCfg->Apply() method, which baffled me, because
I checked each line of code carefully to make sure I was not doing
anything wrong. I read perhaps 30% of Setup API documentation until I
realized that that was unnecessary, that the problem must be with my
code, or global variable in Setup DLL being trampled, etc. I used
BindView, and it did not crash. I compiled a virgin PROTINSTALL and
got a few warnings during compilation, but it built, then it crashed
too in InetCfg->Apply(). I labored at this until I found...
DAMNIT...SETUPAPI.DLL generates spurious exceptions that are caught by
the GUI message pump in BindView but otherwise not. So PROTINSTALL,
which does not invoke InetCfg->Apply() through message pump chain will
crash, as will my application, but not BindView.
Thomas, were you aware of this? Note that Apply() is not the only
SETUPAPI.DLL that generates exceptions. I counted at least 8 being
generated during debug session.
I was testing on Windows XP with all service packs to date.
-Le Chaud Lapin-