Is CryptUIDlgSelectCertificateFromStore not supported in win32 applications ?
I tried to show the list of Certificates from store, but it lists only one certificate and also not let select any other certificate.
Code snippt:
HCERTSTORE hCertStore = CertOpenSystemStore(NULL, L"MY");
CryptUIDlgSelectCertificateFromStore(hCertStore, GetForegroundWindow(), L"Select Certificate", L"Select Certificate", CRYPTUI_SELECT_ISSUEDBY_COLUMN| CRYPTUI_SELECT_INTENDEDUSE_COLUMN
| CRYPTUI_SELECT_LOCATION_COLUMN| CRYPTUI_SELECT_EXPIRATION_COLUMN, 0, NULL);
Also click on "more option" it is causing the crash.
Your code is correct. The reason, as said by Dialecticus, is in other parts. Microsoft supports this win32api, in higher than Windows XP Systems. Refer to:CryptUIDlgSelectCertificateFromStore.