diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index 17e75c70c26..6de77f856ba 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -694,7 +694,7 @@ DWORD WINAPI RegQueryMultipleValuesA(HKEY hkey, PVALENTA val_list, DWORD num_val if(lpValueBuf != NULL && *ldwTotsize + val_list[i].ve_valuelen <= maxBytes) { status = RegQueryValueExA(hkey, val_list[i].ve_valuename, NULL, &val_list[i].ve_type, - bufptr, &val_list[i].ve_valuelen); + (LPBYTE)bufptr, &val_list[i].ve_valuelen); if(status != ERROR_SUCCESS) { return status; @@ -739,7 +739,7 @@ DWORD WINAPI RegQueryMultipleValuesW(HKEY hkey, PVALENTW val_list, DWORD num_val if(lpValueBuf != NULL && *ldwTotsize + val_list[i].ve_valuelen <= maxBytes) { status = RegQueryValueExW(hkey, val_list[i].ve_valuename, NULL, &val_list[i].ve_type, - bufptr, &val_list[i].ve_valuelen); + (LPBYTE)bufptr, &val_list[i].ve_valuelen); if(status != ERROR_SUCCESS) { return status; diff --git a/dlls/advapi32/tests/crypt.c b/dlls/advapi32/tests/crypt.c index 1bb540ee20d..f0b68ef39e7 100644 --- a/dlls/advapi32/tests/crypt.c +++ b/dlls/advapi32/tests/crypt.c @@ -362,7 +362,7 @@ static BOOL FindProvRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszProvNam (*pcbProvName)++; RegOpenKey(hKey, *pszProvName, &subkey); - RegQueryValueEx(subkey, "Type", NULL, NULL, (BYTE*)pdwProvType, &size); + RegQueryValueEx(subkey, "Type", NULL, NULL, (LPBYTE)pdwProvType, &size); RegCloseKey(subkey); RegCloseKey(hKey); @@ -485,7 +485,7 @@ static BOOL FindProvTypesRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszTy if (!(*pszTypeName = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, *pcbTypeName)))) return FALSE; - if (RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, *pszTypeName, pcbTypeName)) + if (RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, (LPBYTE)*pszTypeName, pcbTypeName)) return FALSE; RegCloseKey(hSubKey); @@ -612,7 +612,7 @@ static BOOL FindDfltProvRegVals(DWORD dwProvType, DWORD dwFlags, LPSTR *pszProvN } LocalFree(keyname); - if (RegQueryValueEx(hKey, "Name", NULL, NULL, *pszProvName, pcbProvName)) + if (RegQueryValueEx(hKey, "Name", NULL, NULL, (LPBYTE)*pszProvName, pcbProvName)) { if (GetLastError() != ERROR_MORE_DATA) SetLastError(NTE_PROV_TYPE_ENTRY_BAD); @@ -622,7 +622,7 @@ static BOOL FindDfltProvRegVals(DWORD dwProvType, DWORD dwFlags, LPSTR *pszProvN if (!(*pszProvName = LocalAlloc(LMEM_ZEROINIT, *pcbProvName))) return FALSE; - if (RegQueryValueEx(hKey, "Name", NULL, NULL, *pszProvName, pcbProvName)) + if (RegQueryValueEx(hKey, "Name", NULL, NULL, (LPBYTE)*pszProvName, pcbProvName)) { if (GetLastError() != ERROR_MORE_DATA) SetLastError(NTE_PROV_TYPE_ENTRY_BAD); diff --git a/dlls/devenum/mediacatenum.c b/dlls/devenum/mediacatenum.c index ddd8401fa4e..a8685e212d4 100644 --- a/dlls/devenum/mediacatenum.c +++ b/dlls/devenum/mediacatenum.c @@ -105,7 +105,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read( IErrorLog* pErrorLog) { LPVOID pData = NULL; - LONG received; + DWORD received; DWORD type = 0; RegPropBagImpl *This = (RegPropBagImpl *)iface; HRESULT res = S_OK; @@ -124,7 +124,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read( pData = HeapAlloc(GetProcessHeap(), 0, received); /* work around a GCC bug that occurs here unless we use the reswin32 variable as well */ - reswin32 = RegQueryValueExW(This->hkey, pszPropName, NULL, &type, pData, &received); + reswin32 = RegQueryValueExW(This->hkey, pszPropName, NULL, &type, (LPBYTE)pData, &received); res = HRESULT_FROM_WIN32(reswin32); } diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c index 49fd50acbb8..4fd4d60d575 100644 --- a/dlls/dmusic/dmusic.c +++ b/dlls/dmusic/dmusic.c @@ -214,7 +214,7 @@ HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pg TRACE("(%p, %p)\n", This, pguidPort); if ((RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\DirectMusic\\Defaults" , 0, KEY_READ, &hkGUID) != ERROR_SUCCESS) || - (RegQueryValueExA(hkGUID, "DefaultOutputPort", NULL, &returnTypeGUID, returnBuffer, &sizeOfReturnBuffer) != ERROR_SUCCESS)) + (RegQueryValueExA(hkGUID, "DefaultOutputPort", NULL, &returnTypeGUID, (LPBYTE)returnBuffer, &sizeOfReturnBuffer) != ERROR_SUCCESS)) { WARN(": registry entry missing\n" ); *pguidPort = CLSID_DirectMusicSynth; diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 608d9c1cc68..91e320a077a 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -3707,7 +3707,7 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections } if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, - NULL, &returnTypeGUID, returnBuffer, + NULL, &returnTypeGUID, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR(": missing GUID registry data members\n" ); @@ -3802,7 +3802,7 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections } if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, - NULL, &returnTypeGUID, returnBuffer, + NULL, &returnTypeGUID, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR(": missing GUID registry data members\n" ); @@ -4043,7 +4043,7 @@ static HMODULE DP_LoadSP( LPCGUID lpcGuid, LPSPINITDATA lpSpData, LPBOOL lpbIsDp } if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, - NULL, &returnType, returnBuffer, + NULL, &returnType, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR(": missing GUID registry data members\n" ); @@ -4072,7 +4072,7 @@ static HMODULE DP_LoadSP( LPCGUID lpcGuid, LPSPINITDATA lpSpData, LPBOOL lpbIsDp /* Get dwReserved1 */ if( RegQueryValueExA( hkServiceProvider, majVerDataSubKey, - NULL, &returnType, returnBuffer, + NULL, &returnType, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR(": missing dwReserved1 registry data members\n") ; @@ -4086,7 +4086,7 @@ static HMODULE DP_LoadSP( LPCGUID lpcGuid, LPSPINITDATA lpSpData, LPBOOL lpbIsDp /* Get dwReserved2 */ if( RegQueryValueExA( hkServiceProvider, minVerDataSubKey, - NULL, &returnType, returnBuffer, + NULL, &returnType, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR(": missing dwReserved1 registry data members\n") ; @@ -4100,7 +4100,7 @@ static HMODULE DP_LoadSP( LPCGUID lpcGuid, LPSPINITDATA lpSpData, LPBOOL lpbIsDp /* Get the path for this service provider */ if( ( dwTemp = RegQueryValueExA( hkServiceProvider, pathSubKey, - NULL, NULL, returnBuffer, + NULL, NULL, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) ) != ERROR_SUCCESS ) { ERR(": missing PATH registry data members: 0x%08lx\n", dwTemp ); diff --git a/dlls/dplayx/dplobby.c b/dlls/dplayx/dplobby.c index 66f7e601b1f..f222cfc9a00 100644 --- a/dlls/dplayx/dplobby.c +++ b/dlls/dplayx/dplobby.c @@ -783,7 +783,7 @@ static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumAddressTypes } if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, - NULL, &returnTypeGUID, returnBuffer, + NULL, &returnTypeGUID, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR(": missing GUID registry data members\n" ); @@ -928,7 +928,7 @@ static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumLocalApplications } if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, - NULL, &returnTypeGUID, returnBuffer, + NULL, &returnTypeGUID, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR(": missing GUID registry data members\n" ); @@ -1084,7 +1084,7 @@ static BOOL CALLBACK RunApplicationA_EnumLocalApplications /* Get all the appropriate data from the registry */ if( RegQueryValueExA( lpData->This->dpl->hkCallbackKeyHack, clSubKey, - NULL, &returnType, returnBuffer, + NULL, &returnType, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR( ": missing CommandLine registry data member\n" ); @@ -1098,7 +1098,7 @@ static BOOL CALLBACK RunApplicationA_EnumLocalApplications sizeOfReturnBuffer = 200; if( RegQueryValueExA( lpData->This->dpl->hkCallbackKeyHack, cdSubKey, - NULL, &returnType, returnBuffer, + NULL, &returnType, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR( ": missing CurrentDirectory registry data member\n" ); @@ -1112,7 +1112,7 @@ static BOOL CALLBACK RunApplicationA_EnumLocalApplications sizeOfReturnBuffer = 200; if( RegQueryValueExA( lpData->This->dpl->hkCallbackKeyHack, fileSubKey, - NULL, &returnType, returnBuffer, + NULL, &returnType, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR( ": missing File registry data member\n" ); @@ -1126,7 +1126,7 @@ static BOOL CALLBACK RunApplicationA_EnumLocalApplications sizeOfReturnBuffer = 200; if( RegQueryValueExA( lpData->This->dpl->hkCallbackKeyHack, pathSubKey, - NULL, &returnType, returnBuffer, + NULL, &returnType, (LPBYTE)returnBuffer, &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR( ": missing Path registry data member\n" ); diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c index d1d75173b5d..3efb67dd5c0 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -115,8 +115,8 @@ int ds_default_capture = 0; inline static DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name, char *buffer, DWORD size ) { - if (appkey && !RegQueryValueExA( appkey, name, 0, NULL, buffer, &size )) return 0; - if (defkey && !RegQueryValueExA( defkey, 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, (LPBYTE)buffer, &size )) return 0; return ERROR_FILE_NOT_FOUND; } diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 62fdbf902da..e657692a707 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -625,13 +625,13 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen) unsigned long addr; RegQueryValueExA(hKey, "WinsServer", NULL, NULL, - primaryWINS.String, &size); + (LPBYTE)primaryWINS.String, &size); addr = inet_addr(primaryWINS.String); if (addr != INADDR_NONE && addr != INADDR_ANY) winsEnabled = TRUE; size = sizeof(secondaryWINS.String); RegQueryValueExA(hKey, "BackupWinsServer", NULL, NULL, - secondaryWINS.String, &size); + (LPBYTE)secondaryWINS.String, &size); addr = inet_addr(secondaryWINS.String); if (addr != INADDR_NONE && addr != INADDR_ANY) winsEnabled = TRUE; @@ -1385,7 +1385,7 @@ DWORD WINAPI GetNetworkParams(PFIXED_INFO pFixedInfo, PULONG pOutBufLen) { DWORD size = sizeof(pFixedInfo->ScopeId); - RegQueryValueExA(hKey, "ScopeID", NULL, NULL, pFixedInfo->ScopeId, &size); + RegQueryValueExA(hKey, "ScopeID", NULL, NULL, (LPBYTE)pFixedInfo->ScopeId, &size); RegCloseKey(hKey); } diff --git a/dlls/mpr/pwcache.c b/dlls/mpr/pwcache.c index 24b3fcd1bdf..682ec4cecfa 100644 --- a/dlls/mpr/pwcache.c +++ b/dlls/mpr/pwcache.c @@ -108,7 +108,7 @@ DWORD WINAPI WNetCachePassword( if( valname ) { r = RegSetValueExA( hkey, valname, 0, REG_BINARY, - pbPassword, cbPassword ); + (LPBYTE)pbPassword, cbPassword ); if( r ) r = WN_CANCEL; else @@ -202,7 +202,7 @@ DWORD WINAPI WNetGetCachedPassword( if( valname ) { sz = *pcbPassword; - r = RegQueryValueExA( hkey, valname, 0, &type, pbPassword, &sz ); + r = RegQueryValueExA( hkey, valname, 0, &type, (LPBYTE)pbPassword, &sz ); *pcbPassword = sz; if( r ) r = WN_CANCEL; diff --git a/dlls/netapi32/nbt.c b/dlls/netapi32/nbt.c index f8872cd1a78..5bdf0bfe90d 100644 --- a/dlls/netapi32/nbt.c +++ b/dlls/netapi32/nbt.c @@ -1491,7 +1491,7 @@ void NetBTInit(void) && dword <= MAX_QUERY_TIMEOUT) gWINSQueryTimeout = dword; size = MAX_DOMAIN_NAME_LEN - 1; - if (RegQueryValueExW(hKey, ScopeIDW, NULL, NULL, gScopeID + 1, &size) + if (RegQueryValueExW(hKey, ScopeIDW, NULL, NULL, (LPBYTE)gScopeID + 1, &size) == ERROR_SUCCESS) { /* convert into L2-encoded version, suitable for use by diff --git a/dlls/oledlg/insobjdlg.c b/dlls/oledlg/insobjdlg.c index 88259264ea1..04de4e6f5b5 100644 --- a/dlls/oledlg/insobjdlg.c +++ b/dlls/oledlg/insobjdlg.c @@ -333,7 +333,8 @@ static void UIINSERTOBJECTDLG_SelectCreateFromFile(InsertObjectDlgInfo* pdlgInfo */ static BOOL UIINSERTOBJECTDLG_PopulateObjectTypes(InsertObjectDlgInfo* pdlgInfo) { - DWORD i, len; + DWORD i; + LONG len; HKEY hkclsids; HKEY hkey; CLSID clsid; diff --git a/dlls/powrprof/powrprof.c b/dlls/powrprof/powrprof.c index 35ffdc02d3a..f82c4da26f1 100644 --- a/dlls/powrprof/powrprof.c +++ b/dlls/powrprof/powrprof.c @@ -147,7 +147,8 @@ BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT RangeMax, PUINT RangeMin) { HKEY hKey; BYTE lpValue[40]; - LONG cbValue = 40, r; + LONG r; + DWORD cbValue = sizeof(lpValue); TRACE("(%p, %p)\n", RangeMax, RangeMin); @@ -179,7 +180,7 @@ BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT RangeMax, PUINT RangeMin) *RangeMax = atoiW((LPCWSTR)lpValue); } - cbValue = 40; + cbValue = sizeof(lpValue); r = RegQueryValueExW(hKey, szDiskMin, 0, 0, lpValue, &cbValue); if (r != ERROR_SUCCESS) { @@ -319,7 +320,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) TRACE("Couldn't open registry key HKLM\\%s, using some sane(?) defaults\n", debugstr_w(szPowerCfgSubKey)); } else { BYTE lpValue[40]; - LONG cbValue = 40; + DWORD cbValue = sizeof(lpValue); r = RegQueryValueExW(hKey, szLastID, 0, 0, lpValue, &cbValue); if (r != ERROR_SUCCESS) { TRACE("Couldn't open registry entry HKLM\\%s\\LastID, using some sane(?) defaults\n", debugstr_w(szPowerCfgSubKey)); diff --git a/dlls/setupapi/virtcopy.c b/dlls/setupapi/virtcopy.c index 997cbe2abde..c506f4a8239 100644 --- a/dlls/setupapi/virtcopy.c +++ b/dlls/setupapi/virtcopy.c @@ -719,7 +719,7 @@ static RETERR16 VCP_UI_CopyStart(void) if (RegSetValueExA(hKeyConflict, "Dirty", 0, REG_BINARY, (LPBYTE)&dirty, 1)) return VCPN_FAIL; len = 12; - if (!(RegQueryValueExA(hKeyConflict, "BackupDirectory", NULL, 0, BackupDir, &len))) + if (!(RegQueryValueExA(hKeyConflict, "BackupDirectory", NULL, 0, (LPBYTE)BackupDir, &len))) strcpy(BackupDir, "VCM"); /* create C:\WINDOWS\[BackupDir] and set registry key to it */ diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c index 4ba027348cd..f09069d2e0f 100644 --- a/dlls/shlwapi/reg.c +++ b/dlls/shlwapi/reg.c @@ -935,7 +935,7 @@ LONG WINAPI SHRegWriteUSValueA(HUSKEY hUSKey, LPCSTR pszValue, DWORD dwType, LONG WINAPI SHRegWriteUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, DWORD dwType, LPVOID pvData, DWORD cbData, DWORD dwFlags) { - LONG dummy; + DWORD dummy; LPSHUSKEY hKey = (LPSHUSKEY)hUSKey; LONG ret = ERROR_SUCCESS; diff --git a/dlls/tapi32/line.c b/dlls/tapi32/line.c index c56f525b407..9ee892bb83e 100644 --- a/dlls/tapi32/line.c +++ b/dlls/tapi32/line.c @@ -409,7 +409,7 @@ DWORD WINAPI lineGetCountryA(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTR lpLCE[i].dwCountryNameSize = size_name; lpLCE[i].dwCountryNameOffset = dwOffset; RegQueryValueExA(hsubkey, "Name", NULL, NULL, - ((LPSTR)lpLineCountryList)+dwOffset, + ((LPBYTE)lpLineCountryList)+dwOffset, &size_name); dwOffset += size_name; @@ -417,7 +417,7 @@ DWORD WINAPI lineGetCountryA(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTR lpLCE[i].dwSameAreaRuleSize = size_same; lpLCE[i].dwSameAreaRuleOffset = dwOffset; RegQueryValueExA(hsubkey, "SameAreaRule", NULL, NULL, - ((LPSTR)lpLineCountryList)+dwOffset, + ((LPBYTE)lpLineCountryList)+dwOffset, &size_same); dwOffset += size_same; @@ -425,7 +425,7 @@ DWORD WINAPI lineGetCountryA(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTR lpLCE[i].dwLongDistanceRuleSize = size_long; lpLCE[i].dwLongDistanceRuleOffset = dwOffset; RegQueryValueExA(hsubkey, "LongDistanceRule", NULL, NULL, - ((LPSTR)lpLineCountryList)+dwOffset, + ((LPBYTE)lpLineCountryList)+dwOffset, &size_long); dwOffset += size_long; @@ -433,7 +433,7 @@ DWORD WINAPI lineGetCountryA(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTR lpLCE[i].dwInternationalRuleSize = size_int; lpLCE[i].dwInternationalRuleOffset = dwOffset; RegQueryValueExA(hsubkey, "InternationalRule", NULL, NULL, - ((LPSTR)lpLineCountryList)+dwOffset, + ((LPBYTE)lpLineCountryList)+dwOffset, &size_int); dwOffset += size_int; RegCloseKey(hsubkey); @@ -665,18 +665,18 @@ DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD dwAPIVersion, BYTE buf[10]; numlocations = 1; length += sizeof(LINELOCATIONENTRY) + 20 ; - RegSetValueExA( hsubkey, "AreaCode", 0, REG_SZ, "010", 4); + RegSetValueExA( hsubkey, "AreaCode", 0, REG_SZ, (LPBYTE)"010", 4); GetLocaleInfoA( LOCALE_SYSTEM_DEFAULT, LOCALE_ICOUNTRY, buf, 8); dwval = atoi(buf); RegSetValueExA( hsubkey, "Country", 0, REG_DWORD, (LPBYTE)&dwval, sizeof(DWORD)); - RegSetValueExA( hsubkey, "DisableCallWaiting", 0, REG_SZ, "", 1); + RegSetValueExA( hsubkey, "DisableCallWaiting", 0, REG_SZ, (LPBYTE)"", 1); dwval = 1; RegSetValueExA( hsubkey, "Flags", 0, REG_DWORD, (LPBYTE)&dwval, sizeof(DWORD)); - RegSetValueExA( hsubkey, "LongDistanceAccess", 0, REG_SZ, "", 1); - RegSetValueExA( hsubkey, "Name", 0, REG_SZ, "New Location", 13); - RegSetValueExA( hsubkey, "OutsideAccess", 0, REG_SZ, "", 1); + RegSetValueExA( hsubkey, "LongDistanceAccess", 0, REG_SZ, (LPBYTE)"", 1); + RegSetValueExA( hsubkey, "Name", 0, REG_SZ, (LPBYTE)"New Location", 13); + RegSetValueExA( hsubkey, "OutsideAccess", 0, REG_SZ, (LPBYTE)"", 1); RegCloseKey(hsubkey); dwval = 1; RegSetValueExA( hkLocations, "CurrentID", 0, REG_DWORD, @@ -723,13 +723,13 @@ DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD dwAPIVersion, DWORD dwval; numcards = 1; length += sizeof(LINECARDENTRY) + 22 ; - RegSetValueExA( hsubkey, "Name", 0, REG_SZ, "None (Direct Call)", 19); + RegSetValueExA( hsubkey, "Name", 0, REG_SZ, (LPBYTE)"None (Direct Call)", 19); dwval = 1; RegSetValueExA( hsubkey, "Flags", 0, REG_DWORD, (LPBYTE)&dwval, sizeof(DWORD)); - RegSetValueExA( hsubkey, "InternationalRule", 0, REG_SZ, "", 1); - RegSetValueExA( hsubkey, "LDRule", 0, REG_SZ, "", 1); - RegSetValueExA( hsubkey, "LocalRule", 0, REG_SZ, "", 1); + RegSetValueExA( hsubkey, "InternationalRule", 0, REG_SZ, (LPBYTE)"", 1); + RegSetValueExA( hsubkey, "LDRule", 0, REG_SZ, (LPBYTE)"", 1); + RegSetValueExA( hsubkey, "LocalRule", 0, REG_SZ, (LPBYTE)"", 1); RegCloseKey(hsubkey); dwval = 2; RegSetValueExA( hkCards, "NextID", 0, REG_DWORD, (LPBYTE)&dwval, diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index aae1721aaa8..4b3549edcf7 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -99,7 +99,7 @@ static BOOL CALLBACK UXTHEME_broadcast_msg (HWND hWnd, LPARAM msg) static void UXTHEME_LoadTheme(void) { HKEY hKey; - LONG buffsize; + DWORD buffsize; HRESULT hr; WCHAR tmp[10]; PTHEME_FILE pt; diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c index 1908c26a79b..bfe0f33533d 100644 --- a/dlls/wininet/urlcache.c +++ b/dlls/wininet/urlcache.c @@ -2321,7 +2321,7 @@ BOOL WINAPI CommitUrlCacheEntryW( if (header_info) WideCharToMultiByte(CP_ACP, 0, lpHeaderInfo, -1, header_info, len, NULL, NULL); if (CommitUrlCacheEntryInternal(lpszUrlName, lpszLocalFileName, ExpireTime, LastModifiedTime, - CacheEntryType, header_info, len, lpszFileExtension, lpszOriginalUrl)) + CacheEntryType, (LPBYTE)header_info, len, lpszFileExtension, lpszOriginalUrl)) { bSuccess = TRUE; } diff --git a/dlls/winmm/winealsa/audio.c b/dlls/winmm/winealsa/audio.c index 0436de57cca..f31c476dbcd 100644 --- a/dlls/winmm/winealsa/audio.c +++ b/dlls/winmm/winealsa/audio.c @@ -438,7 +438,7 @@ static int ALSA_RegGetString(HKEY key, const char *value, char **bufp) if (! *bufp) return 1; - rc = RegQueryValueExA(key, value, NULL, NULL, *bufp, &bufsize); + rc = RegQueryValueExA(key, value, NULL, NULL, (LPBYTE)*bufp, &bufsize); return rc; } diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index f9510d41059..731545c2fd0 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -228,7 +228,7 @@ static LPTSTR read_value(HWND hwnd, HKEY hKey, LPCTSTR valueName, DWORD *lpType, error(hwnd, IDS_TOO_BIG_VALUE, valueDataLen); goto done; } - lRet = RegQueryValueEx(hKey, valueName, 0, 0, buffer, &valueDataLen); + lRet = RegQueryValueEx(hKey, valueName, 0, 0, (LPBYTE)buffer, &valueDataLen); if (lRet != ERROR_SUCCESS) { error(hwnd, IDS_BAD_VALUE, valueName); goto done; @@ -300,7 +300,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR valueName) if ( (type == REG_SZ) || (type == REG_EXPAND_SZ) ) { if (DialogBox(0, MAKEINTRESOURCE(IDD_EDIT_STRING), hwnd, modify_dlgproc) == IDOK) { - lRet = RegSetValueEx(hKey, valueName, 0, type, stringValueData, lstrlen(stringValueData) + 1); + lRet = RegSetValueEx(hKey, valueName, 0, type, (LPBYTE)stringValueData, lstrlen(stringValueData) + 1); if (lRet == ERROR_SUCCESS) result = TRUE; else error_code_messagebox(hwnd, lRet); } diff --git a/programs/winebrowser/main.c b/programs/winebrowser/main.c index fc714f3d315..e2d63ab26fe 100644 --- a/programs/winebrowser/main.c +++ b/programs/winebrowser/main.c @@ -85,7 +85,7 @@ int main (int argc, char *argv[]) return 1; } - r = RegQueryValueExA( hkey, "Browsers", 0, &type, szBrowsers, &maxLength); + r = RegQueryValueExA( hkey, "Browsers", 0, &type, (LPBYTE)szBrowsers, &maxLength); if(r != ERROR_SUCCESS) { /* set value to the default */ diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c index fd8493967ad..e4e48158aab 100644 --- a/programs/winedbg/winedbg.c +++ b/programs/winedbg/winedbg.c @@ -181,7 +181,7 @@ static unsigned dbg_load_internal_vars(void) if (!dbg_internal_vars[i].pval) { if (!RegQueryValueEx(hkey, dbg_internal_vars[i].name, 0, - &type, (LPSTR)&val, &count)) + &type, (LPBYTE)&val, &count)) dbg_internal_vars[i].val = val; dbg_internal_vars[i].pval = &dbg_internal_vars[i].val; }