Replace more PROFILE_ functions by RegQueryValueExA.

diff --git a/windows/nonclient.c b/windows/nonclient.c
index e8f8c87..709111c 100644
--- a/windows/nonclient.c
+++ b/windows/nonclient.c
@@ -20,7 +20,6 @@
 #include "hook.h"
 #include "nonclient.h"
 #include "debugtools.h"
-#include "options.h"
 #include "shellapi.h"
 #include "bitmap.h"
 
diff --git a/windows/spy.c b/windows/spy.c
index 33d5718..96e0672 100644
--- a/windows/spy.c
+++ b/windows/spy.c
@@ -10,10 +10,10 @@
 #include <stdio.h>
 #include "windef.h"
 #include "wingdi.h"
+#include "winreg.h"
 #include "wine/winuser16.h"
 #include "wine/winbase16.h"
 #include "win.h"
-#include "options.h"
 #include "debugtools.h"
 #include "spy.h"
 #include "commctrl.h"
@@ -1756,10 +1756,17 @@
     int i;
     char buffer[1024];
     const SPY_NOTIFY *p;
+    HKEY hkey;
 
     if (!TRACE_ON(message)) return TRUE;
 
-    PROFILE_GetWineIniString( "Spy", "Include", "", buffer, sizeof(buffer) );
+    buffer[0] = 0;
+    if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\Spy", &hkey))
+    {
+	DWORD type, count = sizeof(buffer);
+	RegQueryValueExA(hkey, "Include", 0, &type, buffer, &count);
+	RegCloseKey(hkey);
+    }
     if (buffer[0] && strcmp( buffer, "INCLUDEALL" ))
     {
         TRACE("Include=%s\n", buffer );
@@ -1767,7 +1774,13 @@
             SPY_Exclude[i] = (MessageTypeNames[i] && !strstr(buffer,MessageTypeNames[i]));
     }
 
-    PROFILE_GetWineIniString( "Spy", "Exclude", "", buffer, sizeof(buffer) );
+    buffer[0] = 0;
+    if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\Spy", &hkey))
+    {
+	DWORD type, count = sizeof(buffer);
+	RegQueryValueExA(hkey, "Exclude", 0, &type, buffer, &count);
+	RegCloseKey(hkey);
+    }
     if (buffer[0])
     {
         TRACE("Exclude=%s\n", buffer );
@@ -1778,7 +1791,14 @@
                 SPY_Exclude[i] = (MessageTypeNames[i] && strstr(buffer,MessageTypeNames[i]));
     }
 
-    SPY_ExcludeDWP = PROFILE_GetWineIniInt( "Spy", "ExcludeDWP", 0 );
+    SPY_ExcludeDWP = 0;
+    if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\Spy", &hkey))
+    {
+	DWORD type, count = sizeof(buffer);
+	if(!RegQueryValueExA(hkey, "ExcludeDWP", 0, &type, buffer, &count))
+	    SPY_ExcludeDWP = atoi(buffer);
+	RegCloseKey(hkey);
+    }
 
     /* find last good entry in spy notify array and save addr for b-search */
     p = &spnfy_array[0];
diff --git a/windows/sysmetrics.c b/windows/sysmetrics.c
index cdf59c0..80656ef 100644
--- a/windows/sysmetrics.c
+++ b/windows/sysmetrics.c
@@ -6,19 +6,40 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <assert.h>
 
 #include "windef.h"
 #include "wingdi.h"
 #include "wine/winuser16.h"
 #include "winbase.h"
+#include "winreg.h"
 #include "winuser.h"
-#include "options.h"
 #include "user.h"
 #include "sysmetrics.h"
 
 static int sysMetrics[SM_WINE_CMETRICS+1];
 
