diff --git a/src/pw3270/common.h b/src/pw3270/common.h index 501bc66..0165313 100644 --- a/src/pw3270/common.h +++ b/src/pw3270/common.h @@ -32,6 +32,7 @@ #include #ifdef _WIN32 + #include #include #endif // _WIN32 diff --git a/src/pw3270/windows/config.c b/src/pw3270/windows/config.c index 0f5cd71..1b0e980 100644 --- a/src/pw3270/windows/config.c +++ b/src/pw3270/windows/config.c @@ -32,6 +32,8 @@ #include "../pw3270/private.h" #include "../common.h" + #include + #include #include #include #include @@ -100,6 +102,13 @@ return TRUE; } + if(RegCreateKey(HKEY_CURRENT_USER,path,hKey) == ERROR_SUCCESS) { + g_message("Registry key %s was created",path); + return TRUE; + } + + g_warning("Can“t create registry key for %s",path); + return FALSE; } @@ -135,28 +144,6 @@ } - /* - static BOOL registry_open_key(const gchar *group, const gchar *key, REGSAM samDesired, HKEY *hKey) - { - static HKEY predefined[] = { HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE }; - int f; - gchar * path = g_strdup_printf("%s\\%s\\%s",registry_path,g_get_application_name(),group); - - for(f=0;f