/* Allocates and returns a new OpCode Handle. OpCode Handles must be freed with  */
VOID* EFIAPI HiiAllocateOpCodeHandle(VOID)
/* Allocates and returns a new OpCode Handle. OpCode Handles must be freed with  */
VOID* EFIAPI HiiAllocateOpCodeHandle(VOID)
{
  HII_LIB_OPCODE_BUFFER  *OpCodeBuffer;
  OpCodeBuffer = (HII_LIB_OPCODE_BUFFER *)AllocatePool (sizeof (HII_LIB_OPCODE_BUFFER));
  if (OpCodeBuffer == NULL) {
    return NULL;
  }
  OpCodeBuffer->Buffer = (UINT8 *)AllocatePool (HII_LIB_OPCODE_ALLOCATION_SIZE);
  if (OpCodeBuffer->Buffer == NULL) {
    FreePool (OpCodeBuffer);
    return NULL;
  }
  OpCodeBuffer->BufferSize = HII_LIB_OPCODE_ALLOCATION_SIZE;
  OpCodeBuffer->Position   = 0;
  return (VOID *)OpCodeBuffer;
}