winscard: add pcsc-lite helpers for upcoming implementation
mounir.idrassi at idrix.fr
Wed May 23 23:56:56 CDT 2007
Thanks for your comments Juan.
Actually, the upcoming implementation checks the used function pointer at
each call and returns an error if not assigned. Also in it, winscard
always succeed to load even if pcsc-lite is not running. FYI, my first
winscard patch contains an advanced stage of the whole implementation.
Concerning the BOOL return value, it's here for "historical" reasons. I'll
IDRIX - Cryptography and IT Security Experts
> +BOOL InitializePCSCLite(void)
> You don't use the return value:
> @@ -42,9 +43,11 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD
> fdwReason, LPVOID lpvReserved)
> WINSCARD_hModule = hinstDLL;
> + InitializePCSCLite();
> 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.
More information about the wine-devel