+static int SYSMETRICS_GetProfileInt(const char *section, const char *key,
+				    int default_value)
+{
+    int ret = default_value;
+    char buffer[1024];
+    HKEY hkey;
+
+    strcpy(buffer, "Software\\Wine\\Wine\\Config\\");
+    strncat(buffer, section, sizeof(buffer) - strlen(buffer));
+
+    if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, buffer, &hkey))
+    {
+	DWORD type, count = sizeof(buffer);
+	if(!RegQueryValueExA(hkey, key, 0, &type, buffer, &count))
+	    ret = atoi(buffer);
+	RegCloseKey(hkey);
+    }
+    return ret;
+}
+
 /***********************************************************************
  *           SYSMETRICS_Init
  *
@@ -48,21 +69,21 @@
     sysMetrics[SM_WINE_BPP] = GetDeviceCaps( hdc, BITSPIXEL );
     if (TWEAK_WineLook > WIN31_LOOK)
 	sysMetrics[SM_CXVSCROLL] =
-	    PROFILE_GetWineIniInt("Tweak.Layout", "ScrollBarWidth", 16);
+	    SYSMETRICS_GetProfileInt("Tweak.Layout", "ScrollBarWidth", 16);
     else
 	sysMetrics[SM_CXVSCROLL] =
-	    PROFILE_GetWineIniInt("Tweak.Layout", "ScrollBarWidth", 17);
+	    SYSMETRICS_GetProfileInt("Tweak.Layout", "ScrollBarWidth", 17);
     sysMetrics[SM_CYHSCROLL] = sysMetrics[SM_CXVSCROLL];
     if (TWEAK_WineLook > WIN31_LOOK)
 	sysMetrics[SM_CYCAPTION] =
-	    PROFILE_GetWineIniInt("Tweak.Layout", "CaptionHeight", 19);
+	    SYSMETRICS_GetProfileInt("Tweak.Layout", "CaptionHeight", 19);
     else
 	sysMetrics[SM_CYCAPTION] =
-	    PROFILE_GetWineIniInt("Tweak.Layout", "CaptionHeight", 20);
+	    SYSMETRICS_GetProfileInt("Tweak.Layout", "CaptionHeight", 20);
     sysMetrics[SM_CXBORDER] = 1;
     sysMetrics[SM_CYBORDER] = sysMetrics[SM_CXBORDER];
     sysMetrics[SM_CXDLGFRAME] =
-	PROFILE_GetWineIniInt("Tweak.Layout", "DialogFrameWidth",
+	SYSMETRICS_GetProfileInt("Tweak.Layout", "DialogFrameWidth",
 			      (TWEAK_WineLook > WIN31_LOOK) ? 3 : 4);
     sysMetrics[SM_CYDLGFRAME] = sysMetrics[SM_CXDLGFRAME];
     sysMetrics[SM_CYVTHUMB] = sysMetrics[SM_CXVSCROLL] - 1;
@@ -71,10 +92,10 @@
     sysMetrics[SM_CYICON] = 32;
     if (TWEAK_WineLook > WIN31_LOOK)
 	sysMetrics[SM_CYMENU] =
-	    PROFILE_GetWineIniInt("Tweak.Layout", "MenuHeight", 19);
+	    SYSMETRICS_GetProfileInt("Tweak.Layout", "MenuHeight", 19);
     else
 	sysMetrics[SM_CYMENU] =
-	    PROFILE_GetWineIniInt("Tweak.Layout", "MenuHeight", 18);
+	    SYSMETRICS_GetProfileInt("Tweak.Layout", "MenuHeight", 18);
     sysMetrics[SM_CXFULLSCREEN] = sysMetrics[SM_CXSCREEN];
     sysMetrics[SM_CYFULLSCREEN] =
 	sysMetrics[SM_CYSCREEN] - sysMetrics[SM_CYCAPTION];
diff --git a/windows/win.c b/windows/win.c
index ab43058..785dd22 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -10,7 +10,6 @@
 #include "wine/winbase16.h"
 #include "wine/winuser16.h"
 #include "wine/unicode.h"
-#include "options.h"
 #include "win.h"
 #include "heap.h"
 #include "user.h"
diff --git a/windows/winpos.c b/windows/winpos.c
index afcf9cc..42a7e35 100644
--- a/windows/winpos.c
+++ b/windows/winpos.c
@@ -19,7 +19,6 @@
 #include "hook.h"
 #include "message.h"
 #include "queue.h"
-#include "options.h"
 #include "winpos.h"
 #include "dce.h"
 #include "nonclient.h"