From e31d9c5bcd8f14160764e960e385bde763b9c811 Mon Sep 17 00:00:00 2001 From: Konstantin Aladyshev Date: Mon, 14 Mar 2022 12:08:51 +0300 Subject: Rename Lesson_Checkbox to Lesson_63 Signed-off-by: Konstantin Aladyshev --- .../DisplayHIIByGuid/DisplayHIIByGuid.c | 75 ++++++++++++++++++++++ .../DisplayHIIByGuid/DisplayHIIByGuid.inf | 29 +++++++++ 2 files changed, 104 insertions(+) create mode 100644 Lessons/Lesson_63/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.c create mode 100644 Lessons/Lesson_63/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.inf (limited to 'Lessons/Lesson_63/UefiLessonsPkg/DisplayHIIByGuid') diff --git a/Lessons/Lesson_63/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.c b/Lessons/Lesson_63/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.c new file mode 100644 index 0000000..7c3c8fa --- /dev/null +++ b/Lessons/Lesson_63/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.c @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2021, Konstantin Aladyshev + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +#include +#include +#include + +INTN +EFIAPI +ShellAppMain ( + IN UINTN Argc, + IN CHAR16 **Argv + ) +{ + if (Argc <=1) { + Print(L"Usage:\n"); + Print(L" DisplayHIIByGuid [ [ [...]]]\n"); + return EFI_INVALID_PARAMETER; + } + + GUID* Guids = (GUID*)AllocatePool(sizeof(GUID)*(Argc-1)); + + for (UINTN i=1; iLocateProtocol(&gEfiFormBrowser2ProtocolGuid, NULL, (VOID**)&FormBrowser2); + if (EFI_ERROR(Status)) { + return Status; + } + + Status = FormBrowser2->SendForm ( + FormBrowser2, + Handle, + 1, + NULL, + 0, + NULL, + NULL + ); + +*/ + FreePool(Handle); + FreePool(Guids); + + return EFI_SUCCESS; +} diff --git a/Lessons/Lesson_63/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.inf b/Lessons/Lesson_63/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.inf new file mode 100644 index 0000000..bb22a5e --- /dev/null +++ b/Lessons/Lesson_63/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.inf @@ -0,0 +1,29 @@ +## +# Copyright (c) 2021, Konstantin Aladyshev +# +# SPDX-License-Identifier: MIT +## + +[Defines] + INF_VERSION = 1.25 + BASE_NAME = DisplayHIIByGuid + FILE_GUID = 1597e1d0-7f62-4631-a166-703f03bd7223 + MODULE_TYPE = UEFI_APPLICATION + VERSION_STRING = 1.0 + ENTRY_POINT = ShellCEntryLib + +[Sources] + DisplayHIIByGuid.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + +[LibraryClasses] + UefiApplicationEntryPoint + UefiLib + ShellCEntryLib + HiiLib + +[Protocols] + gEfiFormBrowser2ProtocolGuid -- cgit v1.2.3-18-g5258