gcc 4.0 -Wpointer-sign fixes (Reg* functions).

This commit is contained in:
Mike McCormack 2005-07-06 19:08:05 +00:00 committed by Alexandre Julliard
parent fb46982967
commit d7b9a23afd
18 changed files with 81 additions and 80 deletions

View File

@ -326,7 +326,7 @@ BOOL WINAPI CryptAcquireContextA (HCRYPTPROV *phProv, LPCSTR pszContainer,
SetLastError(ERROR_NOT_ENOUGH_MEMORY); SetLastError(ERROR_NOT_ENOUGH_MEMORY);
goto error; goto error;
} }
r = RegQueryValueExA(key, "Name", NULL, NULL, provname, &len); r = RegQueryValueExA(key, "Name", NULL, NULL, (LPBYTE)provname, &len);
if( r != ERROR_SUCCESS ) if( r != ERROR_SUCCESS )
{ {
TRACE("error %ld reading 'Name' from registry\n", r ); TRACE("error %ld reading 'Name' from registry\n", r );
@ -380,7 +380,7 @@ BOOL WINAPI CryptAcquireContextA (HCRYPTPROV *phProv, LPCSTR pszContainer,
SetLastError(ERROR_NOT_ENOUGH_MEMORY); SetLastError(ERROR_NOT_ENOUGH_MEMORY);
goto error; goto error;
} }
r = RegQueryValueExA(key, "Image Path", NULL, NULL, temp, &len); r = RegQueryValueExA(key, "Image Path", NULL, NULL, (LPBYTE)temp, &len);
if( r != ERROR_SUCCESS ) if( r != ERROR_SUCCESS )
{ {
TRACE("error %ld reading 'Image Path' from registry\n", r ); TRACE("error %ld reading 'Image Path' from registry\n", r );
@ -1097,7 +1097,7 @@ BOOL WINAPI CryptEnumProviderTypesA (DWORD dwIndex, DWORD *pdwReserved,
*pdwProvType += (*(--ch) - '0') * 100; *pdwProvType += (*(--ch) - '0') * 100;
CRYPT_Free(keyname); CRYPT_Free(keyname);
result = RegQueryValueExA(hSubkey, "TypeName", NULL, &dwType, pszTypeName, pcbTypeName); result = RegQueryValueExA(hSubkey, "TypeName", NULL, &dwType, (LPBYTE)pszTypeName, pcbTypeName);
if (result) if (result)
CRYPT_ReturnLastError(result); CRYPT_ReturnLastError(result);
@ -1254,7 +1254,7 @@ BOOL WINAPI CryptGetDefaultProviderA (DWORD dwProvType, DWORD *pdwReserved,
} }
CRYPT_Free(keyname); CRYPT_Free(keyname);
result = RegQueryValueExA(hKey, "Name", NULL, NULL, pszProvName, pcbProvName); result = RegQueryValueExA(hKey, "Name", NULL, NULL, (LPBYTE)pszProvName, pcbProvName);
if (result) if (result)
{ {
if (result != ERROR_MORE_DATA) if (result != ERROR_MORE_DATA)
@ -1754,7 +1754,7 @@ BOOL WINAPI CryptSetProviderExA (LPCSTR pszProvName, DWORD dwProvType, DWORD *pd
} }
CRYPT_Free(keyname); CRYPT_Free(keyname);
if (RegSetValueExA(hTypeKey, "Name", 0, REG_SZ, pszProvName, strlen(pszProvName) + 1)) if (RegSetValueExA(hTypeKey, "Name", 0, REG_SZ, (LPBYTE)pszProvName, strlen(pszProvName) + 1))
{ {
RegCloseKey(hTypeKey); RegCloseKey(hTypeKey);
RegCloseKey(hProvKey); RegCloseKey(hProvKey);

View File

@ -1654,7 +1654,7 @@ QueryServiceConfigA( SC_HANDLE hService,
total = sizeof (QUERY_SERVICE_CONFIGA); total = sizeof (QUERY_SERVICE_CONFIGA);
sz = sizeof(str_buffer); sz = sizeof(str_buffer);
r = RegQueryValueExA( hKey, szImagePath, 0, &type, str_buffer, &sz ); r = RegQueryValueExA( hKey, szImagePath, 0, &type, (LPBYTE)str_buffer, &sz );
if( ( r == ERROR_SUCCESS ) && ( type == REG_SZ || type == REG_EXPAND_SZ ) ) if( ( r == ERROR_SUCCESS ) && ( type == REG_SZ || type == REG_EXPAND_SZ ) )
{ {
sz = ExpandEnvironmentStringsA(str_buffer,NULL,0); sz = ExpandEnvironmentStringsA(str_buffer,NULL,0);
@ -1719,7 +1719,7 @@ QueryServiceConfigA( SC_HANDLE hService,
n = total - sizeof (QUERY_SERVICE_CONFIGA); n = total - sizeof (QUERY_SERVICE_CONFIGA);
sz = sizeof(str_buffer); sz = sizeof(str_buffer);
r = RegQueryValueExA( hKey, szImagePath, 0, &type, str_buffer, &sz ); r = RegQueryValueExA( hKey, szImagePath, 0, &type, (LPBYTE)str_buffer, &sz );
if( ( r == ERROR_SUCCESS ) && ( type == REG_SZ || type == REG_EXPAND_SZ ) ) if( ( r == ERROR_SUCCESS ) && ( type == REG_SZ || type == REG_EXPAND_SZ ) )
{ {
sz = ExpandEnvironmentStringsA(str_buffer, p, n); sz = ExpandEnvironmentStringsA(str_buffer, p, n);
@ -1736,7 +1736,7 @@ QueryServiceConfigA( SC_HANDLE hService,
} }
sz = n; sz = n;
r = RegQueryValueExA( hKey, szGroup, 0, &type, p, &sz ); r = RegQueryValueExA( hKey, szGroup, 0, &type, (LPBYTE)p, &sz );
if( ( r == ERROR_SUCCESS ) || ( type == REG_SZ ) ) if( ( r == ERROR_SUCCESS ) || ( type == REG_SZ ) )
{ {
lpServiceConfig->lpLoadOrderGroup = (LPSTR) p; lpServiceConfig->lpLoadOrderGroup = (LPSTR) p;
@ -1745,7 +1745,7 @@ QueryServiceConfigA( SC_HANDLE hService,
} }
sz = n; sz = n;
r = RegQueryValueExA( hKey, szDependencies, 0, &type, p, &sz ); r = RegQueryValueExA( hKey, szDependencies, 0, &type, (LPBYTE)p, &sz );
if( ( r == ERROR_SUCCESS ) || ( type == REG_SZ ) ) if( ( r == ERROR_SUCCESS ) || ( type == REG_SZ ) )
{ {
lpServiceConfig->lpDependencies = (LPSTR) p; lpServiceConfig->lpDependencies = (LPSTR) p;

View File

@ -66,17 +66,17 @@ static void create_test_entries(void)
SetEnvironmentVariableA("LONGSYSTEMVAR", "bar"); SetEnvironmentVariableA("LONGSYSTEMVAR", "bar");
SetEnvironmentVariableA("FOO", "ImARatherLongButIndeedNeededString"); SetEnvironmentVariableA("FOO", "ImARatherLongButIndeedNeededString");
ok(!RegSetValueExA(hkey_main,"Test1",0,REG_EXPAND_SZ, sTestpath1, strlen(sTestpath1)+1), ok(!RegSetValueExA(hkey_main,"Test1",0,REG_EXPAND_SZ, (LPBYTE)sTestpath1, strlen(sTestpath1)+1),
"RegSetValueExA failed\n"); "RegSetValueExA failed\n");
ok(!RegSetValueExA(hkey_main,"Test2",0,REG_SZ, sTestpath1, strlen(sTestpath1)+1), ok(!RegSetValueExA(hkey_main,"Test2",0,REG_SZ, (LPBYTE)sTestpath1, strlen(sTestpath1)+1),
"RegSetValueExA failed\n"); "RegSetValueExA failed\n");
ok(!RegSetValueExA(hkey_main,"Test3",0,REG_EXPAND_SZ, sTestpath2, strlen(sTestpath2)+1), ok(!RegSetValueExA(hkey_main,"Test3",0,REG_EXPAND_SZ, (LPBYTE)sTestpath2, strlen(sTestpath2)+1),
"RegSetValueExA failed\n"); "RegSetValueExA failed\n");
ok(!RegSetValueExA(hkey_main,"DWORD",0,REG_DWORD, (PVOID)qw, 4), ok(!RegSetValueExA(hkey_main,"DWORD",0,REG_DWORD, (LPBYTE)qw, 4),
"RegSetValueExA failed\n"); "RegSetValueExA failed\n");
ok(!RegSetValueExA(hkey_main,"BIN32",0,REG_BINARY, (PVOID)qw, 4), ok(!RegSetValueExA(hkey_main,"BIN32",0,REG_BINARY, (LPBYTE)qw, 4),
"RegSetValueExA failed\n"); "RegSetValueExA failed\n");
ok(!RegSetValueExA(hkey_main,"BIN64",0,REG_BINARY, (PVOID)qw, 8), ok(!RegSetValueExA(hkey_main,"BIN64",0,REG_BINARY, (LPBYTE)qw, 8),
"RegSetValueExA failed\n"); "RegSetValueExA failed\n");
} }
@ -115,7 +115,7 @@ static void test_enum_value(void)
type = 1234; type = 1234;
strcpy( value, "xxxxxxxxxx" ); strcpy( value, "xxxxxxxxxx" );
strcpy( data, "xxxxxxxxxx" ); strcpy( data, "xxxxxxxxxx" );
res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, data, &data_count ); res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count );
ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res ); ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res );
ok( val_count == 2, "val_count set to %ld\n", val_count ); ok( val_count == 2, "val_count set to %ld\n", val_count );
ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count ); ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count );
@ -129,7 +129,7 @@ static void test_enum_value(void)
type = 1234; type = 1234;
strcpy( value, "xxxxxxxxxx" ); strcpy( value, "xxxxxxxxxx" );
strcpy( data, "xxxxxxxxxx" ); strcpy( data, "xxxxxxxxxx" );
res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, data, &data_count ); res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count );
ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res ); ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res );
/* Win9x returns 2 as specified by MSDN but NT returns 3... */ /* Win9x returns 2 as specified by MSDN but NT returns 3... */
ok( val_count == 2 || val_count == 3, "val_count set to %ld\n", val_count ); ok( val_count == 2 || val_count == 3, "val_count set to %ld\n", val_count );
@ -147,7 +147,7 @@ static void test_enum_value(void)
type = 1234; type = 1234;
strcpy( value, "xxxxxxxxxx" ); strcpy( value, "xxxxxxxxxx" );
strcpy( data, "xxxxxxxxxx" ); strcpy( data, "xxxxxxxxxx" );
res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, data, &data_count ); res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count );
ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res ); ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res );
ok( val_count == 0, "val_count set to %ld\n", val_count ); ok( val_count == 0, "val_count set to %ld\n", val_count );
ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count ); ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count );
@ -164,7 +164,7 @@ static void test_enum_value(void)
type = 1234; type = 1234;
strcpy( value, "xxxxxxxxxx" ); strcpy( value, "xxxxxxxxxx" );
strcpy( data, "xxxxxxxxxx" ); strcpy( data, "xxxxxxxxxx" );
res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, data, &data_count ); res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count );
ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res ); ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res );
ok( val_count == 20, "val_count set to %ld\n", val_count ); ok( val_count == 20, "val_count set to %ld\n", val_count );
ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count ); ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count );
@ -178,7 +178,7 @@ static void test_enum_value(void)
type = 1234; type = 1234;
strcpy( value, "xxxxxxxxxx" ); strcpy( value, "xxxxxxxxxx" );
strcpy( data, "xxxxxxxxxx" ); strcpy( data, "xxxxxxxxxx" );
res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, data, &data_count ); res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count );
ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res ); ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res );
ok( val_count == 4, "val_count set to %ld instead of 4\n", val_count ); ok( val_count == 4, "val_count set to %ld instead of 4\n", val_count );
ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count ); ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count );

