/* Note: this function cannot be used when (UINTN)(-1), (0xFFFFFFFF) may be a valid result. Use ShellConvertStringToUint64 instead. */
UINTN EFIAPI ShellHexStrToUintn(IN CONST CHAR16 *String)
/* Note: this function cannot be used when (UINTN)(-1), (0xFFFFFFFF) may be a valid result. Use ShellConvertStringToUint64 instead. */
UINTN EFIAPI ShellHexStrToUintn(IN CONST CHAR16 *String)
{
  UINT64  RetVal;
  if (!EFI_ERROR (ShellConvertStringToUint64 (String, &RetVal, TRUE, TRUE))) {
    return ((UINTN)RetVal);
  }
  return ((UINTN)(-1));
}