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.
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);
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;
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);
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);
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);
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) {
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);