Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IAsn1_2::encodeOID_2 ( P6UINT8 pBuffer,
P6UINT32  bufSize,
P6UINT32 pIndex,
const P6CHAR pOID 
)
pure virtual

Generate the standard BER encoding of an Object Identifier (OID).

The valud in pOID should use a dotted notation. LImitation: any one number in an OID can not be larger than 2,097,151. The length of any OID is limited by the limits defined by the encodeLength function above.

Parameters
pBuffer[ in out ] array of bytes to build an ASN.1 encoded message
bufSize[ in ] size in octets (i.e., bytes) of pBuffer
pIndex[ in ] current offset into pBuffer, that is, the next free byte to write into [ out ] As the OID is encoded in pBuffer this index value increases in value
pOID[ in ] a narrow string representing the Object Identifier (e.g., 2.6.6.247.1 )
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedA successful call to initialize was not made before this call.
P6R::eInvalidArgOne of the parameters is NULL.
P6R::eFormatErrorString pointed to by pOID is not in the dotted notation.
errors from encodeLength()This function calls encodeLength.
P6R::eTooBigCannot properly encode the OID string since one number is larger than 2,097,151.
P6R::eInternalErrorFailed to properly encode the pOID string in BER.