Community articleGetBlob function
Added by IBM contributorIBM on May 2, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.


This function extracts a binary long object (Blob). This Blob is a DER-encoded certificate.


   Function GetBlob(
      theStatus As Long
      ) As Variant


Table 1. Function parameters
theStatusLongA long that is set with the status of the operation. This will be one of the following:
SUSTATUS_OK — The operation was successful.
SUSTATUS_CANCELLED — the operation was cancelled by the user.
SUSTATUS_INPUT_REQUIRED — the operation required user input, but could not receive it (for example, it was run on a server with no user).


The Blob as a variant containing an array of bytes.


The following function extracts the Blob from a certificate, checks the status to make sure the operation was successful, then returns the Blob.
   Sub extractBlob(TheCert)
      Dim TheBlob  ' Variant
      ' Get the Blob from the certificate
      TheBlob = TheCert.GetBlob(1) ' vbNull
      ' Call the ProcessBlob function to process the certificate Blob. Note 
      ' that this is not an API function, but rather a function you would 
      ' write to do some processing, such as writing the Blob to disk.
   End Sub

Parent topic:
Certificate functions