66
77bool ReadRegistryValue (LPCSTR rKeyName, DWORD rKeyType, void * value)
88{
9+ #ifdef LINUX // FIXME!!!
10+ return true ;
11+ #else
912 HKEY hKey = 0 ;
1013 long res = RegOpenKeyEx (REGISTRY_BASE, REGISTRY_PATH, 0 , KEY_READ, &hKey);
1114
@@ -51,10 +54,14 @@ bool ReadRegistryValue(LPCSTR rKeyName, DWORD rKeyType, void* value)
5154
5255 memcpy (value, rBuf, KeyValueSize);
5356 return true ;
57+ #endif
5458};
5559
5660bool WriteRegistryValue (LPCSTR rKeyName, DWORD rKeyType, const void * value)
5761{
62+ #ifdef LINUX // FIXME!!!
63+ return true ;
64+ #else
5865 HKEY hKey;
5966
6067 long res = RegOpenKeyEx (REGISTRY_BASE, REGISTRY_PATH, 0 , KEY_WRITE, &hKey);
@@ -93,14 +100,40 @@ bool WriteRegistryValue(LPCSTR rKeyName, DWORD rKeyType, const void* value)
93100 if (hKey)
94101 RegCloseKey (hKey);
95102 return true ;
103+ #endif
96104};
97105
98- bool ReadRegistry_StrValue (LPCSTR rKeyName, char * value) { return ReadRegistryValue (rKeyName, REG_SZ, value); }
99- void WriteRegistry_StrValue (LPCSTR rKeyName, const char * value) { WriteRegistryValue (rKeyName, REG_SZ, value); }
100- void ReadRegistry_DWValue (LPCSTR rKeyName, DWORD& value) { ReadRegistryValue (rKeyName, REG_DWORD, &value); }
101- void WriteRegistry_DWValue (LPCSTR rKeyName, const DWORD& value) { WriteRegistryValue (rKeyName, REG_DWORD, &value); }
106+ bool ReadRegistry_StrValue (LPCSTR rKeyName, char * value)
107+ {
108+ #ifdef LINUX // FIXME!!!
109+ return true ;
110+ #else
111+ return ReadRegistryValue (rKeyName, REG_SZ, value);
112+ #endif
113+ }
114+ void WriteRegistry_StrValue (LPCSTR rKeyName, const char * value)
115+ {
116+ #ifndef LINUX // FIXME!!!
117+ WriteRegistryValue (rKeyName, REG_SZ, value);
118+ #endif
119+ }
120+ void ReadRegistry_DWValue (LPCSTR rKeyName, DWORD& value)
121+ {
122+ #ifndef LINUX // FIXME!!!
123+ ReadRegistryValue (rKeyName, REG_DWORD, &value);
124+ #endif
125+ }
126+ void WriteRegistry_DWValue (LPCSTR rKeyName, const DWORD& value)
127+ {
128+ #ifndef LINUX // FIXME!!
129+ WriteRegistryValue (rKeyName, REG_DWORD, &value);
130+ #endif
131+ }
102132u32 const ReadRegistry_BinaryValue (LPCSTR rKeyName, u8 * buffer_dest, u32 const buffer_size)
103133{
134+ #ifdef LINUX // FIXME!!!
135+ return u32 (0 );
136+ #else
104137 HKEY hKey = 0 ;
105138 long res = RegOpenKeyEx (REGISTRY_BASE, REGISTRY_PATH, 0 , KEY_READ, &hKey);
106139
@@ -127,10 +160,12 @@ u32 const ReadRegistry_BinaryValue(LPCSTR rKeyName, u8* buffer_dest, u32 const b
127160 }
128161
129162 return static_cast <u32 >(tmp_buffer_size);
163+ #endif
130164}
131165
132166void WriteRegistry_BinaryValue (LPCSTR rKeyName, u8 const * buffer_src, u32 const buffer_size)
133167{
168+ #ifndef LINUX // FIXME!!!
134169 HKEY hKey;
135170
136171 long res = RegOpenKeyEx (REGISTRY_BASE, REGISTRY_PATH, 0 , KEY_WRITE, &hKey);
@@ -150,4 +185,5 @@ void WriteRegistry_BinaryValue(LPCSTR rKeyName, u8 const* buffer_src, u32 const
150185 res = RegSetValueEx (hKey, rKeyName, NULL , REG_BINARY, buffer_src, buffer_size);
151186
152187 RegCloseKey (hKey);
188+ #endif
153189}
0 commit comments