public uint[] GetFirmwareVersionEx()
{
ICapabilitiesUnion caps;
// Get build string and Revision number
GetCapability(Cap.TpmProperties, (uint)Pt.Revision, 256, out caps);
var props = (TaggedTpmPropertyArray)caps;
TaggedProperty[] arr = props.tpmProperty;
uint fwV1 = 0, fwV2 = 0;
uint revision = 0;
foreach (TaggedProperty p in arr)
{
if (p.property == Pt.FirmwareVersion1)
{
fwV1 = p.value;
}
if (p.property == Pt.FirmwareVersion2)
{
fwV2 = p.value;
}
if (p.property == Pt.Revision)
{
revision = p.value;
}
}
var ret = new[] {fwV1, fwV2, revision};
return ret;
}