2012年9月21日 星期五

How to include and make use of .uni files to your EDKII/UDK applications.

Well. Today i need to build up a helper to my efi application. I check for the sample in network package. I found one way. Steps as below.


  1.  put all your helper text into a uni file. for example: myhelp.uni
  2. add myhelp.uni to [Sources]. This will trigger the HII compiler to autogen related HII data structure.
  3. Initialize your HII handle with HiiAddPackages                                                                mHiiHandle = HiiAddPackages (&gEfiCallerIdGuid, ImageHandle, BASE_NAMEStrings, NULL);                                                                                         IMPORTANT! the third parameter should be your BASE_NAME in your inf file with "Strings" appended. This is due to autogen will use this fixed variable name.
  4. You can use ShellPrintHiiEx function to display Messages.                                           ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PING6_INVALID_INPUT), mHiiHandle);