Services — Boot Services
Version 1.10 12/01/02 5-73
LocateProtocol()
Summary
Returns the first protocol instance that matches the given protocol.
Prototype
typedef
EFI_STATUS
LocateProtocol (
IN EFI_GUID *Protocol,
IN VOID *Registration OPTIONAL,
OUT VOID **Interface
);
Parameters
Protocol Provides the protocol to search for.
Registration Optional registration key returned from
RegisterProtocolNotify()
.IfRegistration is NULL,then
it is ignored.
Interface On return, a pointer to the first interface that matches Protocol and
Registration.
Description
The LocateProtocol() function finds the first device handle that support Protocol,and
returns a pointer to the protocol interface from that handle in Interface.Ifnoprotocol
instances are found, then Interface is set to NULL.
If Interface is NULL,thenEFI_INVALID_PARAMETER is returned.
If Registration is NULL, and there are no handles in the handle database that support
Protocol,thenEFI_NOT_FOUND is returned.
If Registration is not NULL, and there are no new handles for Registration,then
EFI_NOT_FOUND is returned.
Status Codes Returned
EFI_SUCCESS
A protocol instance matching
Protocol was found and returned in
Interface.
EFI_INVALID_PARAMETER
Interface is NULL.
EFI_NOT_FOUND
No protocol instances were found that match
Protocol.