2 The DriverEntryPoint and Unload for HttpUtilities driver.
4 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include "HttpUtilitiesDxe.h"
15 @param ImageHandle Handle that identifies the image to be unloaded.
17 @retval EFI_SUCCESS The image has been unloaded.
18 @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
23 HttpUtilitiesDxeUnload (
24 IN EFI_HANDLE ImageHandle
29 EFI_HANDLE
*HandleBuffer
;
31 EFI_HTTP_UTILITIES_PROTOCOL
*HttpUtilitiesProtocol
;
36 // Locate all the handles with HttpUtilities protocol.
38 Status
= gBS
->LocateHandleBuffer (
40 &gEfiHttpUtilitiesProtocolGuid
,
45 if (EFI_ERROR (Status
)) {
49 for (Index
= 0; Index
< HandleNum
; Index
++) {
51 // Firstly, find HttpUtilitiesProtocol interface
53 Status
= gBS
->OpenProtocol (
55 &gEfiHttpUtilitiesProtocolGuid
,
56 (VOID
**)&HttpUtilitiesProtocol
,
59 EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL
61 if (EFI_ERROR (Status
)) {
66 // Then, uninstall HttpUtilities interface
68 Status
= gBS
->UninstallMultipleProtocolInterfaces (
70 &gEfiHttpUtilitiesProtocolGuid
,
71 HttpUtilitiesProtocol
,
74 if (EFI_ERROR (Status
)) {
83 This is the declaration of an EFI image entry point. This entry point is
84 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
85 both device drivers and bus drivers.
87 @param ImageHandle The firmware allocated handle for the UEFI image.
88 @param SystemTable A pointer to the EFI System Table.
90 @retval EFI_SUCCESS The operation completed successfully.
91 @retval Others An unexpected error occurred.
95 HttpUtilitiesDxeDriverEntryPoint (
96 IN EFI_HANDLE ImageHandle
,
97 IN EFI_SYSTEM_TABLE
*SystemTable
107 // Install the HttpUtilities Protocol onto Handle
109 Status
= gBS
->InstallMultipleProtocolInterfaces (
111 &gEfiHttpUtilitiesProtocolGuid
,
112 &mHttpUtilitiesProtocol
,