Function installProtocolInterfaces [src]

Installs a set of protocol interfaces into the boot services environment. This function's final argument should be a tuple of pointers to protocol interfaces. For example: const handle = try boot_services.installProtocolInterfaces(null, .{ &my_interface_1, &my_interface_2, }); The underlying function accepts a vararg list of pairs of Guid pointers and opaque pointers to the interface. To provide a guid, the interface types should declare a guid constant like so: pub const guid: uefi.Guid = .{ ... }; See std.os.uefi.protocol for examples of protocol type definitions.

Prototype

pub fn installProtocolInterfaces( self: *BootServices, handle: ?Handle, interfaces: anytype, ) InstallProtocolInterfacesError!Handle

Parameters

self: *BootServiceshandle: ?Handle

Possible Errors

AlreadyStarted
InvalidParameter
OutOfResources
Unexpected UnexpectedError

Source

pub fn installProtocolInterfaces( self: *BootServices, handle: ?Handle, interfaces: anytype, ) InstallProtocolInterfacesError!Handle { var hdl: ?Handle = handle; const args_tuple = protocolInterfaces(&hdl, interfaces); switch (@call( .auto, self._installMultipleProtocolInterfaces, args_tuple, )) { .success => return hdl.?, .already_started => return error.AlreadyStarted, .out_of_resources => return error.OutOfResources, .invalid_parameter => return error.InvalidParameter, else => |status| return uefi.unexpectedStatus(status), } }