在USES clause: Registry
function GetRegDataType ( const strRegPath, strRegValue: string ): string;
var
regRegistry: TRegistry;
S: string;
begin
try
regRegistry := TRegistry.Create;
regRegistry.RootKey := HKEY_LOCAL_MACHINE;
if regRegistry.OpenKey ( strRegPath, false ) then begin
case Reg.getDataType ( strRegValue ) of
rdUnknown: S := 'Unknown';
rdString: S := 'String';
rdExpandString: S := 'ExpandString';
rdInteger: S := 'Integer';
rdBinary: S := 'Binary';
end;
end else
s := 'Can not get data type.';
finally
regRegistry.Free;
end;
result := s;
end
function GetRegDataType ( const strRegPath, strRegValue: string ): string;
var
regRegistry: TRegistry;
S: string;
begin
try
regRegistry := TRegistry.Create;
regRegistry.RootKey := HKEY_LOCAL_MACHINE;
if regRegistry.OpenKey ( strRegPath, false ) then begin
case Reg.getDataType ( strRegValue ) of
rdUnknown: S := 'Unknown';
rdString: S := 'String';
rdExpandString: S := 'ExpandString';
rdInteger: S := 'Integer';
rdBinary: S := 'Binary';
end;
end else
s := 'Can not get data type.';
finally
regRegistry.Free;
end;
result := s;
end
浙公网安备 33010602011771号