mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[DESK]
Fix MSVC/x64 warnings svn path=/trunk/; revision=67148
This commit is contained in:
parent
5956c4372a
commit
1d742c54fb
7 changed files with 40 additions and 20 deletions
|
@ -137,7 +137,7 @@ GdipGetSupportedFileExtensions(VOID)
|
|||
size = 0;
|
||||
for (i = 0; i < num; ++i)
|
||||
{
|
||||
size = size + wcslen(codecInfo[i].FilenameExtension) + 1;
|
||||
size = size + (UINT)wcslen(codecInfo[i].FilenameExtension) + 1;
|
||||
}
|
||||
|
||||
size = (size + 1) * sizeof(WCHAR);
|
||||
|
@ -238,7 +238,7 @@ AddWallpapersFromDirectory(UINT uCounter, HWND hwndBackgroundList, BackgroundIte
|
|||
}
|
||||
|
||||
PathRemoveExtension(backgroundItem->szDisplayName);
|
||||
|
||||
|
||||
hr = StringCbCopy(backgroundItem->szFilename, sizeof(backgroundItem->szFilename), filename);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
@ -605,8 +605,8 @@ OnBrowseButton(HWND hwndDlg, PDATA pData)
|
|||
HRESULT hr;
|
||||
TCHAR filterdesc[MAX_PATH];
|
||||
TCHAR *c;
|
||||
UINT sizeRemain;
|
||||
DWORD buffersize;
|
||||
size_t sizeRemain;
|
||||
SIZE_T buffersize;
|
||||
BOOL success;
|
||||
|
||||
hwndBackgroundList = GetDlgItem(hwndDlg, IDC_BACKGROUND_LIST);
|
||||
|
@ -975,12 +975,22 @@ SetWallpaper(PDATA pData)
|
|||
|
||||
if (SUCCEEDED(StringCchLength(pData->backgroundItems[pData->backgroundSelection].szFilename, MAX_PATH, &length)))
|
||||
{
|
||||
RegSetValueEx(regKey, TEXT("ConvertedWallpaper"), 0, REG_SZ, (BYTE*)pData->backgroundItems[pData->backgroundSelection].szFilename, (length + 1) * sizeof(TCHAR));
|
||||
RegSetValueEx(regKey,
|
||||
TEXT("ConvertedWallpaper"),
|
||||
0,
|
||||
REG_SZ,
|
||||
(BYTE*)pData->backgroundItems[pData->backgroundSelection].szFilename,
|
||||
(DWORD)((length + 1) * sizeof(TCHAR)));
|
||||
}
|
||||
|
||||
if (SUCCEEDED(StringCchLength(szWallpaper, MAX_PATH, &length)))
|
||||
{
|
||||
RegSetValueEx(regKey, TEXT("OriginalWallpaper"), 0, REG_SZ, (BYTE *)szWallpaper, (length + 1) * sizeof(TCHAR));
|
||||
RegSetValueEx(regKey,
|
||||
TEXT("OriginalWallpaper"),
|
||||
0,
|
||||
REG_SZ,
|
||||
(BYTE *)szWallpaper,
|
||||
(DWORD)((length + 1) * sizeof(TCHAR)));
|
||||
}
|
||||
|
||||
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, szWallpaper, SPIF_UPDATEINIFILE);
|
||||
|
|
|
@ -29,7 +29,7 @@ DisplayClassInstaller(
|
|||
HKEY hServicesKey = NULL;
|
||||
HKEY hServiceKey = NULL;
|
||||
HKEY hDeviceSubKey = NULL;
|
||||
DWORD disposition;
|
||||
DWORD disposition, cchMax, cbData;
|
||||
BOOL result;
|
||||
LONG rc;
|
||||
HRESULT hr;
|
||||
|
@ -96,9 +96,13 @@ DisplayClassInstaller(
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
result = SetupDiGetActualSectionToInstall(
|
||||
hInf, DriverInfoDetailData.SectionName,
|
||||
SectionName, MAX_PATH - _tcslen(_T(".SoftwareSettings")), NULL, NULL);
|
||||
cchMax = MAX_PATH - (sizeof(_T(".SoftwareSettings")) / sizeof(TCHAR));
|
||||
result = SetupDiGetActualSectionToInstall(hInf,
|
||||
DriverInfoDetailData.SectionName,
|
||||
SectionName,
|
||||
cchMax,
|
||||
NULL,
|
||||
NULL);
|
||||
if (!result)
|
||||
{
|
||||
rc = GetLastError();
|
||||
|
@ -211,10 +215,15 @@ DisplayClassInstaller(
|
|||
DPRINT("SetupInstallFromInfSection() failed with error 0x%lx\n", rc);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Add Device Description string */
|
||||
rc = RegSetValueEx(hDeviceSubKey, _T("Device Description"), 0,
|
||||
REG_SZ, (const BYTE*)DriverInfoData.Description,
|
||||
(_tcslen(DriverInfoData.Description) + 1) * sizeof(TCHAR));
|
||||
cbData = (DWORD)(_tcslen(DriverInfoData.Description) + 1) * sizeof(TCHAR);
|
||||
rc = RegSetValueEx(hDeviceSubKey,
|
||||
_T("Device Description"),
|
||||
0,
|
||||
REG_SZ,
|
||||
(const BYTE*)DriverInfoData.Description,
|
||||
cbData);
|
||||
if (rc != ERROR_SUCCESS)
|
||||
{
|
||||
DPRINT("RegSetValueEx() failed with error 0x%lx\n", rc);
|
||||
|
|
|
@ -74,7 +74,7 @@ pCDevSettings_FreeString(PWCHAR *psz)
|
|||
static PWSTR
|
||||
pCDevSettings_AllocAndCopyString(const TCHAR *pszSrc)
|
||||
{
|
||||
INT c;
|
||||
SIZE_T c;
|
||||
PWSTR str;
|
||||
|
||||
c = _tcslen(pszSrc) + 1;
|
||||
|
@ -556,7 +556,7 @@ CDevSettings_GetData(IDataObject* iface,
|
|||
PCWSTR pszRet = NULL;
|
||||
PWSTR pszBuf;
|
||||
PCDevSettings This = impl_from_IDataObject(iface);
|
||||
|
||||
|
||||
ZeroMemory(pmedium,
|
||||
sizeof(STGMEDIUM));
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ DibLoadImage(LPTSTR lpFilename)
|
|||
ZeroMemory(lpBitmap->info, sizeof(BITMAPINFO));
|
||||
lpBitmap->info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
lpBitmap->info->bmiHeader.biWidth = lpBitmap->width;
|
||||
lpBitmap->info->bmiHeader.biHeight = -lpBitmap->height;
|
||||
lpBitmap->info->bmiHeader.biHeight = -(INT)lpBitmap->height;
|
||||
lpBitmap->info->bmiHeader.biPlanes = 1;
|
||||
lpBitmap->info->bmiHeader.biBitCount = 32;
|
||||
lpBitmap->info->bmiHeader.biCompression = BI_RGB;
|
||||
|
|
|
@ -529,7 +529,7 @@ MonSelGetMonitorRect(IN OUT PMONITORSELWND infoPtr,
|
|||
{
|
||||
RECT rc, rcClient;
|
||||
|
||||
if (Index < 0 || Index >= infoPtr->MonitorsCount)
|
||||
if (Index < 0 || (UINT)Index >= infoPtr->MonitorsCount)
|
||||
return -1;
|
||||
|
||||
if (!infoPtr->CanDisplay)
|
||||
|
@ -1459,7 +1459,7 @@ MonitorSelWndProc(IN HWND hwnd,
|
|||
Index++;
|
||||
}
|
||||
|
||||
if (infoPtr->SelectedMonitor < infoPtr->MonitorsCount)
|
||||
if (infoPtr->SelectedMonitor < (INT)infoPtr->MonitorsCount)
|
||||
{
|
||||
MonSelSetCurSelMonitor(infoPtr,
|
||||
Index,
|
||||
|
|
|
@ -528,12 +528,13 @@ SetScreenSaver(HWND hwndDlg, PDATA pData)
|
|||
/* Set the screensaver */
|
||||
if (pData->ScreenSaverItems[pData->Selection].bIsScreenSaver)
|
||||
{
|
||||
SIZE_T Length = _tcslen(pData->ScreenSaverItems[pData->Selection].szFilename) * sizeof(TCHAR);
|
||||
RegSetValueEx(regKey,
|
||||
_T("SCRNSAVE.EXE"),
|
||||
0,
|
||||
REG_SZ,
|
||||
(PBYTE)pData->ScreenSaverItems[pData->Selection].szFilename,
|
||||
_tcslen(pData->ScreenSaverItems[pData->Selection].szFilename) * sizeof(TCHAR));
|
||||
(DWORD)Length);
|
||||
|
||||
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, TRUE, 0, SPIF_UPDATEINIFILE);
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ AddDisplayDevice(IN PDATA pData, IN const DISPLAY_DEVICE *DisplayDevice)
|
|||
LPTSTR name = NULL;
|
||||
LPTSTR key = NULL;
|
||||
LPTSTR devid = NULL;
|
||||
DWORD descriptionSize, nameSize, keySize, devidSize;
|
||||
SIZE_T descriptionSize, nameSize, keySize, devidSize;
|
||||
PSETTINGS_ENTRY Current;
|
||||
DWORD ResolutionsCount = 1;
|
||||
DWORD i;
|
||||
|
|
Loading…
Reference in a new issue