/* If OpCodeHandle is NULL, then ASSERT(). If Type is invalid, then ASSERT(). */
UINT8* EFIAPI HiiCreateDefaultOpCode(IN VOID *OpCodeHandle, IN UINT16 DefaultId, IN UINT8 Type, IN UINT64 Value)
/* If OpCodeHandle is NULL, then ASSERT(). If Type is invalid, then ASSERT(). */
UINT8* EFIAPI HiiCreateDefaultOpCode(IN VOID *OpCodeHandle, IN UINT16 DefaultId, IN UINT8 Type, IN UINT64 Value)
{
  EFI_IFR_DEFAULT  OpCode;
  ASSERT (Type < EFI_IFR_TYPE_OTHER);
  ZeroMem (&OpCode, sizeof (OpCode));
  OpCode.Type      = Type;
  OpCode.DefaultId = DefaultId;
  CopyMem (&OpCode.Value, &Value, mHiiDefaultTypeToWidth[Type]);
  return InternalHiiCreateOpCode (OpCodeHandle, &OpCode, EFI_IFR_DEFAULT_OP, OFFSET_OF (EFI_IFR_DEFAULT, Value) + mHiiDefaultTypeToWidth[Type]);
}