[DllImport("Crypt32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern bool CertStrToName(
uint dwCertEncodingType,
string pszX500,
uint dwStrType,
IntPtr pvReserved,
byte[] pbEncoded,
ref uint pcbEncoded,
ref IntPtr ppName,
ref uint pcParsed
);