Openprotocol(), Stop(), Functions of th – Intel Extensible Firmware Interface User Manual

Page 147

Advertising
background image

Services — Boot Services

Version 1.10

12/01/02

5-49

OpenProtocol()

Summary

Queries a handle to determine if it supports a specified protocol. If the protocol is supported by the
handle, it opens the protocol on behalf of the calling agent. This is an extended version of the EFI
boot service

HandleProtocol()

.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_OPEN_PROTOCOL) (

IN

EFI_HANDLE

Handle,

IN

EFI_GUID

*Protocol,

OUT VOID

**Interface

OPTIONAL,

IN

EFI_HANDLE

AgentHandle,

IN

EFI_HANDLE

ControllerHandle,

IN

UINT32

Attributes

);

Parameters

Handle

The handle for the protocol interface that is being opened.

Protocol

The published unique identifier of the protocol. It is the callers
responsibility to pass in a valid GUID. See “Wired For
Management Baseline” for a description of valid GUID values.

Interface

Supplies the address where a pointer to the corresponding
Protocol Interface is returned.

NULL

will be returned in

*Interface

if a structure is not associated with

Protocol

.

This parameter is optional, and will be ignored if

Attributes

is

EFI_OPEN_PROTOCOL_TEST_PROTOCOL

.

AgentHandle

The handle of the agent that is opening the protocol interface
specified by

Protocol

and

Interface

. For agents that

follow the EFI Driver Model, this parameter is the handle that
contains the

EFI_DRIVER_BINDING_PROTOCOL

instance

that is produced by the EFI Driver that is opening the protocol
interface. For EFI Applications, this is the image handle of the
EFI Application that is opening the protocol interface. For EFI
Applications that use

HandleProtocol()

to open a protocol

interface, this parameter is the image handle of the EFI firmware.

Advertising