Framework EDI Reference. Methods and Properties
ediSecurities. DeleteKeyContainer

Delete an existing key container in the Cryptographic Service Provider (CSP) database.

Syntax:

<lretval> = object.DeleteKeyContainer(<sKeyContainerName>, [<sServiceProvider>], [<lProviderType>])

Parameters:

Returns:

Returns 1 if the task was successful.  Otherwise it returns 0.

Remarks:

Warning.  When a key container is deleted, it cannot be recovered or undone unless some form of backup was undertaken.  Furthermore, some security services will no longer work in Windows if those services were dependent on the deleted key container for security.

Example:

Set oSecurities = oEdiDoc.GetSecurities

' Creates a new key container for hypothetical trading partner.
oSecurities.DeleteKeyContainer sKeyContainerName
oSecurities.CreateKeyContainer sKeyContainerName

'Export private and public key container to a file
oSecurities.ExportExchangeKeyPair sExportFileName, sPassword, sKeyContainerName, sProviderName