Services
Version 1.02 12/12/00 61
3.3.4 RegisterProtocolNotify()Summary
Creates an event that is to be signaled whenever an interface is installed for a specified protocol.
Prototype
EFI_STATUS
RegisterProtocolNotify (
IN EFI_GUID *Protocol,
IN EFI_EVENT Event,
OUT VOID **Registration
);
Parameters
Protocol The numeric ID of the protocol for which the event is to be registered.
Type EFI_GUID is defined in Section 3.3.1.
Event Event that is to be signaled whenever a protocol interface is registered
for Protocol. Type EFI_EVENT is defined in Section 3.1.1.
Registration A pointer to a memory location to receive the registration value. This
value must be saved and used by the notification function of Event to
retrieve the list of handles that have added a protocol interface of type
Protocol.
Description
The RegisterProtocolNotify() function creates an event that is to be signaled whenever a
protocol interface is installed for Protocol by InstallProtocolInterface() or
ReinstallProtocolInterface().
Once Event has been signaled, the LocateHandle() function can be called to identify the
newly installed, or reinstalled, handles that support Protocol. The Registration parameter
in RegisterProtocolNotify() corresponds to the SearchKey parameter in
LocateHandle(). Note that the same handle may be returned multiple times if the handle
reinstalls the target protocol ID multiple times. This is typical for removable media devices,
because when such a device reappears, it will reinstall the Block I/O protocol to indicate that the
device needs to be checked again. In response, layered Disk I/O and Simple File System protocols
may then reinstall their protocols to indicate that they can be re-checked, and so forth.
Status Codes Returned
EFI_SUCCESS The notification event has been registered.
EFI_OUT_OF_RESOURCES Space for the notification event could not be allocated.
EFI_INVALID_PARAMETER One of the parameters has an invalid value.