Michael Stefaniuc : winefile: Change the settings functions to use the W registry functions.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jul 25 07:44:11 CDT 2007


Module: wine
Branch: master
Commit: 837bd5356d8b8db6aafe842e3263afcb2f003979
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=837bd5356d8b8db6aafe842e3263afcb2f003979

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Tue Jul 24 22:28:51 2007 +0200

winefile: Change the settings functions to use the W registry functions.

---

 programs/winefile/winefile.c |   46 +++++++++++++++++++++---------------------
 1 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c
index 85a169f..f26b75b 100644
--- a/programs/winefile/winefile.c
+++ b/programs/winefile/winefile.c
@@ -1593,25 +1593,25 @@ static windowOptions load_registry_settings(void)
 	HKEY hKey;
 	windowOptions opts;
 
-	RegOpenKeyEx( HKEY_CURRENT_USER, registry_key,
-	              0, KEY_QUERY_VALUE, &hKey );
+        RegOpenKeyExW( HKEY_CURRENT_USER, registry_key,
+                       0, KEY_QUERY_VALUE, &hKey );
 
 	size = sizeof(DWORD);
 
-        if( RegQueryValueEx( hKey, reg_start_x, NULL, &type,
-                             (LPBYTE) &opts.start_x, &size ) != ERROR_SUCCESS )
+        if( RegQueryValueExW( hKey, reg_start_x, NULL, &type,
+                              (LPBYTE) &opts.start_x, &size ) != ERROR_SUCCESS )
 		opts.start_x = CW_USEDEFAULT;
 
-        if( RegQueryValueEx( hKey, reg_start_y, NULL, &type,
-                             (LPBYTE) &opts.start_y, &size ) != ERROR_SUCCESS )
+        if( RegQueryValueExW( hKey, reg_start_y, NULL, &type,
+                              (LPBYTE) &opts.start_y, &size ) != ERROR_SUCCESS )
 		opts.start_y = CW_USEDEFAULT;
 
-        if( RegQueryValueEx( hKey, reg_width, NULL, &type,
-                             (LPBYTE) &opts.width, &size ) != ERROR_SUCCESS )
+        if( RegQueryValueExW( hKey, reg_width, NULL, &type,
+                              (LPBYTE) &opts.width, &size ) != ERROR_SUCCESS )
 		opts.width = CW_USEDEFAULT;
 
-        if( RegQueryValueEx( hKey, reg_height, NULL, &type,
-                             (LPBYTE) &opts.height, &size ) != ERROR_SUCCESS )
+        if( RegQueryValueExW( hKey, reg_height, NULL, &type,
+                              (LPBYTE) &opts.height, &size ) != ERROR_SUCCESS )
 		opts.height = CW_USEDEFAULT;
 
 	RegCloseKey( hKey );
@@ -1630,27 +1630,27 @@ static void save_registry_settings(void)
 	width = wi.rcWindow.right - wi.rcWindow.left;
 	height = wi.rcWindow.bottom - wi.rcWindow.top;
 
-	if ( RegOpenKeyEx( HKEY_CURRENT_USER, registry_key,
-	                   0, KEY_SET_VALUE, &hKey ) != ERROR_SUCCESS )
+	if ( RegOpenKeyExW( HKEY_CURRENT_USER, registry_key,
+                            0, KEY_SET_VALUE, &hKey ) != ERROR_SUCCESS )
 	{
 		/* Unable to save registry settings - try to create key */
-		if ( RegCreateKeyEx( HKEY_CURRENT_USER, registry_key,
-		                     0, NULL, REG_OPTION_NON_VOLATILE,
-		                     KEY_SET_VALUE, NULL, &hKey, NULL ) != ERROR_SUCCESS )
+                if ( RegCreateKeyExW( HKEY_CURRENT_USER, registry_key,
+                                      0, NULL, REG_OPTION_NON_VOLATILE,
+                                      KEY_SET_VALUE, NULL, &hKey, NULL ) != ERROR_SUCCESS )
 		{
 			/* FIXME: Cannot create key */
 			return;
 		}
 	}
 	/* Save all of the settings */
-	RegSetValueEx( hKey, reg_start_x, 0, REG_DWORD,
-	               (LPBYTE) &wi.rcWindow.left, sizeof(DWORD) );
-	RegSetValueEx( hKey, reg_start_y, 0, REG_DWORD,
-	               (LPBYTE) &wi.rcWindow.top, sizeof(DWORD) );
-	RegSetValueEx( hKey, reg_width, 0, REG_DWORD,
-	               (LPBYTE) &width, sizeof(DWORD) );
-	RegSetValueEx( hKey, reg_height, 0, REG_DWORD,
-	               (LPBYTE) &height, sizeof(DWORD) );
+        RegSetValueExW( hKey, reg_start_x, 0, REG_DWORD,
+                        (LPBYTE) &wi.rcWindow.left, sizeof(DWORD) );
+        RegSetValueExW( hKey, reg_start_y, 0, REG_DWORD,
+                        (LPBYTE) &wi.rcWindow.top, sizeof(DWORD) );
+        RegSetValueExW( hKey, reg_width, 0, REG_DWORD,
+                        (LPBYTE) &width, sizeof(DWORD) );
+        RegSetValueExW( hKey, reg_height, 0, REG_DWORD,
+                        (LPBYTE) &height, sizeof(DWORD) );
 
 	/* TODO: Save more settings here (List vs. Detailed View, etc.) */
 	RegCloseKey( hKey );




More information about the wine-cvs mailing list