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.



Description

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

Function

   Function GetBlob(
      theStatus As Long
      ) As Variant


Parameters

Table 1. Function parameters
ExpressionTypeDescription
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).


Returns

The Blob as a variant containing an array of bytes.

Example

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.
 
      ProcessBlob(TheBlob);
 
   End Sub


Parent topic:
Certificate functions