X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Fapplication%2Fregistry_config.cpp;h=9542f9e215141a7cc523e2c736c93f07bfae07d7;hb=1861d3b31859eb77797f7834982cc72ad605a008;hp=96f9fc929f3a64180a2927d60f99d7eaa2935b66;hpb=cfd4b817219daac2fec679b67119112d5efe9b92;p=feisty_meow.git diff --git a/nucleus/library/application/registry_config.cpp b/nucleus/library/application/registry_config.cpp index 96f9fc92..9542f9e2 100644 --- a/nucleus/library/application/registry_config.cpp +++ b/nucleus/library/application/registry_config.cpp @@ -23,7 +23,7 @@ using namespace basis; using namespace filesystem; using namespace structures; -#ifdef __WIN32__ +#ifdef _MSC_VER // this implementation only works on windows currently. //hmmm: i suppose we could fake it with an ini file. @@ -106,7 +106,7 @@ bool registry_configurator::put(const astring §ion_in, const astring &entry, if (!to_store.length()) return delete_entry(section, entry); else if (!section.length()) return false; -#ifdef __WIN32__ +#ifdef _MSC_VER HKEY key; long ret = RegOpenKeyEx((HKEY)translate_hive(_hive), to_unicode_temp(section), 0, KEY_WRITE, &key); @@ -114,8 +114,8 @@ bool registry_configurator::put(const astring §ion_in, const astring &entry, LOG("failed to open the key, trying to create it."); DWORD dispose; // the disposition of the call (created or existing). ret = RegCreateKeyEx((HKEY)translate_hive(_hive), - to_unicode_temp(section), 0, NIL, REG_OPTION_NON_VOLATILE, - KEY_ALL_ACCESS, NIL, &key, &dispose); + to_unicode_temp(section), 0, NULL_POINTER, REG_OPTION_NON_VOLATILE, + KEY_ALL_ACCESS, NULL_POINTER, &key, &dispose); if (ret != ERROR_SUCCESS) { LOG("failed to create the key!!"); return false; @@ -145,7 +145,7 @@ bool registry_configurator::get(const astring §ion_in, const astring &entry, if (!section_in) return false; if (!entry) {} // not a problem. astring section = fix_section(section_in); -#ifdef __WIN32__ +#ifdef _MSC_VER HKEY key; long ret = RegOpenKeyEx((HKEY)translate_hive(_hive), to_unicode_temp(section), 0, KEY_QUERY_VALUE, &key); @@ -190,7 +190,7 @@ bool registry_configurator::get_section(const astring §ion_in, info.reset(); if (!section_in.length()) return false; astring section = fix_section(section_in); -#ifdef __WIN32__ +#ifdef _MSC_VER HKEY key; long ret = RegOpenKeyEx((HKEY)translate_hive(_hive), to_unicode_temp(section), 0, KEY_QUERY_VALUE, &key); @@ -233,7 +233,7 @@ bool registry_configurator::section_exists(const astring §ion_in) FUNCDEF("section_exists"); if (!section_in.length()) return false; astring section = fix_section(section_in); -#ifdef __WIN32__ +#ifdef _MSC_VER HKEY key; long ret = RegOpenKeyEx((HKEY)translate_hive(_hive), to_unicode_temp(section), 0, KEY_QUERY_VALUE, &key); @@ -254,7 +254,7 @@ bool registry_configurator::delete_section(const astring §ion_in) if (!section_in.length()) return false; astring section = fix_section(section_in); //if the key doesn't exist, should that be a failure? -#ifdef __WIN32__ +#ifdef _MSC_VER long ret = SHDeleteKey((HKEY)translate_hive(_hive), to_unicode_temp(section)); if (ret != ERROR_SUCCESS) { @@ -275,7 +275,7 @@ bool registry_configurator::delete_entry(const astring §ion_in, astring section = fix_section(section_in); if (!entry) {} // no problem. -#ifdef __WIN32__ +#ifdef _MSC_VER HKEY key; long ret = RegOpenKeyEx((HKEY)translate_hive(_hive), to_unicode_temp(section), 0, KEY_SET_VALUE, &key);