View File

@ -85,7 +85,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
/* @@ Wine registry key: HKCU\Software\Wine\Direct3D */ /* @@ Wine registry key: HKCU\Software\Wine\Direct3D */
if ( !RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Direct3D", &hkey) ) if ( !RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Direct3D", &hkey) )
{ {
if ( !RegQueryValueExA( hkey, "VertexShaderMode", 0, NULL, buffer, &size) ) if ( !RegQueryValueExA( hkey, "VertexShaderMode", 0, NULL, (LPBYTE) buffer, &size) )
{ {
if (!strcmp(buffer,"none")) if (!strcmp(buffer,"none"))
{ {
@ -98,7 +98,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
vs_mode = VS_SW; vs_mode = VS_SW;
} }
} }
if ( !RegQueryValueExA( hkey, "PixelShaderMode", 0, NULL, buffer, &size) ) if ( !RegQueryValueExA( hkey, "PixelShaderMode", 0, NULL, (LPBYTE) buffer, &size) )
{ {
if (!strcmp(buffer,"enabled")) if (!strcmp(buffer,"enabled"))
{ {

View File

@ -787,7 +787,7 @@ DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len,
if (strncasecmp(buf, "vid", 3)) continue; if (strncasecmp(buf, "vid", 3)) continue;
if (nr--) continue; if (nr--) continue;
fnLen = sizeof(fn); fnLen = sizeof(fn);
lRet = RegQueryValueExA(hKey, buf, 0, 0, fn, &fnLen); lRet = RegQueryValueExA(hKey, buf, 0, 0, (LPBYTE)fn, &fnLen);
if (lRet == ERROR_SUCCESS) found = TRUE; if (lRet == ERROR_SUCCESS) found = TRUE;
break; break;
} }

View File

@ -262,7 +262,8 @@ _get_typeinfo_for_iid(REFIID riid, ITypeInfo**ti) {
char tlguid[200],typelibkey[300],interfacekey[300],ver[100]; char tlguid[200],typelibkey[300],interfacekey[300],ver[100];
char tlfn[260]; char tlfn[260];
OLECHAR tlfnW[260]; OLECHAR tlfnW[260];
DWORD tlguidlen, verlen, type, tlfnlen; DWORD tlguidlen, verlen, type;
LONG tlfnlen;
ITypeLib *tl; ITypeLib *tl;
sprintf( interfacekey, "Interface\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\Typelib", sprintf( interfacekey, "Interface\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\Typelib",
@ -277,14 +278,14 @@ _get_typeinfo_for_iid(REFIID riid, ITypeInfo**ti) {
} }
type = (1<<REG_SZ); type = (1<<REG_SZ);
tlguidlen = sizeof(tlguid); tlguidlen = sizeof(tlguid);
if (RegQueryValueExA(ikey,NULL,NULL,&type,tlguid,&tlguidlen)) { if (RegQueryValueExA(ikey,NULL,NULL,&type,(LPBYTE)tlguid,&tlguidlen)) {
ERR("Getting typelib guid failed.\n"); ERR("Getting typelib guid failed.\n");
RegCloseKey(ikey); RegCloseKey(ikey);
return E_FAIL; return E_FAIL;
} }
type = (1<<REG_SZ); type = (1<<REG_SZ);
verlen = sizeof(ver); verlen = sizeof(ver);
if (RegQueryValueExA(ikey,"Version",NULL,&type,ver,&verlen)) { if (RegQueryValueExA(ikey,"Version",NULL,&type,(LPBYTE)ver,&verlen)) {
ERR("Could not get version value?\n"); ERR("Could not get version value?\n");
RegCloseKey(ikey); RegCloseKey(ikey);
return E_FAIL; return E_FAIL;

View File

@ -80,7 +80,7 @@ QueryPathOfRegTypeLib16(
{ {
char xguid[80]; char xguid[80];
char typelibkey[100],pathname[260]; char typelibkey[100],pathname[260];
DWORD plen; LONG plen;
TRACE("\n"); TRACE("\n");

View File

@ -876,7 +876,7 @@ static BOOL process_attach(void)
internal_gl_disabled_extensions[0] = 0; internal_gl_disabled_extensions[0] = 0;
if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\OpenGL", &hkey)) { if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\OpenGL", &hkey)) {
if (!RegQueryValueExA( hkey, "DisabledExtensions", 0, NULL, internal_gl_disabled_extensions, &size)) { if (!RegQueryValueExA( hkey, "DisabledExtensions", 0, NULL, (LPBYTE)internal_gl_disabled_extensions, &size)) {
TRACE("found DisabledExtensions=\"%s\"\n", internal_gl_disabled_extensions); TRACE("found DisabledExtensions=\"%s\"\n", internal_gl_disabled_extensions);
} }
RegCloseKey(hkey); RegCloseKey(hkey);

View File

@ -300,7 +300,7 @@ void SETUPX_CreateStandardLDDs(void)
len = MAX_PATH; len = MAX_PATH;
if ( (hKey) && (LDID_Data[n].RegValName) if ( (hKey) && (LDID_Data[n].RegValName)
&& (RegQueryValueExA(hKey, LDID_Data[n].RegValName, && (RegQueryValueExA(hKey, LDID_Data[n].RegValName,
NULL, &type, buffer, &len) == ERROR_SUCCESS) NULL, &type, (LPBYTE)buffer, &len) == ERROR_SUCCESS)
&& (type == REG_SZ) ) && (type == REG_SZ) )
{ {
TRACE("found value '%s' for LDID %d\n", buffer, n); TRACE("found value '%s' for LDID %d\n", buffer, n);

View File

@ -194,7 +194,7 @@ static BOOL HCR_RegGetDefaultIconA(HKEY hkey, LPSTR szDest, DWORD len, LPDWORD d
char sTemp[MAX_PATH]; char sTemp[MAX_PATH];
char sNum[5]; char sNum[5];
if (!RegQueryValueExA(hkey, NULL, 0, &dwType, szDest, &len)) if (!RegQueryValueExA(hkey, NULL, 0, &dwType, (LPBYTE)szDest, &len))
{ {
if (dwType == REG_EXPAND_SZ) if (dwType == REG_EXPAND_SZ)
{ {
@ -319,7 +319,7 @@ BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len)
szDest[0] = 0; szDest[0] = 0;
if (HCR_RegOpenClassIDKey(riid, &hkey)) if (HCR_RegOpenClassIDKey(riid, &hkey))
{ {
if (!RegQueryValueExA(hkey,"",0,NULL,szDest,&len)) if (!RegQueryValueExA(hkey,"",0,NULL,(LPBYTE)szDest,&len))
{ {
ret = TRUE; ret = TRUE;
} }

View File

@ -255,7 +255,7 @@ void FillList (HWND hCb, char *pszLatest)
if (icList > 0) if (icList > 0)
{ {
pszList = HeapAlloc( GetProcessHeap(), 0, icList) ; pszList = HeapAlloc( GetProcessHeap(), 0, icList) ;
if (ERROR_SUCCESS != RegQueryValueExA (hkey, "MRUList", NULL, NULL, pszList, &icList)) if (ERROR_SUCCESS != RegQueryValueExA (hkey, "MRUList", NULL, NULL, (LPBYTE)pszList, &icList))
MessageBoxA (hCb, "Unable to grab MRUList !", "Nix", MB_OK) ; MessageBoxA (hCb, "Unable to grab MRUList !", "Nix", MB_OK) ;
} }
else else
@ -278,7 +278,7 @@ void FillList (HWND hCb, char *pszLatest)
pszCmd = HeapReAlloc(GetProcessHeap(), 0, pszCmd, icCmd) ; pszCmd = HeapReAlloc(GetProcessHeap(), 0, pszCmd, icCmd) ;
else else
pszCmd = HeapAlloc(GetProcessHeap(), 0, icCmd) ; pszCmd = HeapAlloc(GetProcessHeap(), 0, icCmd) ;
if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, pszCmd, &icCmd)) if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, (LPBYTE)pszCmd, &icCmd))
MessageBoxA (hCb, "Unable to grab index", "Nix", MB_OK) ; MessageBoxA (hCb, "Unable to grab index", "Nix", MB_OK) ;
if (NULL != pszLatest) if (NULL != pszLatest)
@ -328,7 +328,7 @@ void FillList (HWND hCb, char *pszLatest)
memmove (&pszList[1], pszList, Nix) ; memmove (&pszList[1], pszList, Nix) ;
pszList[0] = cMatch ; pszList[0] = cMatch ;
szIndex[0] = cMatch ; szIndex[0] = cMatch ;
RegSetValueExA (hkey, szIndex, 0, REG_SZ, pszLatest, strlen (pszLatest) + 1) ; RegSetValueExA (hkey, szIndex, 0, REG_SZ, (LPBYTE)pszLatest, strlen (pszLatest) + 1) ;
} }
} }
@ -350,10 +350,10 @@ void FillList (HWND hCb, char *pszLatest)
memmove (&pszList[1], pszList, icList - 1) ; memmove (&pszList[1], pszList, icList - 1) ;
pszList[0] = cMatch ; pszList[0] = cMatch ;
szIndex[0] = cMatch ; szIndex[0] = cMatch ;
RegSetValueExA (hkey, szIndex, 0, REG_SZ, pszLatest, strlen (pszLatest) + 1) ; RegSetValueExA (hkey, szIndex, 0, REG_SZ, (LPBYTE)pszLatest, strlen (pszLatest) + 1) ;
} }
RegSetValueExA (hkey, "MRUList", 0, REG_SZ, pszList, strlen (pszList) + 1) ; RegSetValueExA (hkey, "MRUList", 0, REG_SZ, (LPBYTE)pszList, strlen (pszList) + 1) ;
HeapFree( GetProcessHeap(), 0, pszCmd) ; HeapFree( GetProcessHeap(), 0, pszCmd) ;
HeapFree( GetProcessHeap(), 0, pszList) ; HeapFree( GetProcessHeap(), 0, pszList) ;

View File

@ -209,7 +209,7 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName1, LPCS
*value='\0'; *value='\0';
valueLen=sizeof(value); valueLen=sizeof(value);
RegOpenKeyA( HKEY_CURRENT_USER, subKey1, &hKey ); RegOpenKeyA( HKEY_CURRENT_USER, subKey1, &hKey );
rc=RegQueryValueExA( hKey, valName1, NULL, &type, value, &valueLen ); rc=RegQueryValueExA( hKey, valName1, NULL, &type, (LPBYTE)value, &valueLen );
RegCloseKey( hKey ); RegCloseKey( hKey );
if (rc==ERROR_SUCCESS) if (rc==ERROR_SUCCESS)
{ {
@ -228,7 +228,7 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName1, LPCS
*value='\0'; *value='\0';
valueLen=sizeof(value); valueLen=sizeof(value);
RegOpenKeyA( HKEY_CURRENT_USER, subKey1, &hKey ); RegOpenKeyA( HKEY_CURRENT_USER, subKey1, &hKey );
rc=RegQueryValueExA( hKey, valName2, NULL, &type, value, &valueLen ); rc=RegQueryValueExA( hKey, valName2, NULL, &type, (LPBYTE)value, &valueLen );
RegCloseKey( hKey ); RegCloseKey( hKey );
if (rc==ERROR_SUCCESS) if (rc==ERROR_SUCCESS)
{ {
@ -248,7 +248,7 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName1, LPCS
*value='\0'; *value='\0';
valueLen=sizeof(value); valueLen=sizeof(value);
RegOpenKeyA( HKEY_CURRENT_USER, subKey2, &hKey ); RegOpenKeyA( HKEY_CURRENT_USER, subKey2, &hKey );
rc=RegQueryValueExA( hKey, valName1, NULL, &type, value, &valueLen ); rc=RegQueryValueExA( hKey, valName1, NULL, &type, (LPBYTE)value, &valueLen );
RegCloseKey( hKey ); RegCloseKey( hKey );
if (rc==ERROR_SUCCESS) if (rc==ERROR_SUCCESS)
{ {
@ -267,7 +267,7 @@ static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName1, LPCS
*value='\0'; *value='\0';
valueLen=sizeof(value); valueLen=sizeof(value);
RegOpenKeyA( HKEY_CURRENT_USER, subKey2, &hKey ); RegOpenKeyA( HKEY_CURRENT_USER, subKey2, &hKey );
rc=RegQueryValueExA( hKey, valName2, NULL, &type, value, &valueLen ); rc=RegQueryValueExA( hKey, valName2, NULL, &type, (LPBYTE)value, &valueLen );
RegCloseKey( hKey ); RegCloseKey( hKey );
if (rc==ERROR_SUCCESS) if (rc==ERROR_SUCCESS)
{ {

View File

@ -187,7 +187,7 @@ SCSI_GetDeviceName( int h, int c, int t, int d, LPSTR devstr, LPDWORD lpcbData )
sprintf(idstr, "h%02dc%02dt%02dd%02d", h, c, t, d); sprintf(idstr, "h%02dc%02dt%02dd%02d", h, c, t, d);
if( RegQueryValueExA(hkeyScsi, idstr, NULL, &type, devstr, lpcbData) != ERROR_SUCCESS ) if( RegQueryValueExA(hkeyScsi, idstr, NULL, &type, (LPBYTE)devstr, lpcbData) != ERROR_SUCCESS )
{ {
WARN("Could not query value HKEY_DYN_DATA\\%s\\%s\n",KEYNAME_SCSI, idstr); WARN("Could not query value HKEY_DYN_DATA\\%s\\%s\n",KEYNAME_SCSI, idstr);
RegCloseKey(hkeyScsi); RegCloseKey(hkeyScsi);
@ -647,7 +647,7 @@ SCSI_GetProcinfo()
sprintf(idstr, "h%02dc%02dt%02dd%02d", dev.host, dev.channel, dev.target, dev.lun); sprintf(idstr, "h%02dc%02dt%02dd%02d", dev.host, dev.channel, dev.target, dev.lun);
sprintf(devstr, "/dev/sg%c", 'a'+devnum); sprintf(devstr, "/dev/sg%c", 'a'+devnum);
if( RegSetValueExA(hkeyScsi, idstr, 0, REG_SZ, devstr, strlen(devstr)+1 ) != ERROR_SUCCESS ) if( RegSetValueExA(hkeyScsi, idstr, 0, REG_SZ, (LPBYTE)devstr, strlen(devstr)+1 ) != ERROR_SUCCESS )
{ {
ERR("Could not set value HKEY_DYN_DATA\\%s\\%s\n",KEYNAME_SCSI, idstr); ERR("Could not set value HKEY_DYN_DATA\\%s\\%s\n",KEYNAME_SCSI, idstr);
} }

View File

@ -89,7 +89,7 @@ ASPI_OpenDevice16(SRB_ExecSCSICmd16 *prb)
if (!RegOpenKeyExA( HKEY_LOCAL_MACHINE, idstr, 0, KEY_ALL_ACCESS, &hkey )) if (!RegOpenKeyExA( HKEY_LOCAL_MACHINE, idstr, 0, KEY_ALL_ACCESS, &hkey ))
{ {
DWORD type, count = sizeof(device_str); DWORD type, count = sizeof(device_str);
if (RegQueryValueExA( hkey, "Device", 0, &type, device_str, &count )) device_str[0] = 0; if (RegQueryValueExA( hkey, "Device", 0, &type, (LPBYTE)device_str, &count )) device_str[0] = 0;
RegCloseKey( hkey ); RegCloseKey( hkey );
} }

View File

@ -611,7 +611,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
} }
if (value_name) { if (value_name) {
ppdFileName=HeapAlloc(PSDRV_Heap, 0, needed); ppdFileName=HeapAlloc(PSDRV_Heap, 0, needed);
RegQueryValueExA(hkey, value_name, 0, &ppdType, ppdFileName, &needed); RegQueryValueExA(hkey, value_name, 0, &ppdType, (LPBYTE)ppdFileName, &needed);
} }
RegCloseKey(hkey); RegCloseKey(hkey);
} }

View File

@ -209,8 +209,8 @@ void wine_tsx11_unlock(void)
inline static DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name, inline static DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name,
char *buffer, DWORD size ) char *buffer, DWORD size )
{ {
if (appkey && !RegQueryValueExA( appkey, name, 0, NULL, buffer, &size )) return 0; if (appkey && !RegQueryValueExA( appkey, name, 0, NULL, (LPBYTE)buffer, &size )) return 0;
if (defkey && !RegQueryValueExA( defkey, name, 0, NULL, buffer, &size )) return 0; if (defkey && !RegQueryValueExA( defkey, name, 0, NULL, (LPBYTE)buffer, &size )) return 0;
return ERROR_FILE_NOT_FOUND; return ERROR_FILE_NOT_FOUND;
} }

View File

@ -1451,7 +1451,7 @@ static void XFONT_LoadDefault( HKEY hkey, LPCSTR ini, LPCSTR fonttype)
DWORD type, count = sizeof(buffer); DWORD type, count = sizeof(buffer);
buffer[0] = 0; buffer[0] = 0;
RegQueryValueExA(hkey, ini, 0, &type, buffer, &count); RegQueryValueExA(hkey, ini, 0, &type, (LPBYTE)buffer, &count);
if (*buffer) if (*buffer)
{ {
@ -1654,7 +1654,7 @@ static void XFONT_LoadAliases( HKEY hkey )
if (hkey) if (hkey)
{ {
DWORD type, count = sizeof(buffer); DWORD type, count = sizeof(buffer);
RegQueryValueExA(hkey, INIDefaultSerif, 0, &type, buffer, &count); RegQueryValueExA(hkey, INIDefaultSerif, 0, &type, (LPBYTE)buffer, &count);
} }
TRACE("Using '%s' as default serif font\n", buffer); TRACE("Using '%s' as default serif font\n", buffer);
if (LFD_Parse(buffer, &lfd)) if (LFD_Parse(buffer, &lfd))
@ -1671,7 +1671,7 @@ static void XFONT_LoadAliases( HKEY hkey )
if (hkey) if (hkey)
{ {
DWORD type, count = sizeof(buffer); DWORD type, count = sizeof(buffer);
RegQueryValueExA(hkey, INIDefaultSansSerif, 0, &type, buffer, &count); RegQueryValueExA(hkey, INIDefaultSansSerif, 0, &type, (LPBYTE)buffer, &count);
} }
TRACE("Using '%s' as default sans serif font\n", buffer); TRACE("Using '%s' as default sans serif font\n", buffer);
if (LFD_Parse(buffer, &lfd)) if (LFD_Parse(buffer, &lfd))
@ -1696,7 +1696,7 @@ static void XFONT_LoadAliases( HKEY hkey )
if (hkey) if (hkey)
{ {
DWORD type, count = sizeof(buffer); DWORD type, count = sizeof(buffer);
RegQueryValueExA(hkey, subsection, 0, &type, buffer, &count); RegQueryValueExA(hkey, subsection, 0, &type, (LPBYTE)buffer, &count);
} }
if (!buffer[0]) if (!buffer[0])
@ -1821,7 +1821,7 @@ static void XFONT_LoadIgnores( HKEY hkey )
DWORD type, count = sizeof(buffer); DWORD type, count = sizeof(buffer);
sprintf( subsection, "%s%i", INIIgnoreSection, i++ ); sprintf( subsection, "%s%i", INIIgnoreSection, i++ );
if (!RegQueryValueExA(hkey, subsection, 0, &type, buffer, &count)) if (!RegQueryValueExA(hkey, subsection, 0, &type, (LPBYTE)buffer, &count))
{ {
char* pch = buffer; char* pch = buffer;
while( *pch && isspace(*pch) ) pch++; while( *pch && isspace(*pch) ) pch++;
@ -2909,7 +2909,7 @@ static void X11DRV_FONT_InitX11Metrics( void )
if (hkey) if (hkey)
{ {
DWORD type, count = buf_size; DWORD type, count = buf_size;
RegQueryValueExA(hkey, INIGlobalMetrics, 0, &type, buffer, &count); RegQueryValueExA(hkey, INIGlobalMetrics, 0, &type, (LPBYTE)buffer, &count);
} }
if( buffer[0] ) if( buffer[0] )

View File

@ -88,64 +88,64 @@ static void WINECON_RegLoadHelper(HKEY hConKey, struct config_data* cfg)
DWORD val; DWORD val;
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszCursorSize, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszCursorSize, 0, &type, (LPBYTE)&val, &count))
cfg->cursor_size = val; cfg->cursor_size = val;
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszCursorVisible, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszCursorVisible, 0, &type, (LPBYTE)&val, &count))
cfg->cursor_visible = val; cfg->cursor_visible = val;
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszEditionMode, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszEditionMode, 0, &type, (LPBYTE)&val, &count))
cfg->edition_mode = val; cfg->edition_mode = val;
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszExitOnDie, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszExitOnDie, 0, &type, (LPBYTE)&val, &count))
cfg->exit_on_die = val; cfg->exit_on_die = val;
count = sizeof(cfg->face_name); count = sizeof(cfg->face_name);
RegQueryValueEx(hConKey, wszFaceName, 0, &type, (char*)&cfg->face_name, &count); RegQueryValueEx(hConKey, wszFaceName, 0, &type, (LPBYTE)&cfg->face_name, &count);
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszFontSize, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszFontSize, 0, &type, (LPBYTE)&val, &count))
{ {
cfg->cell_height = HIWORD(val); cfg->cell_height = HIWORD(val);
cfg->cell_width = LOWORD(val); cfg->cell_width = LOWORD(val);
} }
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszFontWeight, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszFontWeight, 0, &type, (LPBYTE)&val, &count))
cfg->font_weight = val; cfg->font_weight = val;
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszHistoryBufferSize, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszHistoryBufferSize, 0, &type, (LPBYTE)&val, &count))
cfg->history_size = val; cfg->history_size = val;
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszHistoryNoDup, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszHistoryNoDup, 0, &type, (LPBYTE)&val, &count))
cfg->history_nodup = val; cfg->history_nodup = val;
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszMenuMask, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszMenuMask, 0, &type, (LPBYTE)&val, &count))
cfg->menu_mask = val; cfg->menu_mask = val;
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszQuickEdit, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszQuickEdit, 0, &type, (LPBYTE)&val, &count))
cfg->quick_edit = val; cfg->quick_edit = val;
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszScreenBufferSize, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszScreenBufferSize, 0, &type, (LPBYTE)&val, &count))
{ {
cfg->sb_height = HIWORD(val); cfg->sb_height = HIWORD(val);
cfg->sb_width = LOWORD(val); cfg->sb_width = LOWORD(val);
} }
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszScreenColors, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszScreenColors, 0, &type, (LPBYTE)&val, &count))
cfg->def_attr = val; cfg->def_attr = val;
count = sizeof(val); count = sizeof(val);
if (!RegQueryValueEx(hConKey, wszWindowSize, 0, &type, (char*)&val, &count)) if (!RegQueryValueEx(hConKey, wszWindowSize, 0, &type, (LPBYTE)&val, &count))
{ {
cfg->win_height = HIWORD(val); cfg->win_height = HIWORD(val);
cfg->win_width = LOWORD(val); cfg->win_width = LOWORD(val);
@ -220,45 +220,45 @@ static void WINECON_RegSaveHelper(HKEY hConKey, const struct config_data* cfg)
WINECON_DumpConfig("save", cfg); WINECON_DumpConfig("save", cfg);
val = cfg->cursor_size; val = cfg->cursor_size;
RegSetValueEx(hConKey, wszCursorSize, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszCursorSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
val = cfg->cursor_visible; val = cfg->cursor_visible;
RegSetValueEx(hConKey, wszCursorVisible, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszCursorVisible, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
val = cfg->edition_mode; val = cfg->edition_mode;
RegSetValueEx(hConKey, wszEditionMode, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszEditionMode, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
val = cfg->exit_on_die; val = cfg->exit_on_die;
RegSetValueEx(hConKey, wszExitOnDie, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszExitOnDie, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
RegSetValueEx(hConKey, wszFaceName, 0, REG_SZ, (char*)&cfg->face_name, sizeof(cfg->face_name)); RegSetValueEx(hConKey, wszFaceName, 0, REG_SZ, (LPBYTE)&cfg->face_name, sizeof(cfg->face_name));
val = MAKELONG(cfg->cell_width, cfg->cell_height); val = MAKELONG(cfg->cell_width, cfg->cell_height);
RegSetValueEx(hConKey, wszFontSize, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszFontSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
val = cfg->font_weight; val = cfg->font_weight;
RegSetValueEx(hConKey, wszFontWeight, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszFontWeight, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
val = cfg->history_size; val = cfg->history_size;
RegSetValueEx(hConKey, wszHistoryBufferSize, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszHistoryBufferSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
val = cfg->history_nodup; val = cfg->history_nodup;
RegSetValueEx(hConKey, wszHistoryNoDup, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszHistoryNoDup, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
val = cfg->menu_mask; val = cfg->menu_mask;
RegSetValueEx(hConKey, wszMenuMask, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszMenuMask, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
val = cfg->quick_edit; val = cfg->quick_edit;
RegSetValueEx(hConKey, wszQuickEdit, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszQuickEdit, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
val = MAKELONG(cfg->sb_width, cfg->sb_height); val = MAKELONG(cfg->sb_width, cfg->sb_height);
RegSetValueEx(hConKey, wszScreenBufferSize, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszScreenBufferSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
val = cfg->def_attr; val = cfg->def_attr;
RegSetValueEx(hConKey, wszScreenColors, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszScreenColors, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
val = MAKELONG(cfg->win_width, cfg->win_height); val = MAKELONG(cfg->win_width, cfg->win_height);
RegSetValueEx(hConKey, wszWindowSize, 0, REG_DWORD, (char*)&val, sizeof(val)); RegSetValueEx(hConKey, wszWindowSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val));
} }
/****************************************************************** /******************************************************************