Locatehandlebuffer() – Intel Extensible Firmware Interface User Manual
Page 168

Extensible Firmware Interface Specification
5-70
12/01/02
Version 1.10
LocateHandleBuffer()
Summary
Returns an array of handles that support the requested protocol in a buffer allocated from pool.
Prototype
typedef
EFI_STATUS
LocateHandleBuffer (
IN EFI_LOCATE_SEARCH_TYPE
SearchType,
IN EFI_GUID
*Protocol
OPTIONAL,
IN VOID
*SearchKey
OPTIONAL,
IN OUT UINTN
*NoHandles,
OUT EFI_HANDLE
**Buffer
);
Parameters
SearchType
Specifies which handle(s) are to be returned.
Protocol
Provides the protocol to search by. This parameter is only valid for a
SearchType
of
ByProtocol
.
SearchKey
Supplies the search key depending on the
SearchType
.
NoHandles
The number of handles returned in
Buffer
.
Buffer
A pointer to the buffer to return the requested array of handles that
support
Protocol
. This buffer is allocated with a call to the Boot
Service
. It is the caller's responsibility to call the
Boot Service
when the caller no longer requires the
contents of
Buffer
.
Description
The
LocateHandleBuffer()
function returns one or more handles that match the
SearchType
request.
Buffer
is allocated from pool, and the number of entries in
Buffer
is
returned in
NoHandles
. Each
SearchType
is described below:
AllHandles
Protocol
and
SearchKey
are ignored and the function
returns an array of every handle in the system.
ByRegisterNotify
SearchKey
supplies the Registration returned by
. The function returns the
next handle that is new for the Registration. Only one handle is
returned at a time, and the caller must loop until no more handles
are returned.
Protocol
is ignored for this search type.
ByProtocol
All handles that support
Protocol
are returned.
SearchKey
is ignored for this search type.