Intel Extensible Firmware Interface User Manual
Page 158

Extensible Firmware Interface Specification
5-60
12/01/02
Version 1.10
Description
This function allocates and returns a buffer of
EFI_OPEN_PROTOCOL_INFORMATION_ENTRY
structures. The buffer is returned in
EntryBuffer
, and the number of entries is returned in
EntryCount
.
If the interface specified by
Protocol
is not supported by the handle specified by
Handle
, then
EFI_NOT_FOUND
is returned.
If the interface specified by
Protocol
is supported by the handle specified by
Handle
, then
EntryBuffer
is allocated with the boot service
, and
EntryCount
is set
to the number of entries in
EntryBuffer
. Each entry of
EntryBuffer
is filled in with the
image handle, controller handle, and attributes that were passed to
when the
protocol interface was opened. The field
OpenCount
shows the number of times that the protocol
interface has been opened by the agent specified by
ImageHandle
,
ControllerHandle
, and
Attributes
. After the contents of
EntryBuffer
have been filled in,
EFI_SUCCESS
is
returned. It is the caller’s responsibility to call
on
EntryBuffer
when the caller
no longer required the contents of
EntryBuffer
.
If there are not enough resources available to allocate
EntryBuffer
, then
EFI_OUT_OF_RESOURCES
is returned.
Status Codes Returned
EFI_SUCCESS
The open protocol information was returned in
EntryBuffer
, and the
number of entries was returned
EntryCount
.
EFI_NOT_FOUND
Handle
does not support the protocol specified by
Protocol
.
EFI_OUT_OF_RESOURCES
There are not enough resources available to allocate
EntryBuffer
.
Examples
See example in the
function description for an example on how
LocateHandleBuffer()
OpenProtocol()
, and
can be used to traverse the entire handle database.