hi diese function hab ich von DelphiWorks_NCL
Code:
//******************************************************************************
//Global
//String in HKEY umwandeln
Function StrToHKEY_GU(input_s : String): HKEY;
begin
Result := INVALID_HANDLE_VALUE;
if (input_s = 'HKEY_CLASSES_ROOT') then
begin
Result := HKEY_CLASSES_ROOT;
end
else if (input_s = 'HKEY_CURRENT_USER') then
begin
Result := HKEY_CURRENT_USER;
end
else if (input_s = 'HKEY_LOCAL_MACHINE')then
begin
Result := HKEY_LOCAL_MACHINE;
end
else if (input_s = 'HKEY_USERS') then
begin
Result := HKEY_USERS;
end
else if (input_s = 'HKEY_PERFORMANCE_DATA') then
begin
Result := HKEY_PERFORMANCE_DATA;
end
else if (input_s = 'HKEY_CURRENT_CONFIG') then
begin
Result := HKEY_CURRENT_CONFIG;
end
else if (input_s = 'HKEY_DYN_DATA') then
begin
Result:= HKEY_DYN_DATA;
end
else if (input_s = 'HKEY_LOCAL_MACHINE') then
begin
Result := HKEY_LOCAL_MACHINE;
end;
end;