Commit e14569d1 authored by Steven Edwards's avatar Steven Edwards Committed by Alexandre Julliard

Correct RegCreateKeyEx[A/W] prototype to match the PSDK.

parent ebf4e530
...@@ -147,7 +147,7 @@ inline static HKEY get_special_root_hkey( HKEY hkey ) ...@@ -147,7 +147,7 @@ inline static HKEY get_special_root_hkey( HKEY hkey )
* *
* See RegCreateKeyExA. * See RegCreateKeyExA.
*/ */
DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPCWSTR class, DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR class,
DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa, DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa,
PHKEY retkey, LPDWORD dispos ) PHKEY retkey, LPDWORD dispos )
{ {
...@@ -195,7 +195,7 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPCWSTR c ...@@ -195,7 +195,7 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPCWSTR c
* FIXME * FIXME
* MAXIMUM_ALLOWED in access mask not supported by server * MAXIMUM_ALLOWED in access mask not supported by server
*/ */
DWORD WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPCSTR class, DWORD WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR class,
DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa, DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa,
PHKEY retkey, LPDWORD dispos ) PHKEY retkey, LPDWORD dispos )
{ {
......
...@@ -274,7 +274,6 @@ static void MRU_SaveChanged ( LPWINEMRULIST mp ) ...@@ -274,7 +274,6 @@ static void MRU_SaveChanged ( LPWINEMRULIST mp )
HKEY newkey; HKEY newkey;
WCHAR realname[2]; WCHAR realname[2];
LPWINEMRUITEM witem; LPWINEMRUITEM witem;
static const WCHAR emptyW[] = {'\0'};
/* or should we do the following instead of RegOpenKeyEx: /* or should we do the following instead of RegOpenKeyEx:
*/ */
...@@ -287,7 +286,7 @@ static void MRU_SaveChanged ( LPWINEMRULIST mp ) ...@@ -287,7 +286,7 @@ static void MRU_SaveChanged ( LPWINEMRULIST mp )
err); err);
if ((err = RegCreateKeyExW( mp->extview.hKey, mp->extview.lpszSubKey, if ((err = RegCreateKeyExW( mp->extview.hKey, mp->extview.lpszSubKey,
0, 0,
emptyW, NULL,
REG_OPTION_NON_VOLATILE, REG_OPTION_NON_VOLATILE,
KEY_READ | KEY_WRITE, KEY_READ | KEY_WRITE,
0, 0,
...@@ -653,7 +652,6 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp) ...@@ -653,7 +652,6 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
WCHAR realname[2]; WCHAR realname[2];
LPWINEMRUITEM witem; LPWINEMRUITEM witem;
DWORD type; DWORD type;
static const WCHAR emptyW[] = {'\0'};
/* get space to save indices that will turn into names /* get space to save indices that will turn into names
* but in order of most to least recently used * but in order of most to least recently used
...@@ -668,7 +666,7 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp) ...@@ -668,7 +666,7 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
/* open the sub key */ /* open the sub key */
if ((err = RegCreateKeyExW( mp->extview.hKey, mp->extview.lpszSubKey, if ((err = RegCreateKeyExW( mp->extview.hKey, mp->extview.lpszSubKey,
0, 0,
emptyW, NULL,
REG_OPTION_NON_VOLATILE, REG_OPTION_NON_VOLATILE,
KEY_READ | KEY_WRITE, KEY_READ | KEY_WRITE,
0, 0,
......
...@@ -1191,13 +1191,12 @@ DWORD WINAPI SHSetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue, ...@@ -1191,13 +1191,12 @@ DWORD WINAPI SHSetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue,
{ {
DWORD dwRet = ERROR_SUCCESS, dwDummy; DWORD dwRet = ERROR_SUCCESS, dwDummy;
HKEY hSubKey; HKEY hSubKey;
static const char szEmpty[] = { '\0' };
TRACE("(hkey=%p,%s,%s,%ld,%p,%ld)\n", hKey, debugstr_a(lpszSubKey), TRACE("(hkey=%p,%s,%s,%ld,%p,%ld)\n", hKey, debugstr_a(lpszSubKey),
debugstr_a(lpszValue), dwType, pvData, cbData); debugstr_a(lpszValue), dwType, pvData, cbData);
if (lpszSubKey && *lpszSubKey) if (lpszSubKey && *lpszSubKey)
dwRet = RegCreateKeyExA(hKey, lpszSubKey, 0, szEmpty, dwRet = RegCreateKeyExA(hKey, lpszSubKey, 0, NULL,
0, KEY_SET_VALUE, NULL, &hSubKey, &dwDummy); 0, KEY_SET_VALUE, NULL, &hSubKey, &dwDummy);
else else
hSubKey = hKey; hSubKey = hKey;
...@@ -1220,13 +1219,12 @@ DWORD WINAPI SHSetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, ...@@ -1220,13 +1219,12 @@ DWORD WINAPI SHSetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue,
{ {
DWORD dwRet = ERROR_SUCCESS, dwDummy; DWORD dwRet = ERROR_SUCCESS, dwDummy;
HKEY hSubKey; HKEY hSubKey;
static const WCHAR szEmpty[] = { '\0' };
TRACE("(hkey=%p,%s,%s,%ld,%p,%ld)\n", hKey, debugstr_w(lpszSubKey), TRACE("(hkey=%p,%s,%s,%ld,%p,%ld)\n", hKey, debugstr_w(lpszSubKey),
debugstr_w(lpszValue), dwType, pvData, cbData); debugstr_w(lpszValue), dwType, pvData, cbData);
if (lpszSubKey && *lpszSubKey) if (lpszSubKey && *lpszSubKey)
dwRet = RegCreateKeyExW(hKey, lpszSubKey, 0, szEmpty, dwRet = RegCreateKeyExW(hKey, lpszSubKey, 0, NULL,
0, KEY_SET_VALUE, NULL, &hSubKey, &dwDummy); 0, KEY_SET_VALUE, NULL, &hSubKey, &dwDummy);
else else
hSubKey = hKey; hSubKey = hKey;
......
...@@ -89,9 +89,9 @@ BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL); ...@@ -89,9 +89,9 @@ BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
BOOL WINAPI InitiateSystemShutdownExA(LPSTR,LPSTR,DWORD,BOOL,BOOL,DWORD); BOOL WINAPI InitiateSystemShutdownExA(LPSTR,LPSTR,DWORD,BOOL,BOOL,DWORD);
BOOL WINAPI InitiateSystemShutdownExW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL,DWORD); BOOL WINAPI InitiateSystemShutdownExW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL,DWORD);
#define InitiateSystemShutdownEx WINELIB_NAME_AW(InitiateSystemShutdownEx); #define InitiateSystemShutdownEx WINELIB_NAME_AW(InitiateSystemShutdownEx);
DWORD WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD,REGSAM, DWORD WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,
LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD); LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
DWORD WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD,REGSAM, DWORD WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,
LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD); LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
#define RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx) #define RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES); LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment