This sample shows how to programmatically enumerate certificates with specific properties (here smart card logon certificates) on the MY certificate store.
Here is the source : EnumLogonCerts.cpp
The Cryptology ePrint Archive provides rapid access to recent research in cryptology. It's hosted by the International Association for Cryptologic Research. The latest articles can be accessed by clicking here.