/* Creates a new variable serialization instance using the given binary representation of the variables to fill the new instance */
RETURN_STATUS EFIAPI SerializeVariablesNewInstanceFromBuffer(OUT EFI_HANDLE *Handle, IN VOID *Buffer, IN UINTN Size)
/* Creates a new variable serialization instance using the given binary representation of the variables to fill the new instance */
RETURN_STATUS EFIAPI SerializeVariablesNewInstanceFromBuffer(OUT EFI_HANDLE *Handle, IN VOID *Buffer, IN UINTN Size)
{
  RETURN_STATUS  Status;
  Status = SerializeVariablesNewInstance (Handle);
  if (RETURN_ERROR (Status)) {
    return Status;
  }
  Status = IterateVariablesInBuffer (
             IterateVariablesCallbackNop,
             NULL,
             Buffer,
             Size
             );
  if (RETURN_ERROR (Status)) {
    SerializeVariablesFreeInstance (*Handle);
    return Status;
  }
  Status = IterateVariablesInBuffer (
             IterateVariablesCallbackSetInInstance,
             (VOID *)*Handle,
             Buffer,
             Size
             );
  if (RETURN_ERROR (Status)) {
    SerializeVariablesFreeInstance (*Handle);
    return Status;
  }
  return Status;
}