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"
16 @param ImageHandle Handle that identifies the image to be unloaded.
18 @retval EFI_SUCCESS The image has been unloaded.
19 @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
24 HttpUtilitiesDxeUnload (
25 IN EFI_HANDLE ImageHandle
30 EFI_HANDLE
*HandleBuffer
;
32 EFI_HTTP_UTILITIES_PROTOCOL
*HttpUtilitiesProtocol
;
38 // Locate all the handles with HttpUtilities protocol.
40 Status
= gBS
->LocateHandleBuffer (
42 &gEfiHttpUtilitiesProtocolGuid
,
47 if (EFI_ERROR (Status
)) {
51 for (Index
= 0; Index
< HandleNum
; Index
++) {
53 // Firstly, find HttpUtilitiesProtocol interface
55 Status
= gBS
->OpenProtocol (
57 &gEfiHttpUtilitiesProtocolGuid
,
58 (VOID
**) &HttpUtilitiesProtocol
,
61 EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL
63 if (EFI_ERROR (Status
)) {
68 // Then, uninstall HttpUtilities interface
70 Status
= gBS
->UninstallMultipleProtocolInterfaces (
72 &gEfiHttpUtilitiesProtocolGuid
, HttpUtilitiesProtocol
,
75 if (EFI_ERROR (Status
)) {
85 This is the declaration of an EFI image entry point. This entry point is
86 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
87 both device drivers and bus drivers.
89 @param ImageHandle The firmware allocated handle for the UEFI image.
90 @param SystemTable A pointer to the EFI System Table.
92 @retval EFI_SUCCESS The operation completed successfully.
93 @retval Others An unexpected error occurred.
97 HttpUtilitiesDxeDriverEntryPoint (
98 IN EFI_HANDLE ImageHandle
,
99 IN EFI_SYSTEM_TABLE
*SystemTable
109 // Install the HttpUtilities Protocol onto Handle
111 Status
= gBS
->InstallMultipleProtocolInterfaces (
113 &gEfiHttpUtilitiesProtocolGuid
,
114 &mHttpUtilitiesProtocol
,