Important: The information in this document is obsolete and should not be used for new development.
Universal Procedure Pointers and Routine Descriptors
While the Mixed Mode Manager is the mechanism for switching between CFM-based code and classic 68K code, the actual interface between the two types of code is the universal procedure pointer. A universal procedure pointer may be either of the following:
Both the calling code and the supplier of the called routine must agree to pass universal procedure pointers to each other. In general, you do not have to worry about which flavor of universal procedure pointer you are passing; as long as you pass a pointer of type
- A pointer to classic 68K code.
- A pointer to a routine descriptor, a data structure that describes the address of the called routine, its parameter signature, and its calling conventions. The Mixed Mode Manager uses the routine descriptor as a key to translate between the CFM-based and classic 68K calling conventions.
UniversalProcPtr
, the Mixed Mode Manager handles the rest and makes the mode switch when necessary. How you set up a universal procedure pointer varies depending on the type of code that initiates the call.
- Note
- Note that the choices for universal procedure pointers reflect the Mixed Mode Manager rules described earlier. Classic 68K code can pass universal procedure pointers without any code modification because all classic 68K procedure pointers are simply redefined to be universal procedure pointers.
Subtopics
- CFM-Based Code Originates the Call
- Classic 68K Code Originates the Call