/* This is an internal worker function to get the Component Name (2) protocol interface and the language it supports. */
EFI_STATUS DriverHealthManagerGetComponentNameWorker(IN EFI_GUID *ProtocolGuid, IN EFI_HANDLE DriverBindingHandle, OUT EFI_COMPONENT_NAME_PROTOCOL **ComponentName, OUT CHAR8 **SupportedLanguage)
/* This is an internal worker function to get the Component Name (2) protocol interface and the language it supports. */
EFI_STATUS DriverHealthManagerGetComponentNameWorker(IN EFI_GUID *ProtocolGuid, IN EFI_HANDLE DriverBindingHandle, OUT EFI_COMPONENT_NAME_PROTOCOL **ComponentName, OUT CHAR8 **SupportedLanguage)
{
  EFI_STATUS  Status;
  Status = gBS->OpenProtocol (
                  DriverBindingHandle,
                  ProtocolGuid,
                  (VOID **)ComponentName,
                  NULL,
                  NULL,
                  EFI_OPEN_PROTOCOL_GET_PROTOCOL
                  );
  if (EFI_ERROR (Status)) {
    return Status;
  }
  *SupportedLanguage = DriverHealthManagerSelectBestLanguage (
                         (*ComponentName)->SupportedLanguages,
                         (BOOLEAN)(ProtocolGuid == &gEfiComponentNameProtocolGuid)
                         );
  if (*SupportedLanguage == NULL) {
    Status = EFI_UNSUPPORTED;
  }
  return Status;
}