On Tue, 2011-02-08 at 14:42 -0600, Douglas E. Engert wrote: > > So, if there is a problem within a particular application, that problem > > should also be fixed within the same application. If that isn't possible > > at all, then improvements in libopensc may be considered. > > Yes that is the situation. use_reader is an improvement in that is > allows the calling module, cardmod, to pass in the handles that are to > be used.
And how to use that feature? Something like that: r = sc_ctx_use_reader(p15card->card->ctx, hSCardCtx, hSCard); That would change the low level pcsc-handle of an existing p15card (i.e. an emulator). The existing p15card would become connected with a different physical card. Well, maybe like that: r = sc_ctx_use_reader(card->ctx, hSCardCtx, hSCard); Hmmm, card drivers do also cache some data (i.e. serial number). Additionally a single card driver doesn't work for different kinds of physical cards. What is left is that one: r = sc_context_create(&ctx, parm); /* followed by */ r = sc_ctx_use_reader(ctx, hSCardCtx, hSCard); Feel free to extent this list with your intended use cases. Regards Andre _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel