In the legacy form of table constraint code generation, the following structure would be generated for the Invoke type above:
typedef struct EXTERN Invoke { OSINT32 invokeID; _OPERATION_operationCode opcode; ASN1Object argument; }
This is almost identical to the type generated in the simple case. The difference is the ASN1Object type (or ASN1TObject for C++) that is used instead of ASN1OpenType. This type is defined in the asn1type.h run-time header file as follows:
typedef struct ASN1Object { ASN1OpenType encoded; void* decoded; OSINT32 index; }
This holds the value to be encoded or decoded in both encoded or decoded form. The way a user uses this to encode a value of this type is as follows:
Populate a variable of the type to be used as the argument to the invoke type.
Plug the address of this variable into the decoded void pointer in the structure above.
Populate the remaining Invoke type fields.
Encode the Invoke type to produce the final message.
Note that in this case, the intermediate type does not need to be manually encoded by the user. The generated encoder has logic built-in to encode the complete message using the information in the generated tables.