Hi,

we have the problem that on a WindowsCE 5.0 system (not WindowsMobile) the
driver for a PCMCIA-based smartcard reader is sometimes not loaded. Most of
the time it works well, but on some occasions the driver's dll isn't loaded
during system startup (either reset or wake from suspend). When it did load
during startup the driver keeps working just fine.

We've tracked it down to the fact the the PCMCIA card is still recognized by
the system (it finds the cards name in the registry) but the driver's dll
isn't loaded - no call to XXX_Init, not even loading of the DLLs main entry
point. As far as we understand, pcmcia.dll does a LoadDriver/loadLibrary on
the readers driver-dll and that simply never happens - or it doesn't
succeed.

To track it down we've written a tool to load the driver manually.
In cases where the driver does not load at all ActivateDeviceEx returns
with GetLastError==2 which is a strange error result!!!!

Of course the drivers dll is still in \Windows and a LoadLibray on it still
works fine.

Can anybody shed some light on what is happening inbetween detecting the
PCMCIA card and the loading of the drivers DLL? Or even better any ideas on
what could cause the drivers DLL not being loaded at all?

Thanks
Thorsten