diff --git a/apps/drv0.c b/apps/drv0.c index 3e376bb..1d0c06f 100644 --- a/apps/drv0.c +++ b/apps/drv0.c @@ -164,7 +164,7 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SysTab) /* Grab handle to this image: we'll attach our proto instance to it */ Status = uefi_call_wrapper(BS->OpenProtocol, 6, ImageHandle, &LoadedImageProtocol, - NULL, ImageHandle, + (void**)&LoadedImage, ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); if (EFI_ERROR(Status)) { Print(L"Could not open loaded image protocol: %d\n", Status); diff --git a/apps/drv0.h b/apps/drv0.h index 26d2ffd..cf0e054 100644 --- a/apps/drv0.h +++ b/apps/drv0.h @@ -7,21 +7,19 @@ extern "C" { /* UEFI naming conventions */ #define GNU_EFI_APPS_DRV0_PROTOCOL_GUID \ -{ 0xe4dcafd0, 0x586c, 0x4b3d, {0x86, 0xe7, 0x28, 0xde, 0x7f, 0xcc, 0x04, 0xb8} } +{ 0xe4dcafd0, 0x586c, 0x4b3d, {0x86, 0xe7, 0x28, 0xde, 0x7f, 0xcc, 0x04, 0xb9} } INTERFACE_DECL(_GNU_EFI_APPS_DRV0_PROTOCOL); typedef EFI_STATUS (EFIAPI *GNU_EFI_APPS_DRV0_SAY_HELLO) ( - IN struct _GNU_EFI_APPS_DRV0_PROTOCOL *This, IN const CHAR16 *HelloWho ); typedef EFI_STATUS (EFIAPI *GNU_EFI_APPS_DRV0_GET_NUMBER_OF_HELLO) ( - IN struct _GNU_EFI_APPS_DRV0_PROTOCOL *This, OUT UINTN *NumberOfHello ); diff --git a/apps/drv0_use.c b/apps/drv0_use.c index 8a06d91..d8688cf 100644 --- a/apps/drv0_use.c +++ b/apps/drv0_use.c @@ -23,7 +23,7 @@ PlayWithGnuEfiAppsDrv0Protocol(IN EFI_HANDLE DrvHandle) { Status = uefi_call_wrapper(BS->OpenProtocol, 6, DrvHandle, &GnuEfiAppsDrv0ProtocolGuid, - NULL, + (void**)&drv, DrvHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); @@ -32,12 +32,12 @@ PlayWithGnuEfiAppsDrv0Protocol(IN EFI_HANDLE DrvHandle) { return Status; } - Status = uefi_call_wrapper(drv->SayHello, 2, drv, L"Sample UEFI Driver"); + Status = uefi_call_wrapper(drv->SayHello, 2, L"Sample UEFI Driver"); if (EFI_ERROR(Status)) { Print(L"Cannot call SayHello: %d\n", Status); } - Status = uefi_call_wrapper(drv->GetNumberOfHello, 2, drv, &NumberOfHello); + Status = uefi_call_wrapper(drv->GetNumberOfHello, 2, &NumberOfHello); if (EFI_ERROR(Status)) { Print(L"Cannot call GetNumberOfHello: %d\n", Status); } else {