Added `const's to some registry API functions.

This commit is contained in:
Huw D M Davies 1999-07-10 11:41:24 +00:00 committed by Alexandre Julliard
parent 273f396bce
commit df088c6949
2 changed files with 23 additions and 23 deletions

View File

@ -150,10 +150,10 @@ DWORD WINAPI RegCreateKeyA(HKEY,LPCSTR,LPHKEY);
DWORD WINAPI RegCreateKeyW(HKEY,LPCWSTR,LPHKEY); DWORD WINAPI RegCreateKeyW(HKEY,LPCWSTR,LPHKEY);
#define RegCreateKey WINELIB_NAME_AW(RegCreateKey) #define RegCreateKey WINELIB_NAME_AW(RegCreateKey)
DWORD WINAPI RegDeleteKeyA(HKEY,LPCSTR); DWORD WINAPI RegDeleteKeyA(HKEY,LPCSTR);
DWORD WINAPI RegDeleteKeyW(HKEY,LPWSTR); DWORD WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
#define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey) #define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
DWORD WINAPI RegDeleteValueA(HKEY,LPSTR); DWORD WINAPI RegDeleteValueA(HKEY,LPCSTR);
DWORD WINAPI RegDeleteValueW(HKEY,LPWSTR); DWORD WINAPI RegDeleteValueW(HKEY,LPCWSTR);
#define RegDeleteValue WINELIB_NAME_AW(RegDeleteValue) #define RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
DWORD WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD); DWORD WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
DWORD WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD); DWORD WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
@ -167,14 +167,14 @@ DWORD WINAPI RegOpenKeyW(HKEY,LPCWSTR,LPHKEY);
DWORD WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG); DWORD WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
DWORD WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG); DWORD WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
#define RegQueryValue WINELIB_NAME_AW(RegQueryValue) #define RegQueryValue WINELIB_NAME_AW(RegQueryValue)
DWORD WINAPI RegQueryValueExA(HKEY,LPSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD); DWORD WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
DWORD WINAPI RegQueryValueExW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD); DWORD WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
#define RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx) #define RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
DWORD WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD); DWORD WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
DWORD WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD); DWORD WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
#define RegSetValue WINELIB_NAME_AW(RegSetValue) #define RegSetValue WINELIB_NAME_AW(RegSetValue)
DWORD WINAPI RegSetValueExA(HKEY,LPSTR,DWORD,DWORD,LPBYTE,DWORD); DWORD WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,CONST BYTE*,DWORD);
DWORD WINAPI RegSetValueExW(HKEY,LPWSTR,DWORD,DWORD,LPBYTE,DWORD); DWORD WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,CONST BYTE*,DWORD);
#define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx) #define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -2442,7 +2442,7 @@ DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR lpszSubKey, LPHKEY retkey )
* ERROR_MORE_DATA: !!! if the specified buffer is not big enough to hold the data * ERROR_MORE_DATA: !!! if the specified buffer is not big enough to hold the data
* buffer is left untouched. The MS-documentation is wrong (js) !!! * buffer is left untouched. The MS-documentation is wrong (js) !!!
*/ */
DWORD WINAPI RegQueryValueExW( HKEY hkey, LPWSTR lpValueName, DWORD WINAPI RegQueryValueExW( HKEY hkey, LPCWSTR lpValueName,
LPDWORD lpdwReserved, LPDWORD lpdwType, LPDWORD lpdwReserved, LPDWORD lpdwType,
LPBYTE lpbData, LPDWORD lpcbData ) LPBYTE lpbData, LPDWORD lpcbData )
{ {
@ -2557,7 +2557,7 @@ DWORD WINAPI RegQueryValueW( HKEY hkey, LPCWSTR lpszSubKey, LPWSTR lpszData,
* *
* FIXME: check returnvalue (len) for an empty key * FIXME: check returnvalue (len) for an empty key
*/ */
DWORD WINAPI RegQueryValueExA( HKEY hkey, LPSTR lpszValueName, DWORD WINAPI RegQueryValueExA( HKEY hkey, LPCSTR lpszValueName,
LPDWORD lpdwReserved, LPDWORD lpdwType, LPDWORD lpdwReserved, LPDWORD lpdwType,
LPBYTE lpbData, LPDWORD lpcbData ) LPBYTE lpbData, LPDWORD lpcbData )
{ {
@ -2709,9 +2709,9 @@ DWORD WINAPI RegQueryValue16( HKEY hkey, LPSTR lpszSubKey, LPSTR lpszData,
* NOTES * NOTES
* win95 does not care about cbData for REG_SZ and finds out the len by itself (js) * win95 does not care about cbData for REG_SZ and finds out the len by itself (js)
*/ */
DWORD WINAPI RegSetValueExW( HKEY hkey, LPWSTR lpszValueName, DWORD WINAPI RegSetValueExW( HKEY hkey, LPCWSTR lpszValueName,
DWORD dwReserved, DWORD dwType, LPBYTE lpbData, DWORD dwReserved, DWORD dwType,
DWORD cbData) CONST BYTE *lpbData, DWORD cbData)
{ {
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
int i; int i;
@ -2773,9 +2773,9 @@ DWORD WINAPI RegSetValueExW( HKEY hkey, LPWSTR lpszValueName,
* NOTES * NOTES
* win95 does not care about cbData for REG_SZ and finds out the len by itself (js) * win95 does not care about cbData for REG_SZ and finds out the len by itself (js)
*/ */
DWORD WINAPI RegSetValueExA( HKEY hkey, LPSTR lpszValueName, DWORD WINAPI RegSetValueExA( HKEY hkey, LPCSTR lpszValueName,
DWORD dwReserved, DWORD dwType, LPBYTE lpbData, DWORD dwReserved, DWORD dwType,
DWORD cbData ) CONST BYTE *lpbData, DWORD cbData )
{ {
LPBYTE buf; LPBYTE buf;
LPWSTR lpszValueNameW; LPWSTR lpszValueNameW;
@ -2796,7 +2796,7 @@ DWORD WINAPI RegSetValueExA( HKEY hkey, LPSTR lpszValueName,
cbData=2*cbData; cbData=2*cbData;
} }
else else
buf=lpbData; buf=(LPBYTE)lpbData;
if (lpszValueName) if (lpszValueName)
lpszValueNameW = strdupA2W(lpszValueName); lpszValueNameW = strdupA2W(lpszValueName);
@ -3246,7 +3246,7 @@ DWORD WINAPI RegCloseKey( HKEY hkey )
* Success: ERROR_SUCCESS * Success: ERROR_SUCCESS
* Failure: Error code * Failure: Error code
*/ */
DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPWSTR lpszSubKey ) DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR lpszSubKey )
{ {
LPKEYSTRUCT *lplpPrevKey,lpNextKey,lpxkey; LPKEYSTRUCT *lplpPrevKey,lpNextKey,lpxkey;
LPWSTR *wps; LPWSTR *wps;
@ -3362,7 +3362,7 @@ DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR lpszSubKey )
* *
* RETURNS * RETURNS
*/ */
DWORD WINAPI RegDeleteValueW( HKEY hkey, LPWSTR lpszValue ) DWORD WINAPI RegDeleteValueW( HKEY hkey, LPCWSTR lpszValue )
{ {
DWORD i; DWORD i;
LPKEYSTRUCT lpkey; LPKEYSTRUCT lpkey;
@ -3409,7 +3409,7 @@ DWORD WINAPI RegDeleteValueW( HKEY hkey, LPWSTR lpszValue )
/****************************************************************************** /******************************************************************************
* RegDeleteValue32A [ADVAPI32.135] * RegDeleteValue32A [ADVAPI32.135]
*/ */
DWORD WINAPI RegDeleteValueA( HKEY hkey, LPSTR lpszValue ) DWORD WINAPI RegDeleteValueA( HKEY hkey, LPCSTR lpszValue )
{ {
LPWSTR lpszValueW; LPWSTR lpszValueW;
DWORD ret; DWORD ret;