<div dir="ltr">As my previous email, I mentioned that I am able to find the protocol since the LocateProtocol returns 0 (EFI_SUCCESS) (using the exact code you wrote) . But when I want to open it either with OpenProtocol or HandleProtocol I get a RETURN_UNSUPPORTED. Are you implying that by calling LocateProtocol() the protocol would also be opened? or do I still need to open it? if I still need to open then I am still getting the UNSUPPORTED Status.<div>But if I don't need to open it I still don't know why I am not able to use the GOP methods. </div><div>one example of the many examples which I get this error is as below:</div><div><br></div><div><br></div><div>Status = gBS->HandleProtocol (SystemTable->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID **)&GraphicsOutput);<br>  if (EFI_ERROR (Status)) {<br>    Status = gBS->LocateProtocol (&gEfiGraphicsOutputProtocolGuid, NULL, (VOID **)&GraphicsOutput);<br>    if (EFI_ERROR (Status)) {<br>      Print (L"Error: Could not find a GOP instance!\n");<br>      Status = EFI_NOT_FOUND;<br>      goto Done;<br>    }<br>  }<br></div><div>Blt         = NULL;<br>  ImageWidth  = 0;<br>  ImageHeight = 0;<br>  Status      =  TranslateBmpToGopBlt (<br>                   BmpFileData,<br>                   BmpFileSize,<br>                   &Blt,<br>                   &BltSize,<br>                   &ImageHeight,<br>                   &ImageWidth<br>                   );<br></div><div>It is worth mentioning that the BmpFIleData and BmpFileSize are valid variables with the proper data stored. Anyways, the status code for the TranslateBmpToGopBlt returns a RETURN_UNSUPPORTED. This is the same with other GOP methods</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 8, 2023 at 12:36 PM Michael Brown <<a href="mailto:mcb30@ipxe.org">mcb30@ipxe.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 08/02/2023 08:03, Alireza Banejad wrote:<br>
> Below is how I use the HandleProtocol function:<br>
> <br>
>    Status = gBS->HandleProtocol (<br>
>                    gST->ConsoleOutHandle,<br>
>                    &gEfiGraphicsOutputProtocolGuid,<br>
>                    (VOID **)&GraphicsOutput<br>
>                    );<br>
<br>
You are querying only the ConsoleOutHandle, which is not necessarily <br>
where the GOP will be installed.<br>
<br>
Use LocateProtocol() to find the protocol instance instead:<br>
<br>
<br>
   Status = gBS->LocateProtocol(&gEfiGraphicsOutputProtocolGuid, NULL,<br>
                                (VOID **)&GraphicsOutput);<br>
<br>
HTH,<br>
<br>
Michael<br>
<br>
</blockquote></div>


<div width="1" style="color:white;clear:both">_._,_._,_</div>
<hr>


Groups.io Links:<p>


  
    You receive all messages sent to this group.
  
  


<p>
<a target="_blank" href="https://edk2.groups.io/g/devel/message/99791">View/Reply Online (#99791)</a> |


  

|

  <a target="_blank" href="https://groups.io/mt/96810830/1813853">Mute This Topic</a>

| <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>




<a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> |
<a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |

<a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>

 [edk2-devel-archive@redhat.com]<br>
<div width="1" style="color:white;clear:both">_._,_._,_</div>