EldoS
Navigation
Web site
Support
Table Of Contents

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


TElWinCertStorage.Add

TElWinCertStorage     See also    


 

Adds the certificate to the system storage

 
 

Declaration

[C#]
    void Add(TElX509Certificate Certificate, bool CopyPrivateKey /* = true */);
     void Add(TElX509Certificate Certificate, string StoreName, bool CopyPrivateKey /* = false */, bool Exportable /* = true */, bool Protected /* = true */);
    void Add(TElX509Certificate Certificate, bool BindToExistingPrivateKey, string StoreName, string PrivateKeyContainerName);

[VB.NET]
    Sub Add(ByVal Certificate As TElX509Certificate, ByVal CopyPrivateKey As Boolean = True)
    Sub Add(ByVal Certificate As TElX509Certificate, ByVal StoreName As String, ByVal CopyPrivateKey As Boolean = False, ByVal Exportable As Boolean = True, ByVal [Protected] As Boolean = True)
    Sub Add(ByVal Certificate As TElX509Certificate, ByVal BindToExistingPrivateKey As Boolean, ByVal StoreName As String, ByVal PrivateKeyContainerName As String)

[Pascal]
    procedure Add(Certificate : TElX509Certificate; CopyPrivateKey : boolean = true); overload;
    procedure Add(Certificate : TElX509Certificate; StoreName : string; CopyPrivateKey : boolean = true; Exportable : boolean = true; Protected : boolean = true);
    procedure Add(Certificate : TElX509Certificate; BindToExistingPrivateKey : boolean; const StoreName : string; const PrivateKeyContainerName : string);

[VB6]
    Sub IElWinCertStorageX.Add(Certificate As IElCertificateX2)
    Sub IElWinCertStorageX2.AddToStore(Certificate As IElCertificateX2, StoreName As String)
    Sub IElWinCertStorageX4.AddToStoreEx(Certificate As IElCertificateX2, StoreName As String, CopyPrivateKey As Boolean, Exportable As Boolean, [Protected] As Boolean)

[ActiveX]
    HRESULT _stdcall IElWinCertStorageX.Add([in] IElCertificateX2 * Certificate);
    HRESULT _stdcall IElWinCertStorageX2.AddToStore([in] IElCertificateX2 * Certificate, [in] BSTR StoreName );
    HRESULT _stdcall IElWinCertStorageX4.AddToStoreEx([in] IElCertificateX2 * Certificate, [in] BSTR StoreName, [in] VARIANT_BOOL CopyPrivateKey, [in] VARIANT_BOOL Exportable, [in] VARIANT_BOOL Protected);

[DLL]
    __stdcall BOOL SBWinCertStorageAdd(HANDLE hStorage, PCHAR StoreName);
    __stdcall BOOL SBWinCertStorageAddCertificate(HANDLE hStorage, HANDLE hCert);
    __stdcall BOOL SBWinCertStorageAddCertificateTo(HANDLE hStorage, HANDLE hCert, PCHAR StoreName);
 
 

Parameters

  • Certificate - Certificate object, initialized by LoadFromBuffer method
  • StoreName - System store name, where to put the certificate.
  • CopyPrivateKey - True - private key will be copied when certificate is added.
    False - private key will not be copied.
  • Exportable - True - private key will be marked as exportable.
    False - private key will not be marked as exportable.
  • Protected - True - private key will be marked as protected.
    False - private key will not be marked as protected.
  • BindToExistingPrivateKey - True - certificate will be bound to existing private key.
  • PrivateKeyContainerName - Specifies private key container.
  • [DLL]hStorage - handle to the TElWinCertStorage object that was returned by Constructor
  • [DLL]hCert - handle to the TElX509Certificate object that was returned by Constructor
 
 

Description

    Use this method to add certificate to system certificate store. If the store name is not specified, the certificate is added to the ROOT system store.

Note, that dependently on your system settings, Windows may ask you whether you want to add certificate to it's system store.

 
 

See also:     Remove     ListKeyContainers    

 
Contact Us | Terms of Use | Trademarks | Privacy Statement
Copyright (c) 1998-2012, EldoS Corporation