Information in form1.JvComputerInfoEx1.CPU.SSE is stored as TSSESupports. My question is how data is actually stored in TSSESupports and how to convert to plain string?
The wiki page is not very helpful in this matter.
Information in form1.JvComputerInfoEx1.CPU.SSE is stored as TSSESupports. My question is how data is actually stored in TSSESupports and how to convert to plain string?
The wiki page is not very helpful in this matter.
Look at the JCL sources.
type
TSSESupport = (sse, sse2, sse3, ssse3, sse4A, sse4B, sse5);
TSSESupports = set of TSSESupport;
So, TSSESupports is a set. Values in a set are stored bitwise. You can test if a value is in set by "in" operator.
var
Value: TSSESupports;
begin
if sse in Value then
ShowMessage('Supports SSE');
end;
But the easiest way of converting a set into a string is using RTTI function "SetToString"
uses System.TypInfo, JclSysinfo;
var
Value: TSSESupports;
pTI: PTypeInfo;
S: string;
begin
pTI := TypeInfo(TSSESupports);
S := SetToString(pTI, Word(Value));
ShowMessage(S);
end;