Basically, I have an embedded PC with Windows XP Embedded up and running, and
a PC104 extension card which exposes four serial ports through the ISA bus.
Since the device cannot be installed automatically by windows, I wrote a
command line installation application utilizing the SetupDi*-API and the
Configuration Manager API. The four COM Ports must be installed as separate
devices, and the PC's onboard COM ports must be uninstalled before. All these
tasks work well when executed on the finalized system.
I created six FBA generic command directives to run at phases 9498 to 9503.
Each directive calls my application with the appropriate parameters.
However, the first uninstallation fails with the device node not found by
the Configuration Manager. The following five commands succeed.
The uninstallations seemed to need a reboot, so I added one after the second
uninstall.
Now, the first uninstallation AND the first installation fail (the
installation fails being unable to get the class name from the class GUID).
In other words, the first installation/uninstallation after reboot fails due
to the APIs returning unexpected results. The parameters are all correct,
changing the order of the directives still leads to the first directive
failing.
This is only the case if done by the FBA. If done later, no matter if FBA
tried to do this or not, all commands succeed.
Why does the any first device installation/uninstallation after reboot fail
during FBA? Is there any delayed load? An API I need to call at the beginning
of the program?
|