CAPICOM_ERROR_CODE enumeration

The CAPICOM_ERROR_CODE enumeration type defines error codes that are returned by CAPICOM.

Note

Visual Basic Scripting Edition errors return an Err.number value greater than zero. For those errors, Err.Description values provide information about the cause of the error. In addition to Visual Basic Scripting Edition errors, CAPICOM errors return the codes defined by CAPICOM_ERROR_CODE.

 

Members

Member Description Value
CAPICOM_E_ENCODE_INVALID_TYPE An encoding type that is not valid was used.
The following list shows the valid encoding types:
  • CAPICOM_ENCODE_ANY
  • CAPICOM_ENCODE_BASE64
  • CAPICOM_ENCODE_BINARY

0x80880100
CAPICOM_E_EKU_INVALID_OID The OID property of the EKU object cannot be set because the Name property is not set to CAPICOM_EKU_OTHER.
Set the Name property to CAPICOM_EKU_OTHER before setting the OID property.
0x80880200
CAPICOM_E_EKU_OID_NOT_INITIALIZED The OID property of the EKU object has not been initialized.
Either set the Name property to anything other than CAPICOM_EKU_OTHER, or set the Name property to CAPICOM_EKU_OTHER and the OID property to a value.
0x80880201
CAPICOM_E_CERTIFICATE_NOT_INITIALIZED The Certificate object has not been initialized.
Usually, this error code is returned when a Certificate object is instantiated but not associated with a digital certificate. To associate the object with a digital certificate, either assign it to an existing Certificate object or call the Import method.
0x80880210
CAPICOM_E_CERTIFICATE_NO_PRIVATE_KEY The Certificate object does not have an associated private key.
This error code is returned when an attempt is made to sign data using the signer's private key, but the Certificate object that is associated with the Signer object cannot be used for the signing operation.
0x80880211
CAPICOM_E_CHAIN_NOT_BUILT The Chain object has not been initialized.
To initialize the Chain object, call the Build method.
0x80880220
CAPICOM_E_STORE_NOT_OPENED The Store object has not been initialized.
To initialize the Store object, call the Open method.
0x80880230
CAPICOM_E_STORE_EMPTY The Store object does not contain any Certificate objects.
0x80880231
CAPICOM_E_STORE_INVALID_OPEN_MODE The OpenMode parameter of the Store.Open method does not contain a valid value of CAPICOM_STORE_OPEN_MODE.
The following list shows the valid values of CAPICOM_STORE_OPEN_MODE:
  • CAPICOM_STORE_OPEN_READ_ONLY
  • CAPICOM_STORE_OPEN_READ_WRITE
  • CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED
  • CAPICOM_STORE_OPEN_EXISTING_ONLY
  • CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED

0x80880232
CAPICOM_E_STORE_INVALID_SAVE_AS_TYPE The SaveAs value passed to the Export method of the Store object was not valid.
The following list shows the valid SaveAs values:
  • CAPICOM_STORE_SAVE_AS_SERIALIZED
  • CAPICOM_STORE_SAVE_AS_PKCS7

0x80880233
CAPICOM_E_ATTRIBUTE_NAME_NOT_INITIALIZED The Name property of the Attribute object has not been initialized.
Set the Name property.
0x80880240
CAPICOM_E_ATTRIBUTE_VALUE_NOT_INITIALIZED The Value property of the Attribute object has not been initialized.
Set the Value property.
0x80880241
CAPICOM_E_ATTRIBUTE_INVALID_NAME The Name property of the Attribute object is not valid.
The following list shows the valid attribute names:
  • CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME
  • CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME
  • CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION

0x80880242
CAPICOM_E_ATTRIBUTE_INVALID_VALUE The Value property of the Attribute object is not valid because the data type does not match the data type indicated by the Name property.
For example, if the Name property is set to CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME, the data type must be DATE.
0x80880243
CAPICOM_E_SIGNER_NOT_INITIALIZED The Signer object has not been initialized.
To initialize the Signer object, set the Certificate property.
0x80880250
CAPICOM_E_SIGNER_NOT_FOUND The signer cannot be found in the SignedData object.
Usually, this does not happen with a SignedData object that was created by CAPICOM; however, if the SignedData object was created by a third-party product, the signer's certificate may not be included in the PKCS #7 structure.
0x80880251
CAPICOM_E_SIGNER_NO_CHAIN A Chain object cannot be found in the Signer object.
0x80880252 // v2.0
CAPICOM_E_SIGNER_INVALID_USAGE An attempt is made to use the signer in a way that is not valid.
0x80880253 //v2.0
CAPICOM_E_SIGN_NOT_INITIALIZED The SignedData object has not been initialized.
To initialize the SignedData object, set the Content property or call the Verify method.
0x80880260
CAPICOM_E_SIGN_INVALID_TYPE The SignedData object contains a type that is not valid.
Usually, this happens when an attempt is made to verify an enveloped message with a SignedData object or vice versa.
0x80880261
CAPICOM_E_SIGN_NOT_SIGNED The SignedData object has not been signed.
To sign the SignedData object, call the Sign method.
0x80880262
CAPICOM_E_INVALID_ALGORITHM The algorithm value for the Name property of the Algorithm object is not valid.
The following list shows the valid algorithm values for the Name property:
  • CAPICOM_ENCRYPTION_ALGORITHM_RC2
  • CAPICOM_ENCRYPTION_ALGORITHM_RC4
  • CAPICOM_ENCRYPTION_ALGORITHM_DES
  • CAPICOM_ENCRYPTION_ALGORITHM_3DES

