+BOOL InitializePCSCLite(void)
You don't use the return value:
@@ -42,9 +43,11 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { DisableThreadLibraryCalls(hinstDLL); WINSCARD_hModule = hinstDLL; + InitializePCSCLite(); break; }
I suspect it's safer not to fail loading winscard if PCSC-Lite isn't available. Instead, the functions such as SCardListCards should probably return empty lists. But knowing to do so relies on knowing that PCSC-Lite couldn't be initialized, so the return value shouldn't be thrown away. Or, remove the return value, and have every function check the function pointers it needs.
--Juan
____________________________________________________________________________________Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222