Decodes the specified extension and returns an object of the specified type that is instantiated with the decoded bytes.
[Visual Basic]
Overloads Protected Shared Function DecodeExtension( _
ByVal extension As Extension, _
ByVal oid As IntPtr, _
ByVal returnType As Type _
) As Object
An object of the type returnType.
The specified type should have a public constructor that takes an IntPtr and an int as parameters [in that order]. The IntPtr is a pointer to the decoded buffer and the int contains the number of decoded bytes. The type should not keep the IntPtr reference after construction of an instance, because the memory is freed when the DecodeExtension method returns.
Exception Type | Condition |
---|---|
ArgumentNullException | One of the parameters is a null reference (Nothing in Visual Basic). |
CertificateException | An error occurs while decoding the certificate extension. |
Certificate Class | Certificate Members | Org.Mentalis.Security.Certificates Namespace | Certificate.DecodeExtension Overload List