Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Services Runtime Services
Version 1.10 12/01/02 6-5
GetNextVariableName()
Summary
Enumerates the current variable names.
Prototype
EFI_STATUS
GetNextVariableName (
IN OUT UINTN *VariableNameSize,
IN OUT CHAR16 *VariableName,
IN OUT EFI_GUID *VendorGuid
);
Parameters
VariableNameSize The size of the VariableName buffer.
VariableName On input, supplies the last VariableName that was returned
by GetNextVariableName(). On output, returns the Null-
terminated Unicode string of the current variable.
VendorGuid On input, supplies the last VendorGuid that was returned by
GetNextVariableName(). On output, returns the
VendorGuid of the current variable. Type EFI_GUID is
defined in the InstallProtocolInterface()
function
description.
Description
GetNextVariableName() is called multiple times to retrieve the VariableName and
VendorGuid of all variables currently available in the system. On each call to
GetNextVariableName() the previous results are passed into the interface, and on output the
interface returns the next variable name data. When the entire variable list has been returned, the
error EFI_NOT_FOUND is returned.
Note that if EFI_BUFFER_TOO_SMALL is returned, the VariableName buffer was too small
for the next variable. When such an error occurs, the VariableNameSize is updated to reflect
the size of buffer needed. In all cases when calling GetNextVariableName() the
VariableNameSize must not exceed the actual buffer size that was allocated for
VariableName.
To start the search, a Null-terminated string is passed in VariableName; that is,
VariableName is a pointer to a Null Unicode character. This is always done on the initial call to
GetNextVariableName(). When VariableName is a pointer to a Null Unicode character,
VendorGuid is ignored. GetNextVariableName() cannot be used as a filter to return
variable names with a specific GUID. Instead, the entire list of variables must be retrieved, and the