Required Interfaces (RIs)

As said above, RIs are called by the state machines; the VM (or, more specifically, the appropriate VMLC) is in this case the callee, not the caller. For this to work, the code generation process of the VM must provide entry points for the RIs, named
void 
vm_FV_Name_SubPrgName(
    char *pInBuffer1, int iBufferSize1, 
    char *pInBuffer2, int iBufferSize2, 
    ...);
Just as with PIs, the parameters of the RI are translated in pairs of (pointer, length) arguments in this callback. The VM will get the specific values of the invocation parameters as encoded ASN.1 streams, pointed to by these pairs. It must delegate the call to the appropriate PI, passing the parameters exactly as it received them.

As an example, the code generated from ObjectGeode calls these functions through special MACROs, defined inside hpostdef.h. The appropriate function declarations are placed during the "glue" generation process inside file hpredef.h (see the details of these in Chapter 11).