Un exemple .Net

[StructLayout(LayoutKind.Sequential,CharSet= CharSet.Unicode)]
public struct CRYPTUI_VIEWCERTIFICATE_STRUCT
{
public int dwSize;
public IntPtr hwndParent;
public int dwFlags;
[MarshalAs(UnmanagedType.LPWStr)]
public String szTitle;
public IntPtr pCertContext;
public IntPtr rgszPurposes;
public int cPurposes;
public IntPtr pCryptProviderData;
public Boolean fpCryptProviderDataTrustedUsage;
public int idxSigner;
public int idxCert;
public Boolean fCounterSigner;
public int idxCounterSigner;
public int cStores;
public IntPtr rghStores;
public int cPropSheetPages;
public IntPtr rgPropSheetPages;
public int nStartPage;
}


[DllImport("CryptUI.dll", CharSet = CharSet.Unicode, SetLastError =
true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern Boolean CryptUIDlgViewCertificate(
ref CRYPTUI_VIEWCERTIFICATE_STRUCT pCertViewInfo,
ref bool pfPropertiesChanged);

Sample Function:


public static bool ShowBinaryImageCertificateDialogFromFile(string
FileName, IntPtr ParentWindowHandle, ref Exception Error)
{
try
{
bool pPropertyChanged = false;

X509Certificate certificate =
X509Certificate.CreateFromSignedFile(FileName);

CRYPTUI_VIEWCERTIFICATE_STRUCT cuivcs = new
CRYPTUI_VIEWCERTIFICATE_STRUCT();
cuivcs.dwSize = Marshal.SizeOf(cuivcs);
cuivcs.hwndParent = ParentWindowHandle;
cuivcs.pCertContext = certificate.Handle;
cuivcs.szTitle = "Certificate Info for " +
Application.ProductName + " " + AssemblyVersion;
cuivcs.dwFlags = 0;
cuivcs.nStartPage = 0;

if (CryptUIDlgViewCertificate(ref cuivcs, ref
pPropertyChanged) == false)
{
Win32Exception winerr = new Win32Exception();

if (winerr.ErrorCode != -2147467259) //user abort
{
throw winerr;
}
}

Error = null;
return true;
}
catch (Exception err)
{
Error = err;
return false;
}
}

runns on windows 200/XP,Vista and Windows 7, all tested
for 32 and 64 bit!