0x80880270
CAPICOM_E_INVALID_KEY_LENGTH The key length value for the KeyLength property of the Algorithm object is not valid.
The following list shows the valid key length values for the KeyLength property:
  • CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM
  • CAPICOM_ENCRYPTION_KEY_LENGTH_40_BITS
  • CAPICOM_ENCRYPTION_KEY_LENGTH_56_BITS
  • CAPICOM_ENCRYPTION_KEY_LENGTH_128_BITS

0x80880271
CAPICOM_E_ENVELOP_NOT_INITIALIZED The EnvelopedData object has not been initialized.
To initialize the EnvelopedData object, either set the Content property or call the Decrypt method.
0x80880280
CAPICOM_E_ENVELOP_INVALID_TYPE The EnvelopedData object contains a type that is not valid.
Usually, this happens when an attempt is made to verify a signed message with an EnvelopedData object or vice versa.
0x80880281
CAPICOM_E_ENVELOP_NO_RECIPIENT There is no recipient specified in the EnvelopedData object when the Encrypt method of an EnvelopedData object is called.
To add a recipient, call the Recipients.Add method.
0x80880282
CAPICOM_E_ENVELOP_RECIPIENT_NOT_FOUND The recipient cannot be found in the EnvelopedData object.
Usually, this does not happen with an EnvelopedData object that was created by CAPICOM; however, if the EnvelopedData object was created by a third-party product, the recipient's certificate may not be included in the PKCS #7 structure.
0x80880283
CAPICOM_E_ENCRYPT_NOT_INITIALIZED The EncryptedData object has not been initialized.
To initialize the EncryptedData object, either set the Content property or call the Decrypt method.
0x80880290
CAPICOM_E_ENCRYPT_INVALID_TYPE The EncryptedData object is not a valid type.
Usually, this means the data is corrupted.
0x80880291
CAPICOM_E_ENCRYPT_NO_SECRET The secret of an EncryptedData object has not been initialized.
To initialize the secret of an EncryptedData object, call the SetSecret method.
0x80880292
CAPICOM_E_PRIVATE_KEY_NOT_INITIALIZED The PrivateKey object has not been initialized.
0x80880300 // v2.0
CAPICOM_E_PRIVATE_KEY_NOT_EXPORTABLE The PrivateKey object cannot be exported.
0x80880301 // v2.0
CAPICOM_E_ENCODE_NOT_INITIALIZED The EncodedData object has not been initialized.
0x80880320 // v2.0
CAPICOM_E_EXTENSION_NOT_INITIALIZED The Extension object has not been initialized.
0x80880330 // v2.0
CAPICOM_E_PROPERTY_NOT_INITIALIZED The PropID property of the ExtendedProperty object has not been initialized.
0x80880340 // v2.0
CAPICOM_E_FIND_INVALID_TYPE The FindType parameter of the Certificates.Find method is not a value of the CAPICOM_CERTIFICATE_FIND_TYPE enumeration.
0x80880350 // v2.0
CAPICOM_E_FIND_INVALID_PREDEFINED_POLICY The specified predefined policy for the find operation is not valid.
0x80880351 // v2.0
CAPICOM_E_CODE_NOT_INITIALIZED The SignedCode object has not been initialized.
0x80880360 // v2.0
CAPICOM_E_CODE_NOT_SIGNED The SignedCode object has not been signed.
To sign the SignedCode object, call the Sign method.
0x80880361 // v2.0
CAPICOM_E_CODE_DESCRIPTION_NOT_INITIALIZED The Description property of the SignedCode object has not been initialized.
0x80880362 // v2.0
CAPICOM_E_CODE_DESCRIPTION_URL_NOT_INITIALIZED The DescriptionURL property of the SignedCode object has not been initialized.
0x80880363 // v2.0
CAPICOM_E_CODE_INVALID_TIMESTAMP_URL The URL parameter of the SignedCode.Timestamp method is not valid.
0x80880364 // v2.0
CAPICOM_E_HASH_NO_DATA The HashedData object does not contain any data.
0x80880370 // v2.0
CAPICOM_E_INVALID_CONVERT_TYPE The convert type is not valid.
0x80880380 // v2.0
CAPICOM_E_NOT_SUPPORTED The requested operation is not supported in the current platform.
0x80880900
CAPICOM_E_UI_DISABLED When signing, the Certificate property of the Signer object has not been set, but the prompt for the user certificate has been disabled.
Either enable the prompt by setting the EnablePromptForCertificateUI property of the Settings object, or set the Certificate property of the Signer object.
0x80880901
CAPICOM_E_CANCELLED The operation has been canceled by the user.
This happens when the user is prompted for permission to carry out a certain operation, such as accessing the private key, and the user cancels the operation.
0x80880902
CAPICOM_E_NOT_ALLOWED The attempted operation is not allowed.
For example, changing the PropID property of an ExtendedProperty object is not allowed if the object is attached to a certificate.
0x80880903 // v2.0
CAPICOM_E_OUT_OF_RESOURCE CAPICOM has run out of a resource.
0x80880904 // v2.0
CAPICOM_E_INTERNAL An internal error has occurred.
Contact Microsoft Technical Support for assistance.
0x80880911
CAPICOM_E_UNKNOWN An unknown error has occurred.
Collect as much information as possible, and contact your vendor.
0x80880999

Requirements

Requirement Value
Redistributable
CAPICOM 2.0 or later on Windows Server 2003 and Windows XP
Header
Capicom.h