diff --git a/reactos/dll/win32/shell32/drvdefext.cpp b/reactos/dll/win32/shell32/drvdefext.cpp index 79d7abc4e32..32706b4c7f6 100644 --- a/reactos/dll/win32/shell32/drvdefext.cpp +++ b/reactos/dll/win32/shell32/drvdefext.cpp @@ -44,7 +44,8 @@ UINT SH_FormatByteSize(LONGLONG cbSize, LPWSTR pwszResult, UINT cchResultMax); static VOID GetDriveNameWithLetter(LPWSTR pwszText, UINT cchTextMax, LPCWSTR pwszDrive) { - DWORD dwMaxComp, dwFileSys, cchText = 0; + DWORD dwMaxComp, dwFileSys; + SIZE_T cchText = 0; if (GetVolumeInformationW(pwszDrive, pwszText, cchTextMax, NULL, &dwMaxComp, &dwFileSys, NULL, 0)) { @@ -219,8 +220,8 @@ CDrvDefExt::PaintStaticControls(HWND hwndDlg, LPDRAWITEMSTRUCT pDrawItem) TRACE("FreeSpace %u a %f cx %d\n", m_FreeSpacePerc, M_PI+m_FreeSpacePerc/100.0f*M_PI*2.0f, cx); HBRUSH hbrOld = (HBRUSH)SelectObject(pDrawItem->hDC, hMagBrush); - INT xRadial = xCenter + (INT)(cosf(M_PI+m_FreeSpacePerc/100.0f*M_PI*2.0f)*cx/2); - INT yRadial = yCenter - (INT)(sinf(M_PI+m_FreeSpacePerc/100.0f*M_PI*2.0f)*cy/2); + INT xRadial = xCenter + (INT)(cos(M_PI+m_FreeSpacePerc/100.0f*M_PI*2.0f)*cx/2); + INT yRadial = yCenter - (INT)(sin(M_PI+m_FreeSpacePerc/100.0f*M_PI*2.0f)*cy/2); Pie(pDrawItem->hDC, pDrawItem->rcItem.left, pDrawItem->rcItem.top, pDrawItem->rcItem.right, pDrawItem->rcItem.bottom - 10, @@ -241,8 +242,8 @@ CDrvDefExt::PaintStaticControls(HWND hwndDlg, LPDRAWITEMSTRUCT pDrawItem) if (m_FreeSpacePerc < 50 && x == xRadial) SelectObject(pDrawItem->hDC, hDarkMagPen); - float cos_val = (x - xCenter)*2.0f/cx; - INT y = yCenter+sinf(acosf(cos_val))*cy/2; + double cos_val = (x - xCenter)*2.0f/cx; + INT y = yCenter+(INT)sin(acos(cos_val))*cy/2; MoveToEx(pDrawItem->hDC, x, y, NULL); LineTo(pDrawItem->hDC, x, y + 10); } @@ -390,7 +391,7 @@ CDrvDefExt::GeneralPageProc( { /* Property Sheet */ LPPSHNOTIFY lppsn = (LPPSHNOTIFY)lParam; - + if (lppsn->hdr.code == PSN_APPLY) { CDrvDefExt *pDrvDefExt = (CDrvDefExt*)GetWindowLongPtr(hwndDlg, DWLP_USER); @@ -505,7 +506,7 @@ CDrvDefExt::CDrvDefExt() CDrvDefExt::~CDrvDefExt() { - + } HRESULT WINAPI diff --git a/reactos/dll/win32/shell32/shellole.cpp b/reactos/dll/win32/shell32/shellole.cpp index c4f1b50a202..5ad879e5ff9 100644 --- a/reactos/dll/win32/shell32/shellole.cpp +++ b/reactos/dll/win32/shell32/shellole.cpp @@ -248,7 +248,7 @@ HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal) * SEE ALSO * CoTaskMemAlloc, SHLoadOLE */ -LPVOID WINAPI SHAlloc(DWORD len) +LPVOID WINAPI SHAlloc(SIZE_T len) { LPVOID ret; @@ -596,7 +596,7 @@ EXTERN_C HRESULT WINAPI SHPropStgCreate(IPropertySetStorage *psstg, REFFMTID fmt grfFlags, grfMode, dwDisposition, ppstg, puCodePage); hres = psstg->Open(fmtid, grfMode, ppstg); - + switch (dwDisposition) { case CREATE_ALWAYS: @@ -608,16 +608,16 @@ EXTERN_C HRESULT WINAPI SHPropStgCreate(IPropertySetStorage *psstg, REFFMTID fmt return hres; hres = E_FAIL; } - + case OPEN_ALWAYS: case CREATE_NEW: if (FAILED(hres)) hres = psstg->Create(fmtid, pclsid, grfFlags, grfMode, ppstg); - + case OPEN_EXISTING: if (FAILED(hres)) return hres; - + if (puCodePage) { prop.ulKind = PRSPEC_PROPID; @@ -629,7 +629,7 @@ EXTERN_C HRESULT WINAPI SHPropStgCreate(IPropertySetStorage *psstg, REFFMTID fmt *puCodePage = ret.iVal; } } - + return S_OK; } @@ -641,32 +641,32 @@ EXTERN_C HRESULT WINAPI SHPropStgReadMultiple(IPropertyStorage *pps, UINT uCodeP { STATPROPSETSTG stat; HRESULT hres; - + FIXME("%p %u %u %p %p\n", pps, uCodePage, cpspec, rgpspec, rgvar); - + memset(rgvar, 0, cpspec*sizeof(PROPVARIANT)); hres = pps->ReadMultiple(cpspec, rgpspec, rgvar); if (FAILED(hres)) return hres; - + if (!uCodePage) { PROPSPEC prop; PROPVARIANT ret; - + prop.ulKind = PRSPEC_PROPID; prop.propid = PID_CODEPAGE; hres = pps->ReadMultiple(1, &prop, &ret); if(FAILED(hres) || ret.vt!=VT_I2) return S_OK; - + uCodePage = ret.iVal; } - + hres = pps->Stat(&stat); if (FAILED(hres)) return S_OK; - + /* TODO: do something with codepage and stat */ return S_OK; } @@ -680,20 +680,20 @@ EXTERN_C HRESULT WINAPI SHPropStgWriteMultiple(IPropertyStorage *pps, UINT *uCod STATPROPSETSTG stat; UINT codepage; HRESULT hres; - + FIXME("%p %p %u %p %p %d\n", pps, uCodePage, cpspec, rgpspec, rgvar, propidNameFirst); - + hres = pps->Stat(&stat); if (FAILED(hres)) return hres; - + if (uCodePage && *uCodePage) codepage = *uCodePage; else { PROPSPEC prop; PROPVARIANT ret; - + prop.ulKind = PRSPEC_PROPID; prop.propid = PID_CODEPAGE; hres = pps->ReadMultiple(1, &prop, &ret); @@ -701,14 +701,14 @@ EXTERN_C HRESULT WINAPI SHPropStgWriteMultiple(IPropertyStorage *pps, UINT *uCod return hres; if (ret.vt!=VT_I2 || !ret.iVal) return E_FAIL; - + codepage = ret.iVal; if (uCodePage) *uCodePage = codepage; } - + /* TODO: do something with codepage and stat */ - + hres = pps->WriteMultiple(cpspec, rgpspec, rgvar, propidNameFirst); return hres; } diff --git a/reactos/include/psdk/shlobj.h b/reactos/include/psdk/shlobj.h index 04a0d076655..ff1599d5c8f 100644 --- a/reactos/include/psdk/shlobj.h +++ b/reactos/include/psdk/shlobj.h @@ -82,7 +82,7 @@ DECLARE_HANDLE(HPSXA); #endif UINT WINAPI SHAddFromPropSheetExtArray(HPSXA,LPFNADDPROPSHEETPAGE,LPARAM); -LPVOID WINAPI SHAlloc(ULONG) __WINE_ALLOC_SIZE(1); +LPVOID WINAPI SHAlloc(SIZE_T) __WINE_ALLOC_SIZE(1); HRESULT WINAPI SHCoCreateInstance(LPCWSTR,const CLSID*,IUnknown*,REFIID,LPVOID*); HPSXA WINAPI SHCreatePropSheetExtArray(HKEY,LPCWSTR,UINT); HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY,LPCWSTR,UINT,IDataObject*); @@ -1812,7 +1812,7 @@ HRESULT WINAPI CIDLData_CreateFromIDArray( * SHOpenWithDialog */ -enum tagOPEN_AS_INFO_FLAGS +enum tagOPEN_AS_INFO_FLAGS { OAIF_ALLOW_REGISTRATION = 1, OAIF_REGISTER_EXT = 2, @@ -1871,14 +1871,14 @@ DECLARE_INTERFACE_(IShellIconOverlayIdentifier, IUnknown) * Travel log */ -#define TLOG_BACK -1 -#define TLOG_FORE 1 +#define TLOG_BACK -1 +#define TLOG_FORE 1 -#define TLMENUF_INCLUDECURRENT 0x00000001 -#define TLMENUF_CHECKCURRENT (TLMENUF_INCLUDECURRENT | 0x00000002) -#define TLMENUF_BACK 0x00000010 // Default -#define TLMENUF_FORE 0x00000020 -#define TLMENUF_BACKANDFORTH (TLMENUF_BACK | TLMENUF_FORE | TLMENUF_INCLUDECURRENT) +#define TLMENUF_INCLUDECURRENT 0x00000001 +#define TLMENUF_CHECKCURRENT (TLMENUF_INCLUDECURRENT | 0x00000002) +#define TLMENUF_BACK 0x00000010 // Default +#define TLMENUF_FORE 0x00000020 +#define TLMENUF_BACKANDFORTH (TLMENUF_BACK | TLMENUF_FORE | TLMENUF_INCLUDECURRENT) /***************************************************************************** * IDockingWindowSite interface