Use this UEFI Runtime Service to retrieve information about the container used to store UEFI variables including their size, available space, and the maximum size of a single UEFI variable.
In general, UEFI Drivers do not use UEFI variables, and those UEFI Drivers that do use UEFI variables are provided with the UEFI system firmware where this type of information is usually already known. As a result, this service is rarely used by UEFI Drivers. It is more typically used by OS installers and OS kernels to determine the platform storage capabilities for UEFI variables.
The following code fragment shows how the QueryVariableInfo() service is used to collect information storage containers for UEFI variables that persist across reboots and power cycles and are available in both the pre-boot environment and by the OS.
Example 68-Collect information about the UEFI variable store