I know there has been a lot of confusion about this, because some articles on the web (i.e. MSDN) say CAPICOM is not supported on Vista, while others say it is.
I have good news for you people, especially for those who want to do cryptographic operations from scripting: CAPICOM is officially supported on Vista, but only on its version 126.96.36.199.
This version can be downloaded from here:
Platform SDK Redistributable: CAPICOM
(Note: at the time of this writing, this article DOES NOT say that CAPICOM is supported on Vista).
This new version of CAPICOM was released, among other reasons, because of a security update on CAPICOM:
Security Update for CAPICOM (KB931906)
(Note: this article DOES say that CAPICOM is supported on Vista)
If we try to use version 188.8.131.52 on Vista, for instance, a small .NET sample which uses CAPICOM like the following:
StoreClass store = new StoreClass();
store.Open(CAPICOM_STORE_LOCATION.CAPICOM_SMART_CARD_USER_STORE, null, CAPICOM_STORE_OPEN_MODE.CAPICOM_STORE_OPEN_READ_WRITE);
Will return the following exception:
System.Runtime.InteropServices.COMException (0x80880900): Exception from HRESULT: 0x80880900
# for hex 0x80880900 / decimal -2138568448
Anyway, my recommendation is to use .NET Framework classes instead of CAPICOM whenever possible.
I hope this helps.
Alex (Alejandro Campos Magencio)