Examples – Intel Extensible Firmware Interface User Manual

Page 156

Advertising
background image

Extensible Firmware Interface Specification

5-58

12/01/02

Version 1.10

Examples

EFI_BOOT_SERVICES_TABLE

*gBS;

EFI_HANDLE

ImageHandle;

EFI_DRIVER_BINDING_PROTOCOL

*This;

IN EFI_HANDLE

ControllerHandle,

extern EFI_GUID

gEfiXyzIoProtocol;

EFI_STATUS

Status;

//
// Close the XYZ I/O Protocol that was opened on behalf of ControllerHandle
//

Status = gBS->CloseProtocol (

ControllerHandle,
&gEfiXyzIoProtocol,
This->DriverBindingHandle,
ControllerHandle
);

//
// Close the XYZ I/O Protocol that was opened with BY_HANDLE_PROTOCOL
//

Status = gBS->CloseProtocol (

ControllerHandle,
&gEfiXyzIoProtocol,
ImageHandle,
NULL
);

Advertising