internal static bool CertAddCertificateLinkToStore([In] System.Security.Cryptography.SafeCertStoreHandle hCertStore, [In] System.Security.Cryptography.SafeCertContextHandle pCertContext, [In] uint dwAddDisposition, [In, Out] System.Security.Cryptography.SafeCertContextHandle ppStoreContext)
 {
     if (hCertStore == null)
     {
         throw new ArgumentNullException("hCertStore");
     }
     if (hCertStore.IsInvalid)
     {
         throw new CryptographicException(SR.GetString("Cryptography_InvalidHandle"), "hCertStore");
     }
     if (pCertContext == null)
     {
         throw new ArgumentNullException("pCertContext");
     }
     if (pCertContext.IsInvalid)
     {
         throw new CryptographicException(SR.GetString("Cryptography_InvalidHandle"), "pCertContext");
     }
     new StorePermission(StorePermissionFlags.AddToStore).Demand();
     return(CAPIUnsafe.CertAddCertificateLinkToStore(hCertStore, pCertContext, dwAddDisposition, ppStoreContext));
 }