/* Function to take the destination path and target file name to generate the full destination path. */
EFI_STATUS CreateFullDestPath(IN CONST CHAR16 **DestPath, OUT CHAR16 **FullDestPath, IN CONST CHAR16 *FileName)
/* Function to take the destination path and target file name to generate the full destination path. */
EFI_STATUS CreateFullDestPath(IN CONST CHAR16 **DestPath, OUT CHAR16 **FullDestPath, IN CONST CHAR16 *FileName)
{
  UINTN  Size;
  if ((FullDestPath == NULL) || (FileName == NULL) || (DestPath == NULL) || (*DestPath == NULL)) {
    return (EFI_INVALID_PARAMETER);
  }
  Size = StrSize (*DestPath) + StrSize (FileName);
  *FullDestPath = AllocateZeroPool (Size);
  if (*FullDestPath == NULL) {
    return (EFI_OUT_OF_RESOURCES);
  }
  StrCpyS (*FullDestPath, Size / sizeof (CHAR16), *DestPath);
  if (((*FullDestPath)[StrLen (*FullDestPath)-1] != L'\\') && (FileName[0] != L'\\')) {
    StrCatS (*FullDestPath, Size / sizeof (CHAR16), L"\\");
  }
  StrCatS (*FullDestPath, Size / sizeof (CHAR16), FileName);
  return (EFI_SUCCESS);
}