/* Verify the Guided Section GUID by checking if there is the Guided Section GUID configuration table recorded the GUID itself. */
BOOLEAN VerifyGuidedSectionGuid(IN EFI_GUID *GuidedSectionGuid, OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL **GuidedSectionExtraction)
/* Verify the Guided Section GUID by checking if there is the Guided Section GUID configuration table recorded the GUID itself. */
BOOLEAN VerifyGuidedSectionGuid(IN EFI_GUID *GuidedSectionGuid, OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL **GuidedSectionExtraction)
{
  EFI_GUID    *GuidRecorded;
  VOID        *Interface;
  EFI_STATUS  Status;
  Interface = NULL;
  Status = EfiGetSystemConfigurationTable (GuidedSectionGuid, (VOID **)&GuidRecorded);
  if (Status == EFI_SUCCESS) {
    if (CompareGuid (GuidRecorded, GuidedSectionGuid)) {
      Status = CoreLocateProtocol (GuidedSectionGuid, NULL, (VOID **)&Interface);
      if (!EFI_ERROR (Status) && (Interface != NULL)) {
        *GuidedSectionExtraction = (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *)Interface;
        return TRUE;
      }
      return FALSE;
    }
  }
  return FALSE;
}