1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| {To show the mapping of enumeration entries to API types,
here are the updated type and the conversion functions
for the missing types:}
TRegDataType = (rdUnknown, rdNone, rdString, rdExpandString, rdBinary,
rdInteger, rdLittleEndianInteger, rdBigEndianInteger,
rdLink, rdMultiString, rdResourceList,
rdFullResourceDescriptor, rdResourceRequirementsList,
rdInt64, rdLittleEndianInt64);
function RegDataToDataType(Value: TRegDataType): Integer;
begin
case Value of
rdNone: Result := REG_NONE;
rdString: Result := REG_SZ;
rdExpandString: Result := REG_EXPAND_SZ;
rdBinary: Result := REG_BINARY;
rdInteger: Result := REG_DWORD;
rdLittleEndianInteger: Result := REG_DWORD_LITTLE_ENDIAN;
rdBigEndianInteger: Result := REG_DWORD_BIG_ENDIAN;
rdLink: Result := REG_LINK;
rdMultiString: Result := REG_MULTI_SZ;
rdResourceList: Result := REG_RESOURCE_LIST;
rdFullResourceDescriptor: Result := REG_FULL_RESOURCE_DESCRIPTOR;
rdResourceRequirementsList: Result := REG_RESOURCE_REQUIREMENTS_LIST;
rdInt64: Result := REG_QWORD;
rdLittleEndianInt64: Result := REG_QWORD_LITTLE_ENDIAN;
else
Result := REG_NONE;
end;
end;
function DataTypeToRegData(Value: Integer): TRegDataType;
begin
if Value = REG_NONE then Result := rdNone
else if Value = REG_SZ then Result := rdString
else if Value = REG_EXPAND_SZ then Result := rdExpandString
else if Value = REG_BINARY then Result := rdBinary
else if Value = REG_DWORD then Result := rdInteger
else if Value = REG_DWORD_LITTLE_ENDIAN then Result := rdLittleEndianInteger
else if Value = REG_DWORD_BIG_ENDIAN then Result := rdBigEndianInteger
else if Value = REG_LINK then Result := rdLink
else if Value = REG_MULTI_SZ then Result := rdMultiString
else if Value = REG_RESOURCE_LIST then Result := rdResourceList
else if Value = REG_FULL_RESOURCE_DESCRIPTOR then Result := rdFullResourceDescriptor
else if Value = REG_RESOURCE_REQUIREMENTS_LIST then Result := rdResourceRequirementsList
else if Value = REG_QWORD then Result := rdInt64
else if Value = REG_QWORD_LITTLE_ENDIAN then Result := rdLittleEndianInt64
else Result := rdUnknown;
end; |
Partager