This subroutine sets or extracts binary data types (used for binary file operations or uefi variables). When variant is a binary data type and binvartoupdate is not provided then this subroutine exacts data from variant to create a new variable of type. When variant is not a binary data type or binvartoupdate is provided then this subroutine returns a new binary data type. When not provided the optional parameters are zero.
The values for type are as follows:
0 = String;
1 = Hex String;
2 = Wide String;
3 = Numeric;
4 = Binary.
The startoffset is the zero based starting offset to the data to extract from or set in newvariant. The length specifies the number of bytes of data to extract from or set in newvariant. When the length is zero it is assumed to be the same length as variant. When binvartoupdate is provided it will be used as the basis of newvariant to allow updating an existing binary variable.
This subroutine was added in TBSVER 3 and enhanced with type, startoffset, length, and binvartoupdate in TBSVER 9.