Commit ff253193 authored by Jan Köster's avatar Jan Köster
Browse files

test

parent f384ceb8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4,3 +4,5 @@ build/*
/.vs
/out/build/x64-Debug
/out/install/x64-Debug
/out/*
/build-release/*
 No newline at end of file
+3 −1
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ if(INIPARSER_FOUND)
    )
endif()

set(REGEDIT_FOUND FALSE CACHE BOOL "Windows Reg Support")

if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
    set(REGEDIT_FOUND TRUE)
    set(regeditsrc regedit/regedit.cpp)
+3 −14
Original line number Diff line number Diff line
@@ -89,7 +89,6 @@ namespace confplus {
     * Verwendet einen Stack anstelle von Rekursion.
     */
    void Registry::loadsubKey(Config* conf, HKEY hRootKey, const std::string& rootConfigPath) {
        std::cout << "[DEBUG] Entering loadsubKey. Root Path: " << rootConfigPath << std::endl;
        std::stack<KeyState> keyStack;

        // Initialisiere den Stack mit dem Startschlüssel.
@@ -158,11 +157,6 @@ namespace confplus {
                    valueNameStr = "@DEFAULT";
                }
                
                std::transform(
                    valueNameStr.begin(), valueNameStr.end(), valueNameStr.begin(),
                    [](unsigned char c){ return std::toupper(c); }
                );
                
                std::string cname = currentConfigPath;
                size_t pos = 0;
                bool is_array_index = true;
@@ -247,11 +241,6 @@ namespace confplus {
                lRes = RegOpenKeyExA(hKey, subKeyNameBuffer.get(), 0, KEY_READ, &hSubKey);
                
                if (lRes == ERROR_SUCCESS) {
                    std::transform(
                        subKeyNameStr.begin(), subKeyNameStr.end(), subKeyNameStr.begin(),
                        [](unsigned char c){ return std::toupper(c); }
                    );
                    
                    std::string nextConfigPath = currentConfigPath + "/" + subKeyNameStr;
                    // true: hSubKey wird geschlossen, wenn er vom Stack geholt und verarbeitet wurde
                    keyStack.push({hSubKey, nextConfigPath, true});
@@ -470,8 +459,8 @@ namespace confplus {
        }
    OpenKey:
        LONG lRes = RegCreateKeyExA(
            hRootKey, // Nutzt den globalen Root-Key
            path,
            hRootKey,
            subKeyPath.c_str(),
            0, NULL, REG_OPTION_NON_VOLATILE,
            KEY_ALL_ACCESS,
            NULL, &hRootKey, &dwDisposition