Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than crypt32, prefix the name with the module name and a period.
<DllImport("Crypt32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Private Shared Function CertOpenSystemStore( _
ByVal hCryptProv As IntPtr, _
ByVal storename As String) As IntPtr
End Function
if (hCertCntxt != IntPtr.Zero)
{ //use certcontext from managed code
Console.WriteLine("CertContext:\t0x{0:X}", hCertCntxt.ToInt32());
X509Certificate foundcert = new X509Certificate(hCertCntxt);
Console.WriteLine("\nFound certificate with SubjectName string \"{0}\"", lpszCertSubject);
Console.WriteLine("SubjectName:\t{0}", foundcert.GetName());
Console.WriteLine("Serial No:\t{0}", foundcert.GetSerialNumberString());
Console.WriteLine("HashString:\t{0}", foundcert.GetCertHashString());
}
else
Console.WriteLine("Could not find SubjectName containing string \"{0}\"", lpszCertSubject);
}
//------- Clean Up -----------
if (hCertCntxt != IntPtr.Zero)
WinCapi.CertFreeCertificateContext(hCertCntxt);
if (hSysStore != IntPtr.Zero)
WinCapi.CertCloseStore(hSysStore, 0);
}
}
Alternative Managed API:
TODO
Opens a certificate store using a specified store provider type.
3/16/2007 7:39:35 AM - -134.134.136.1
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).