This macro allows a task to invoke a folio procedure directly from the folio vector table, thereby bypassing the normal procedure interface. It can be used only for folio procedures that return a value. (To invoke a folio procedure that does not return a value, use CallFolio().) This approach, which is slightly faster than invoking the procedure through the normal interface, is intended for use by the folios themselves, but it can be also be used by applications.
Note: Most tasks should invoke folio procedures in the normal way, using the interfaces described in this manual. Only tasks that require the utmost in speed and efficiency should invoke folio procedures directly from the vector table.
Example of n = RemTail(l) using CallFolioRet:
CallFolioRet(KernelBase, KBV_REMTAIL, (l), n, (Node *));
Arguments
folio
A pointer to the folio item that contains the procedure. Use LookupItem() to get this pointer. For the item number of a folio (which you pass to LookupItem()), see the Portfolio Items chapter or call FindAndOpenFolio().
func
The index of the vector table entry for the folio procedure to invoke. This index (a negative integer, because the table grows backward in memory) is listed in the header file for the folio.
args
The arguments for the procedure, separated by commas and enclosed within parentheses.
ret
A variable to receive the result from the folio procedure. The result is coerced to the type specified by the cast argument before it is assigned to this variable.
cast
The desired type for the result, surrounded by parentheses. The result returned by the folio procedure is cast to this type.