I'm learning UEFI programming and I notice that many of the EFI header files show chunks with this syntax I can't understand:
typedef
EFI_STATUS
(EFIAPI *EFI_TEXT_STRING) (
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
IN CHAR16 *String
);
typedef
in this case?IN
's are legal syntax? Is it a compiler specific feature?It is a simple typdef for a function pointer. Type EFI_TEXT_STRING is a pointer to a function that takes a pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL as its first argument and a pointer to CHAR16 as its second argument. The function returns type EFI_STATUS.