Suppose a name/value storage has been defined in VFR file like below:

  //
  // Define a name/value storage (EFI_IFR_VARSTORE_NAME_VALUE)
  //
  namevaluevarstore NameValueVar1,
     name = STRING_TOKEN(STR_VALUE1),
     name = STRING_TOKEN(STR_VALUE2),
    guid = ABC_FORMSET_GUID;


Now to create a one-of drop down menu list dynamically, I need to invoke 
HiiCreateOneOfOpCode in the callback function of HiiConfigAccess. However
how should I set the Storage ID to the name/value storage NameValueVar1 in the 
function? Following is what it looks like (note namevaluevarstore
does not support varid descriptor in VFR):

  HiiCreateOneOfOpCode (
    StartOpCodeHandle,                  // Handle to the buffer of opcodes
    KEY_Q1,                             // Question ID
    STRING_TOKEN (STR_VALUE1),          // <===== incorrect Storage ID?
    0,                                  // Offset in storage
    STRING_TOKEN (STR_XXX_PROMPT),      // String ID for prompt
    STRING_TOKEN (STR_XXX_HELP),        // String ID for help
    EFI_IFR_FLAG_CALLBACK,              // Flags in Question header
    EFI_IFR_TYPE_NUM_SIZE_8,            // Flags for oneof opcode
    OptionsOpCodeHandle,                // ONE_OF_OPTION opcode handle
    NULL                                // Default opcode handle, OPTIONAL
);


Tried all different ways without success. Any comments/hints would be greatly 
appreciated.


Thanks,
Simon

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to