/* If OpCodeHandle is NULL, then ASSERT(). If Guid is NULL, then ASSERT(). If OpCodeSize < sizeof (EFI_IFR_GUID), then ASSERT(). */
UINT8* EFIAPI HiiCreateGuidOpCode(IN VOID *OpCodeHandle, IN CONST EFI_GUID *Guid, IN CONST VOID *GuidOpCode OPTIONAL, IN UINTN OpCodeSize)
/* If OpCodeHandle is NULL, then ASSERT(). If Guid is NULL, then ASSERT(). If OpCodeSize < sizeof (EFI_IFR_GUID), then ASSERT(). */
UINT8* EFIAPI HiiCreateGuidOpCode(IN VOID *OpCodeHandle, IN CONST EFI_GUID *Guid, IN CONST VOID *GuidOpCode OPTIONAL, IN UINTN OpCodeSize)
{
  EFI_IFR_GUID  OpCode;
  EFI_IFR_GUID  *OpCodePointer;
  ASSERT (Guid != NULL);
  ASSERT (OpCodeSize >= sizeof (OpCode));
  ZeroMem (&OpCode, sizeof (OpCode));
  CopyGuid ((EFI_GUID *)(VOID *)&OpCode.Guid, Guid);
  OpCodePointer = (EFI_IFR_GUID *)InternalHiiCreateOpCodeExtended (
                                    OpCodeHandle,
                                    &OpCode,
                                    EFI_IFR_GUID_OP,
                                    sizeof (OpCode),
                                    OpCodeSize - sizeof (OpCode),
                                    0
                                    );
  if ((OpCodePointer != NULL) && (GuidOpCode != NULL)) {
    CopyMem (OpCodePointer + 1, (EFI_IFR_GUID *)GuidOpCode + 1, OpCodeSize - sizeof (OpCode));
  }
  return (UINT8 *)OpCodePointer;
}