certopenstore (crypt32)
Last changed: -134.134.136.1

.
Summary
Opens a certificate store using a specified store provider type.

C# Signatures:

[DllImport("CRYPT32.DLL", EntryPoint="CertOpenStore", CharSet=CharSet.Auto, SetLastError=true)]
public static extern IntPtr CertOpenStoreStringPara( int storeProvider, int encodingType,
   IntPtr hcryptProv, int flags, String pvPara);

[DllImport("CRYPT32.DLL", EntryPoint="CertOpenStore", CharSet=CharSet.Auto, SetLastError=true)]
public static extern IntPtr CertOpenStoreIntPtrPara( int storeProvider, int encodingType,
   IntPtr hcryptProv, int flags, IntPtr pvPara);

VB .NET Signature:

todo

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

WSE 1.0/2.0 have several functions that allow you to open and browse the key store. In addition, the X509CertificateEx class in WSE allows you to access the private key associated with the certificate. Whidbey makes it all a snap and you can even add and remove certs from stores, etc.

Documentation