/* Finds and returns the version of the driver specified by TheHandle. */
UINT32 ReturnDriverVersion(IN CONST EFI_HANDLE TheHandle)
/* Finds and returns the version of the driver specified by TheHandle. */
UINT32 ReturnDriverVersion(IN CONST EFI_HANDLE TheHandle)
{
  EFI_DRIVER_BINDING_PROTOCOL  *DriverBinding;
  EFI_STATUS                   Status;
  UINT32                       RetVal;
  RetVal = (UINT32)-1;
  Status = gBS->OpenProtocol ((EFI_HANDLE)TheHandle, &gEfiDriverBindingProtocolGuid, (VOID **)&DriverBinding, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
  if (!EFI_ERROR (Status)) {
    RetVal = DriverBinding->Version;
    gBS->CloseProtocol (TheHandle, &gEfiDriverBindingProtocolGuid, gImageHandle, NULL);
  }
  return (RetVal);
}