pr0gma
pr0gma

Reputation: 575

Can you explain this C definition from efilib.h?

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
);

Upvotes: 0

Views: 710

Answers (1)

ReluctantBIOSGuy
ReluctantBIOSGuy

Reputation: 576

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.

Upvotes: 1

Related Questions