ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2015
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
372 discussions
Start a n
N
ew thread
[dquintana] 66417: [NTOBJSHEX] * Fix some issues spotted by Thomas Faber.
by dquintana@svn.reactos.org
Author: dquintana Date: Sun Feb 22 20:18:48 2015 New Revision: 66417 URL:
http://svn.reactos.org/svn/reactos?rev=66417&view=rev
Log: [NTOBJSHEX] * Fix some issues spotted by Thomas Faber. Modified: trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp trunk/reactos/dll/shellext/ntobjshex/ntobjns.h trunk/reactos/dll/shellext/ntobjshex/ntobjutil.h Modified: trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/nto…
============================================================================== --- trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp [iso-8859-1] Sun Feb 22 20:18:48 2015 @@ -26,10 +26,10 @@ enum NtObjectColumns { - PID_NTOBJECT_NAME = 1, - PID_NTOBJECT_TYPE = 2, - PID_NTOBJECT_CREATEDATE = 3, - PID_NTOBJECT_LINKTARGET = 4, + NTOBJECT_COLUMN_NAME = 0, + NTOBJECT_COLUMN_TYPE = 1, + NTOBJECT_COLUMN_CREATEDATE = 2, + NTOBJECT_COLUMN_LINKTARGET = 3, }; static HRESULT MakeStrRetFromString(LPCWSTR string, DWORD cbLength, STRRET * str) @@ -43,7 +43,7 @@ static HRESULT MakeStrRetFromString(LPCWSTR string, STRRET * str) { - DWORD stringLength = lstrlenW(string) * sizeof(WCHAR); + DWORD stringLength = wcslen(string) * sizeof(WCHAR); return MakeStrRetFromString(string, stringLength, str); } @@ -196,16 +196,14 @@ { if (uType == GCS_VERBW) { - StringCchCopyW((LPWSTR) pszName, cchMax, L"open"); - return S_OK; + return StringCchCopyW((LPWSTR) pszName, cchMax, L"open"); } } else if (idCmd == (m_idFirst + 1)) { if (uType == GCS_VERBW) { - StringCchCopyW((LPWSTR) pszName, cchMax, L"opennewwindow"); - return S_OK; + return StringCchCopyW((LPWSTR) pszName, cchMax, L"opennewwindow"); } } return E_NOTIMPL; @@ -247,7 +245,7 @@ { m_pcidlFolder = ILClone(parent); if (cidl != 1) - return E_FAIL; + return E_INVALIDARG; m_pcidlChild = ILClone(apidl[0]); return S_OK; } @@ -260,8 +258,9 @@ UINT *pwFlags) { const NtPidlEntry * entry = (NtPidlEntry *) m_pcidlChild; - if (entry->magic != NT_OBJECT_PIDL_MAGIC) - return E_FAIL; + + if ((entry->cb < sizeof(NtPidlEntry)) || (entry->magic != NT_OBJECT_PIDL_MAGIC)) + return E_INVALIDARG; UINT flags = 0; @@ -356,7 +355,7 @@ m_hDpa = DPA_Create(10); if (!m_hDpa) - return E_FAIL; + return E_OUTOFMEMORY; HRESULT hr = EnumerateNtDirectory(m_hDpa, m_ntPath, &m_hDpaCount); if (FAILED_UNEXPECTEDLY(hr)) @@ -376,11 +375,10 @@ TRACE("Searching for pidl { cb=%d } in a list of %d items\n", pcidl->mkid.cb, m_hDpaCount); - for (int i = 0; i < (int) m_hDpaCount; i++) + for (UINT i = 0; i < m_hDpaCount; i++) { NtPidlEntry * pInfo = (NtPidlEntry *) DPA_GetPtr(m_hDpa, i); - if (!pInfo) - return E_FAIL; + ASSERT(pInfo); hr = CompareIDs(0, pInfo, pcidl); if (FAILED_UNEXPECTEDLY(hr)) @@ -413,12 +411,11 @@ for (int i = 0; i < (int) m_hDpaCount; i++) { NtPidlEntry * pInfo = (NtPidlEntry *) DPA_GetPtr(m_hDpa, i); - if (!pInfo) - return E_FAIL; + ASSERT(pInfo); int order = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, - pInfo->entryName, lstrlenW(pInfo->entryName), - strParsingName, lstrlenW(strParsingName)); + pInfo->entryName, wcslen(pInfo->entryName), + strParsingName, wcslen(strParsingName)); if (order == CSTR_EQUAL) { @@ -465,7 +462,7 @@ HRESULT CompareIDs(LPARAM lParam, NtPidlEntry * first, NtPidlEntry * second) { if (LOWORD(lParam) != 0) - return E_FAIL; + return E_INVALIDARG; if (second->cb > first->cb) return MAKE_HRESULT(0, 0, (USHORT) 1); @@ -511,20 +508,20 @@ HRESULT CompareIDs(LPARAM lParam, NtPidlEntry * first, LPCITEMIDLIST pcidl) { - LPCITEMIDLIST p = (pcidl); + LPCITEMIDLIST p = pcidl; NtPidlEntry * second = (NtPidlEntry*) &(p->mkid); - if (second->magic != NT_OBJECT_PIDL_MAGIC) - return E_FAIL; + if ((second->cb < sizeof(NtPidlEntry)) || (second->magic != NT_OBJECT_PIDL_MAGIC)) + return E_INVALIDARG; return CompareIDs(lParam, first, second); } HRESULT CompareIDs(LPARAM lParam, LPCITEMIDLIST pcidl1, LPCITEMIDLIST pcidl2) { - LPCITEMIDLIST p = (pcidl1); + LPCITEMIDLIST p = pcidl1; NtPidlEntry * first = (NtPidlEntry*) &(p->mkid); - if (first->magic != NT_OBJECT_PIDL_MAGIC) - return E_FAIL; + if ((first->cb < sizeof(NtPidlEntry)) || (first->magic != NT_OBJECT_PIDL_MAGIC)) + return E_INVALIDARG; return CompareIDs(lParam, first, pcidl2); } @@ -692,7 +689,7 @@ NtPidlEntry * info; if (!ppidl) - return E_FAIL; + return E_POINTER; if (pchEaten) *pchEaten = 0; @@ -711,7 +708,7 @@ *ppidl = m_PidlManager->CreatePidlFromItem(info); if (pchEaten) - *pchEaten = lstrlenW(info->entryName); + *pchEaten = wcslen(info->entryName); if (pdwAttributes) *pdwAttributes = m_PidlManager->ConvertAttributes(info, pdwAttributes); @@ -745,33 +742,37 @@ if (!(info->objectInformation.GrantedAccess & (STANDARD_RIGHTS_READ | FILE_LIST_DIRECTORY))) return E_ACCESSDENIED; + WCHAR path[MAX_PATH]; + + if (info->objectType == SYMBOLICLINK_OBJECT) + { + NtPidlSymlinkData * symlink = (NtPidlSymlinkData*) (((PBYTE) info) + sizeof(NtPidlEntry) + info->entryNameLength + sizeof(WCHAR)); + + if (symlink->targetNameLength > 0) + { + StringCbCopyW(path, _countof(path), symlink->targetName); + } + else + { + return E_UNEXPECTED; + } + } + else + { + StringCbCopyW(path, _countof(path), m_NtPath); + + PathAppendW(path, info->entryName); + + DbgPrint("BindToObject for Directory %S\n", path); + } + LPITEMIDLIST fullPidl = ILCombine(m_shellPidl, pidl); - WCHAR path[MAX_PATH]; - - if (info->objectType == SYMBOLICLINK_OBJECT) - { - NtPidlSymlinkData * symlink = (NtPidlSymlinkData*) (((PBYTE) info) + sizeof(NtPidlEntry) + info->entryNameLength + sizeof(WCHAR)); - - if (symlink->targetNameLength > 0) - { - StringCbCopyW(path, _countof(path), symlink->targetName); - } - else - { - return E_FAIL; - } - } - else - { - StringCbCopyW(path, _countof(path), m_NtPath); - - PathAppendW(path, info->entryName); - - DbgPrint("BindToObject for Directory %S\n", path); - } - - return ShellObjectCreatorInit<CNtObjectFolder>(fullPidl, path, riid, ppvOut); + hr = ShellObjectCreatorInit<CNtObjectFolder>(fullPidl, path, riid, ppvOut); + + ILFree(fullPidl); + + return hr; } return E_NOTIMPL; @@ -952,12 +953,11 @@ // IPersistFolder HRESULT STDMETHODCALLTYPE CNtObjectFolder::Initialize(LPCITEMIDLIST pidl) { - static WCHAR slash [] = L"\\"; - return Initialize(pidl, slash); + return Initialize(pidl, L"\\"); } // Internal -HRESULT STDMETHODCALLTYPE CNtObjectFolder::Initialize(LPCITEMIDLIST pidl, PWSTR ntPath) +HRESULT STDMETHODCALLTYPE CNtObjectFolder::Initialize(LPCITEMIDLIST pidl, PCWSTR ntPath) { m_shellPidl = ILClone(pidl); StringCbCopy(m_NtPath, _countof(m_NtPath), ntPath); @@ -1011,21 +1011,21 @@ { switch (iColumn) { - case 0: + case NTOBJECT_COLUMN_NAME: *pcsFlags = SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT; return S_OK; - case 1: + case NTOBJECT_COLUMN_TYPE: *pcsFlags = SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT; return S_OK; - case 2: + case NTOBJECT_COLUMN_CREATEDATE: *pcsFlags = SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT; return S_OK; - case 3: + case NTOBJECT_COLUMN_LINKTARGET: *pcsFlags = SHCOLSTATE_TYPE_STR; return S_OK; } - return E_FAIL; + return E_INVALIDARG; } HRESULT STDMETHODCALLTYPE CNtObjectFolder::GetDetailsEx( @@ -1085,7 +1085,7 @@ } else if (IsEqualGUID(pscid->fmtid, GUID_NtObjectColumns)) { - if (pscid->pid == PID_NTOBJECT_LINKTARGET) + if (pscid->pid == NTOBJECT_COLUMN_LINKTARGET) { if (info->objectType == SYMBOLICLINK_OBJECT) { @@ -1097,12 +1097,13 @@ } } - return MakeVariantString(pv, L""); - } - } - } - - return E_FAIL; + V_VT(pv) = VT_EMPTY; + return S_OK; + } + } + } + + return E_INVALIDARG; } HRESULT STDMETHODCALLTYPE CNtObjectFolder::GetDetailsOf( @@ -1123,12 +1124,12 @@ switch (iColumn) { - case 0: + case NTOBJECT_COLUMN_NAME: psd->fmt = LVCFMT_LEFT; MakeStrRetFromString(info->entryName, info->entryNameLength, &(psd->str)); return S_OK; - case 1: + case NTOBJECT_COLUMN_TYPE: psd->fmt = LVCFMT_LEFT; if (info->objectType < 0) @@ -1143,7 +1144,7 @@ else MakeStrRetFromString(ObjectTypeNames[info->objectType], &(psd->str)); return S_OK; - case 2: + case NTOBJECT_COLUMN_CREATEDATE: psd->fmt = LVCFMT_LEFT; if (info->objectInformation.CreateTime.QuadPart != 0) @@ -1153,7 +1154,7 @@ SYSTEMTIME stime; FileTimeToSystemTime((LPFILETIME) &(info->objectInformation.CreateTime), &stime); GetDateFormat(LOCALE_USER_DEFAULT, 0, &stime, NULL, dbuff, _countof(dbuff)); - tbuff = dbuff + lstrlenW(dbuff); + tbuff = dbuff + wcslen(dbuff); *tbuff++ = L' '; GetTimeFormat(LOCALE_USER_DEFAULT, 0, &stime, NULL, tbuff, _countof(dbuff) - (tbuff - dbuff)); @@ -1164,7 +1165,7 @@ MakeStrRetFromString(L"", &(psd->str)); return S_OK; - case 3: + case NTOBJECT_COLUMN_LINKTARGET: psd->fmt = LVCFMT_LEFT; if (info->objectType == SYMBOLICLINK_OBJECT) @@ -1186,28 +1187,28 @@ { switch (iColumn) { - case 0: + case NTOBJECT_COLUMN_NAME: psd->fmt = LVCFMT_LEFT; psd->cxChar = 30; // TODO: Make localizable MakeStrRetFromString(L"Object Name", &(psd->str)); return S_OK; - case 1: + case NTOBJECT_COLUMN_TYPE: psd->fmt = LVCFMT_LEFT; psd->cxChar = 20; // TODO: Make localizable MakeStrRetFromString(L"Object Type", &(psd->str)); return S_OK; - case 2: + case NTOBJECT_COLUMN_CREATEDATE: psd->fmt = LVCFMT_LEFT; psd->cxChar = 20; // TODO: Make localizable MakeStrRetFromString(L"Creation Time", &(psd->str)); return S_OK; - case 3: + case NTOBJECT_COLUMN_LINKTARGET: psd->fmt = LVCFMT_LEFT; psd->cxChar = 30; @@ -1217,7 +1218,7 @@ } } - return E_FAIL; + return E_INVALIDARG; } HRESULT STDMETHODCALLTYPE CNtObjectFolder::MapColumnToSCID( @@ -1227,22 +1228,22 @@ static const GUID storage = PSGUID_STORAGE; switch (iColumn) { - case 0: + case NTOBJECT_COLUMN_NAME: pscid->fmtid = storage; pscid->pid = PID_STG_NAME; return S_OK; - case 1: + case NTOBJECT_COLUMN_TYPE: pscid->fmtid = storage; pscid->pid = PID_STG_STORAGETYPE; return S_OK; - case 2: + case NTOBJECT_COLUMN_CREATEDATE: pscid->fmtid = storage; pscid->pid = PID_STG_WRITETIME; return S_OK; - case 3: + case NTOBJECT_COLUMN_LINKTARGET: pscid->fmtid = GUID_NtObjectColumns; - pscid->pid = PID_NTOBJECT_LINKTARGET; - return S_OK; - } - return E_FAIL; -} + pscid->pid = NTOBJECT_COLUMN_LINKTARGET; + return S_OK; + } + return E_INVALIDARG; +} Modified: trunk/reactos/dll/shellext/ntobjshex/ntobjns.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/nto…
============================================================================== --- trunk/reactos/dll/shellext/ntobjshex/ntobjns.h [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/ntobjshex/ntobjns.h [iso-8859-1] Sun Feb 22 20:18:48 2015 @@ -132,7 +132,7 @@ virtual HRESULT STDMETHODCALLTYPE GetCurFolder(LPITEMIDLIST * pidl); // Internal - HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidl, PWSTR ntPath); + HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidl, PCWSTR ntPath); DECLARE_REGISTRY_RESOURCEID(IDR_NTOBJECTFOLDER) DECLARE_NOT_AGGREGATABLE(CNtObjectFolder) Modified: trunk/reactos/dll/shellext/ntobjshex/ntobjutil.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/nto…
============================================================================== --- trunk/reactos/dll/shellext/ntobjshex/ntobjutil.h [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/ntobjshex/ntobjutil.h [iso-8859-1] Sun Feb 22 20:18:48 2015 @@ -41,7 +41,7 @@ #include <pshpack1.h> struct NtPidlEntry { - SHORT cb; + USHORT cb; USHORT magic; // 0x9A03 ~~~ "NTOB" // If this is -1, there will be a NtPidlTypeData following this, and before any other extensions
9 years, 10 months
1
0
0
0
[gadamopoulos] 66416: [COMCTL32] - Rebar: Fix drawing dividers between bands broken in r66402
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sun Feb 22 19:44:34 2015 New Revision: 66416 URL:
http://svn.reactos.org/svn/reactos?rev=66416&view=rev
Log: [COMCTL32] - Rebar: Fix drawing dividers between bands broken in r66402 Modified: trunk/reactos/dll/win32/comctl32/rebar.c Modified: trunk/reactos/dll/win32/comctl32/rebar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/rebar.c…
============================================================================== --- trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] Sun Feb 22 19:44:34 2015 @@ -1836,6 +1836,7 @@ oldrow = -1; for(i=0; i<infoPtr->uNumBands; i++) { RECT rcBand; + RECT rcBandReal; HRGN hrgnBand; lpBand = REBAR_GetBand(infoPtr, i); @@ -1843,9 +1844,7 @@ if (HIDDENBAND(lpBand)) continue; translate_rect(infoPtr, &rcBand, &lpBand->rcBand); - hrgnBand = CreateRectRgn(rcBand.left, rcBand.top, rcBand.right, rcBand.bottom); - CombineRgn(hrgn, hrgn, hrgnBand, RGN_DIFF); - DeleteObject(hrgnBand); + rcBandReal = rcBand; /* draw band separator between rows */ if (lpBand->iRow != oldrow) { @@ -1871,6 +1870,7 @@ } TRACE ("drawing band separator bottom (%s)\n", wine_dbgstr_rect(&rcRowSep)); + rcBandReal = rcRowSep; } } @@ -1881,6 +1881,7 @@ if (infoPtr->dwStyle & CCS_VERT) { rcSep.bottom = rcSep.top; rcSep.top -= SEP_WIDTH_SIZE; + rcBandReal.top -= SEP_WIDTH_SIZE; if (theme) DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcSep, EDGE_ETCHED, BF_BOTTOM, NULL); else @@ -1889,6 +1890,7 @@ else { rcSep.right = rcSep.left; rcSep.left -= SEP_WIDTH_SIZE; + rcBandReal.left -= SEP_WIDTH_SIZE; if (theme) DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcSep, EDGE_ETCHED, BF_RIGHT, NULL); else @@ -1936,6 +1938,10 @@ if (lpBand->clrBack != CLR_NONE) SetBkColor (hdc, old); } + + hrgnBand = CreateRectRgn(rcBandReal.left, rcBandReal.top, rcBandReal.right, rcBandReal.bottom); + CombineRgn(hrgn, hrgn, hrgnBand, RGN_DIFF); + DeleteObject(hrgnBand); } #if 1
9 years, 10 months
1
0
0
0
[akhaldi] 66415: [D3DCOMPILER_43] Sync with Wine Staging 1.7.37. CORE-9246
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Feb 22 18:53:39 2015 New Revision: 66415 URL:
http://svn.reactos.org/svn/reactos?rev=66415&view=rev
Log: [D3DCOMPILER_43] Sync with Wine Staging 1.7.37. CORE-9246 Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/utils.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/wine/d3dcompiler_43/utils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dcompil…
============================================================================== --- trunk/reactos/dll/directx/wine/d3dcompiler_43/utils.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/d3dcompiler_43/utils.c [iso-8859-1] Sun Feb 22 18:53:39 2015 @@ -2078,6 +2078,11 @@ "sat", + "pre++", + "pre--", + "post++", + "post--", + "+", "-", "*", @@ -2107,11 +2112,6 @@ "max", "pow", - - "pre++", - "pre--", - "post++", - "post--", "lerp", Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Feb 22 18:53:39 2015 @@ -30,7 +30,7 @@ reactos/dll/directx/wine/amstream # Synced to Wine-1.7.27 reactos/dll/directx/wine/d3d8 # Synced to Wine-1.7.27 reactos/dll/directx/wine/d3d9 # Synced to Wine-1.7.27 -reactos/dll/directx/wine/d3dcompiler_43 # Synced to Wine-1.7.27 +reactos/dll/directx/wine/d3dcompiler_43 # Synced to WineStaging-1.7.37 reactos/dll/directx/wine/d3drm # Synced to Wine-1.7.27 reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to Wine-1.7.27 reactos/dll/directx/wine/d3dxof # Synced to Wine-1.7.27
9 years, 10 months
1
0
0
0
[dquintana] 66414: [RSHELL] [NBTSHELL] [NTOBJSHEX] * Fix prototypes of GetAttributesOf and GetUIObjectOf to conform with the specialized IDLIST subtypes. [PSDK] * Fix the declaration of PCITEMID_CH...
by dquintana@svn.reactos.org
Author: dquintana Date: Sun Feb 22 18:26:58 2015 New Revision: 66414 URL:
http://svn.reactos.org/svn/reactos?rev=66414&view=rev
Log: [RSHELL] [NBTSHELL] [NTOBJSHEX] * Fix prototypes of GetAttributesOf and GetUIObjectOf to conform with the specialized IDLIST subtypes. [PSDK] * Fix the declaration of PCITEMID_CHILD to make the "const" attribute affect the contents, and not the pointers themselves. In preparation for whenever CORE-8441 happens. Modified: trunk/reactos/base/shell/rshell/CMergedFolder.cpp trunk/reactos/base/shell/rshell/CMergedFolder.h trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp trunk/reactos/dll/shellext/ntobjshex/ntobjns.h trunk/reactos/include/psdk/shtypes.idl Modified: trunk/reactos/base/shell/rshell/CMergedFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/rshell/CMergedF…
============================================================================== --- trunk/reactos/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] Sun Feb 22 18:26:58 2015 @@ -595,7 +595,7 @@ HRESULT STDMETHODCALLTYPE CMergedFolder::GetAttributesOf( UINT cidl, - LPCITEMIDLIST *apidl, + PCUITEMID_CHILD_ARRAY apidl, SFGAOF *rgfInOut) { LocalPidlInfo info; @@ -627,7 +627,7 @@ HRESULT STDMETHODCALLTYPE CMergedFolder::GetUIObjectOf( HWND hwndOwner, UINT cidl, - LPCITEMIDLIST *apidl, + PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, void **ppvOut) Modified: trunk/reactos/base/shell/rshell/CMergedFolder.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/rshell/CMergedF…
============================================================================== --- trunk/reactos/base/shell/rshell/CMergedFolder.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/rshell/CMergedFolder.h [iso-8859-1] Sun Feb 22 18:26:58 2015 @@ -132,13 +132,13 @@ virtual HRESULT STDMETHODCALLTYPE GetAttributesOf( UINT cidl, - LPCITEMIDLIST *apidl, + PCUITEMID_CHILD_ARRAY apidl, SFGAOF *rgfInOut); virtual HRESULT STDMETHODCALLTYPE GetUIObjectOf( HWND hwndOwner, UINT cidl, - LPCITEMIDLIST *apidl, + PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, void **ppvOut); Modified: trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/shfl…
============================================================================== --- trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] Sun Feb 22 18:26:58 2015 @@ -46,8 +46,8 @@ virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); + virtual HRESULT WINAPI GetAttributesOf (UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); @@ -356,7 +356,7 @@ * ISF_NetConnect_fnGetAttributesOf */ HRESULT WINAPI CNetworkConnections::GetAttributesOf( - UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) + UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD * rgfInOut) { //IGenericSFImpl *This = (IGenericSFImpl *)iface; HRESULT hr = S_OK; @@ -412,7 +412,7 @@ } HRESULT WINAPI CNetworkConnections::GetUIObjectOf( - HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, + HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) { IUnknown *pObj = NULL; Modified: trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/nto…
============================================================================== --- trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp [iso-8859-1] Sun Feb 22 18:26:58 2015 @@ -54,7 +54,7 @@ return S_OK; } -static HRESULT GetFullName(LPCITEMIDLIST pidl, DWORD uFlags, PWSTR strName, DWORD cchName) +static HRESULT GetFullName(PCIDLIST_ABSOLUTE pidl, DWORD uFlags, PWSTR strName, DWORD cchName) { CComPtr<IShellFolder> psfDesktop; STRRET str; @@ -75,42 +75,42 @@ public CComObjectRootEx<CComMultiThreadModelNoCS>, public IContextMenu { - LPCITEMIDLIST pcidlFolder; - LPCITEMIDLIST pcidlChild; - UINT idFirst; + PCIDLIST_ABSOLUTE m_pcidlFolder; + PCITEMID_CHILD m_pcidlChild; + UINT m_idFirst; public: CNtObjectFolderContextMenu() : - pcidlFolder(NULL), - pcidlChild(NULL), - idFirst(0) + m_pcidlFolder(NULL), + m_pcidlChild(NULL), + m_idFirst(0) { } virtual ~CNtObjectFolderContextMenu() { - if (pcidlFolder) - ILFree((LPITEMIDLIST) pcidlFolder); - if (pcidlChild) - ILFree((LPITEMIDLIST) pcidlChild); - } - - HRESULT Initialize(LPITEMIDLIST parent, UINT cidl, LPCITEMIDLIST *apidl) - { - pcidlFolder = ILClone(parent); + if (m_pcidlFolder) + ILFree((LPITEMIDLIST) m_pcidlFolder); + if (m_pcidlChild) + ILFree((LPITEMIDLIST) m_pcidlChild); + } + + HRESULT Initialize(PCIDLIST_ABSOLUTE parent, UINT cidl, PCUITEMID_CHILD_ARRAY apidl) + { + m_pcidlFolder = ILClone(parent); if (cidl != 1) - return E_FAIL; - pcidlChild = ILClone(apidl[0]); + return E_INVALIDARG; + m_pcidlChild = ILClone(apidl[0]); return S_OK; } // IContextMenu virtual HRESULT WINAPI QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) { - idFirst = idCmdFirst; - - const NtPidlEntry * entry = (NtPidlEntry *) pcidlChild; + m_idFirst = idCmdFirst; + + const NtPidlEntry * entry = (NtPidlEntry *) m_pcidlChild; if ((entry->objectType == DIRECTORY_OBJECT) || (entry->objectType == SYMBOLICLINK_OBJECT)) @@ -146,14 +146,14 @@ } } - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, idCmdFirst - idFirst); + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, idCmdFirst - m_idFirst); } virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpici) { - if (LOWORD(lpici->lpVerb) == idFirst || !lpici->lpVerb) - { - LPITEMIDLIST fullPidl = ILCombine(pcidlFolder, pcidlChild); + if (LOWORD(lpici->lpVerb) == m_idFirst || !lpici->lpVerb) + { + LPITEMIDLIST fullPidl = ILCombine(m_pcidlFolder, m_pcidlChild); SHELLEXECUTEINFO sei = { 0 }; sei.cbSize = sizeof(sei); @@ -169,9 +169,9 @@ return bRes ? S_OK : HRESULT_FROM_WIN32(GetLastError()); } - else if (LOWORD(lpici->lpVerb) == (idFirst + 1)) - { - LPITEMIDLIST fullPidl = ILCombine(pcidlFolder, pcidlChild); + else if (LOWORD(lpici->lpVerb) == (m_idFirst + 1)) + { + LPITEMIDLIST fullPidl = ILCombine(m_pcidlFolder, m_pcidlChild); SHELLEXECUTEINFO sei = { 0 }; sei.cbSize = sizeof(sei); @@ -192,7 +192,7 @@ virtual HRESULT WINAPI GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) { - if (idCmd == idFirst) + if (idCmd == m_idFirst) { if (uType == GCS_VERBW) { @@ -200,7 +200,7 @@ return S_OK; } } - else if (idCmd == (idFirst + 1)) + else if (idCmd == (m_idFirst + 1)) { if (uType == GCS_VERBW) { @@ -224,31 +224,31 @@ public CComObjectRootEx<CComMultiThreadModelNoCS>, public IExtractIconW { - LPCITEMIDLIST pcidlFolder; - LPCITEMIDLIST pcidlChild; + PCIDLIST_ABSOLUTE m_pcidlFolder; + PCITEMID_CHILD m_pcidlChild; public: CNtObjectFolderExtractIcon() : - pcidlFolder(NULL), - pcidlChild(NULL) + m_pcidlFolder(NULL), + m_pcidlChild(NULL) { } virtual ~CNtObjectFolderExtractIcon() { - if (pcidlFolder) - ILFree((LPITEMIDLIST) pcidlFolder); - if (pcidlChild) - ILFree((LPITEMIDLIST) pcidlChild); - } - - HRESULT Initialize(LPITEMIDLIST parent, UINT cidl, LPCITEMIDLIST *apidl) - { - pcidlFolder = ILClone(parent); + if (m_pcidlFolder) + ILFree((LPITEMIDLIST) m_pcidlFolder); + if (m_pcidlChild) + ILFree((LPITEMIDLIST) m_pcidlChild); + } + + HRESULT Initialize(PCIDLIST_ABSOLUTE parent, UINT cidl, PCUITEMID_CHILD_ARRAY apidl) + { + m_pcidlFolder = ILClone(parent); if (cidl != 1) return E_FAIL; - pcidlChild = ILClone(apidl[0]); + m_pcidlChild = ILClone(apidl[0]); return S_OK; } @@ -259,9 +259,16 @@ INT *piIndex, UINT *pwFlags) { - const NtPidlEntry * entry = (NtPidlEntry *) pcidlChild; + const NtPidlEntry * entry = (NtPidlEntry *) m_pcidlChild; if (entry->magic != NT_OBJECT_PIDL_MAGIC) return E_FAIL; + + UINT flags = 0; + +#define GIL_CHECKSHIELD 0x0200 +#define GIL_SHIELD 0x0200 + if (uFlags & GIL_CHECKSHIELD && !(entry->objectInformation.GrantedAccess & STANDARD_RIGHTS_READ)) + flags |= GIL_SHIELD; switch (entry->objectType) { @@ -269,22 +276,22 @@ case SYMBOLICLINK_OBJECT: GetModuleFileNameW(g_hInstance, szIconFile, cchMax); *piIndex = -((uFlags & GIL_OPENICON) ? IDI_NTOBJECTDIROPEN : IDI_NTOBJECTDIR); - *pwFlags = 0; + *pwFlags = flags; return S_OK; case DEVICE_OBJECT: GetModuleFileNameW(g_hInstance, szIconFile, cchMax); *piIndex = -IDI_NTOBJECTDEVICE; - *pwFlags = 0; + *pwFlags = flags; return S_OK; case PORT_OBJECT: GetModuleFileNameW(g_hInstance, szIconFile, cchMax); *piIndex = -IDI_NTOBJECTPORT; - *pwFlags = 0; + *pwFlags = flags; return S_OK; default: GetModuleFileNameW(g_hInstance, szIconFile, cchMax); *piIndex = -IDI_NTOBJECTITEM; - *pwFlags = 0; + *pwFlags = flags; return S_OK; } } @@ -358,7 +365,7 @@ return S_OK; } - HRESULT FindPidlInList(LPCITEMIDLIST pcidl, NtPidlEntry ** pinfo) + HRESULT FindPidlInList(PCUITEMID_CHILD pcidl, NtPidlEntry ** pinfo) { HRESULT hr; @@ -522,15 +529,15 @@ return CompareIDs(lParam, first, pcidl2); } - ULONG ConvertAttributes(OBJECT_TYPE Type, ULONG Attributes, PULONG inMask) + ULONG ConvertAttributes(NtPidlEntry * entry, PULONG inMask) { ULONG mask = inMask ? *inMask : 0xFFFFFFFF; - ULONG flags = 0; - - if (Type == DIRECTORY_OBJECT) + ULONG flags = SFGAO_HASPROPSHEET | SFGAO_CANLINK; + + if (entry->objectType == DIRECTORY_OBJECT) flags |= SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_BROWSABLE; - if (Type == SYMBOLICLINK_OBJECT) + if (entry->objectType == SYMBOLICLINK_OBJECT) flags |= SFGAO_LINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_BROWSABLE; return flags & mask; @@ -707,7 +714,7 @@ *pchEaten = lstrlenW(info->entryName); if (pdwAttributes) - *pdwAttributes = m_PidlManager->ConvertAttributes(info->objectType, info->objectInformation.Attributes, pdwAttributes); + *pdwAttributes = m_PidlManager->ConvertAttributes(info, pdwAttributes); return S_OK; } @@ -808,7 +815,7 @@ HRESULT STDMETHODCALLTYPE CNtObjectFolder::GetAttributesOf( UINT cidl, - LPCITEMIDLIST *apidl, + PCUITEMID_CHILD_ARRAY apidl, SFGAOF *rgfInOut) { NtPidlEntry * info; @@ -824,35 +831,23 @@ for (int i = 0; i < (int) cidl; i++) { - LPCITEMIDLIST pidl = apidl[i]; + PCUITEMID_CHILD pidl = apidl[i]; hr = m_PidlManager->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; // Update attributes. - *rgfInOut = m_PidlManager->ConvertAttributes(info->objectType, info->objectInformation.Attributes, rgfInOut); + *rgfInOut = m_PidlManager->ConvertAttributes(info, rgfInOut); } return S_OK; -} - -HRESULT CALLBACK ContextMenuCallback( - _In_opt_ IShellFolder *psf, - _In_opt_ HWND hwnd, - _In_opt_ IDataObject *pdtobj, - UINT uMsg, - WPARAM wParam, - LPARAM lParam - ) -{ - return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CNtObjectFolder::GetUIObjectOf( HWND hwndOwner, UINT cidl, - LPCITEMIDLIST *apidl, + PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, void **ppvOut) Modified: trunk/reactos/dll/shellext/ntobjshex/ntobjns.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/nto…
============================================================================== --- trunk/reactos/dll/shellext/ntobjshex/ntobjns.h [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/ntobjshex/ntobjns.h [iso-8859-1] Sun Feb 22 18:26:58 2015 @@ -69,13 +69,13 @@ virtual HRESULT STDMETHODCALLTYPE GetAttributesOf( UINT cidl, - LPCITEMIDLIST *apidl, + PCUITEMID_CHILD_ARRAY apidl, SFGAOF *rgfInOut); virtual HRESULT STDMETHODCALLTYPE GetUIObjectOf( HWND hwndOwner, UINT cidl, - LPCITEMIDLIST *apidl, + PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, void **ppvOut); Modified: trunk/reactos/include/psdk/shtypes.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shtypes.idl?r…
============================================================================== --- trunk/reactos/include/psdk/shtypes.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/shtypes.idl [iso-8859-1] Sun Feb 22 18:26:58 2015 @@ -35,7 +35,7 @@ } ITEMIDLIST,*LPITEMIDLIST; typedef const ITEMIDLIST *LPCITEMIDLIST; typedef LPITEMIDLIST PITEMID_CHILD; -typedef const PITEMID_CHILD PCITEMID_CHILD; +typedef LPCITEMIDLIST PCITEMID_CHILD; typedef LPCITEMIDLIST PCUITEMID_CHILD; typedef LPCITEMIDLIST *PCUITEMID_CHILD_ARRAY; typedef LPITEMIDLIST PIDLIST_RELATIVE;
9 years, 10 months
1
0
0
0
[janderwald] 66413: [NEWDEV] - fix hardcoded leftover spotted by ThFabba
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Feb 22 17:55:23 2015 New Revision: 66413 URL:
http://svn.reactos.org/svn/reactos?rev=66413&view=rev
Log: [NEWDEV] - fix hardcoded leftover spotted by ThFabba Modified: trunk/reactos/dll/win32/newdev/wizard.c Modified: trunk/reactos/dll/win32/newdev/wizard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/newdev/wizard.c?…
============================================================================== --- trunk/reactos/dll/win32/newdev/wizard.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/newdev/wizard.c [iso-8859-1] Sun Feb 22 17:55:23 2015 @@ -1302,7 +1302,7 @@ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE; psp.pfnDlgProc = NeedRebootDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_NEEDREBOOT); - ahpsp[IDD_NEEDREBOOT-200] = CreatePropertySheetPage(&psp); + ahpsp[IDD_NEEDREBOOT-IDD_FIRSTPAGE] = CreatePropertySheetPage(&psp); /* Create the Finish page */ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE;
9 years, 10 months
1
0
0
0
[janderwald] 66412: [NEWDEV] - fix 'first hardware page' not shown bug
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Feb 22 17:53:17 2015 New Revision: 66412 URL:
http://svn.reactos.org/svn/reactos?rev=66412&view=rev
Log: [NEWDEV] - fix 'first hardware page' not shown bug Modified: trunk/reactos/dll/win32/newdev/resource.h trunk/reactos/dll/win32/newdev/wizard.c Modified: trunk/reactos/dll/win32/newdev/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/newdev/resource.…
============================================================================== --- trunk/reactos/dll/win32/newdev/resource.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/newdev/resource.h [iso-8859-1] Sun Feb 22 17:53:17 2015 @@ -18,15 +18,16 @@ #define IDC_COMBO_PATH 2010 #define IDC_FINISHTITLE 2011 -#define IDD_WELCOMEPAGE 0 -#define IDD_CHSOURCE 1 -#define IDD_SEARCHDRV 2 -#define IDD_INSTALLDRV 3 -#define IDD_NODRIVER 4 -#define IDD_INSTALLFAILED 5 -#define IDD_NEEDREBOOT 6 -#define IDD_FINISHPAGE 7 -#define IDD_MAXIMUMPAGE IDD_FINISHPAGE +#define IDD_WELCOMEPAGE 200 +#define IDD_CHSOURCE 201 +#define IDD_SEARCHDRV 202 +#define IDD_INSTALLDRV 203 +#define IDD_NODRIVER 204 +#define IDD_INSTALLFAILED 205 +#define IDD_NEEDREBOOT 206 +#define IDD_FINISHPAGE 207 +#define IDD_FIRSTPAGE IDD_WELCOMEPAGE +#define IDD_MAXIMUMPAGE 7 #define IDS_INSTALLWIZARDTITLE 1000 #define IDS_UPDATEWIZARDTITLE 1001 Modified: trunk/reactos/dll/win32/newdev/wizard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/newdev/wizard.c?…
============================================================================== --- trunk/reactos/dll/win32/newdev/wizard.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/newdev/wizard.c [iso-8859-1] Sun Feb 22 17:53:17 2015 @@ -1251,6 +1251,9 @@ HPROPSHEETPAGE ahpsp[IDD_MAXIMUMPAGE + 1]; PROPSHEETPAGE psp; + /* zero based index */ + startPage -= IDD_FIRSTPAGE; + /* Create the Welcome page */ ZeroMemory(&psp, sizeof(PROPSHEETPAGE)); psp.dwSize = sizeof(PROPSHEETPAGE); @@ -1260,52 +1263,52 @@ psp.pszTitle = MAKEINTRESOURCE(DevInstData->bUpdate ? IDS_UPDATEWIZARDTITLE : IDS_INSTALLWIZARDTITLE); psp.pfnDlgProc = WelcomeDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_WELCOMEPAGE); - ahpsp[IDD_WELCOMEPAGE] = CreatePropertySheetPage(&psp); + ahpsp[IDD_WELCOMEPAGE-IDD_FIRSTPAGE] = CreatePropertySheetPage(&psp); /* Create the Select Source page */ psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USETITLE; psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_CHSOURCE_TITLE); psp.pfnDlgProc = CHSourceDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_CHSOURCE); - ahpsp[IDD_CHSOURCE] = CreatePropertySheetPage(&psp); + ahpsp[IDD_CHSOURCE-IDD_FIRSTPAGE] = CreatePropertySheetPage(&psp); /* Create the Search driver page */ psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USETITLE; psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_SEARCHDRV_TITLE); psp.pfnDlgProc = SearchDrvDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_SEARCHDRV); - ahpsp[IDD_SEARCHDRV] = CreatePropertySheetPage(&psp); + ahpsp[IDD_SEARCHDRV-IDD_FIRSTPAGE] = CreatePropertySheetPage(&psp); /* Create the Install driver page */ psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USETITLE; psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_INSTALLDRV_TITLE); psp.pfnDlgProc = InstallDrvDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLDRV); - ahpsp[IDD_INSTALLDRV] = CreatePropertySheetPage(&psp); + ahpsp[IDD_INSTALLDRV-IDD_FIRSTPAGE] = CreatePropertySheetPage(&psp); /* Create the No driver page */ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE; psp.pfnDlgProc = NoDriverDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_NODRIVER); - ahpsp[IDD_NODRIVER] = CreatePropertySheetPage(&psp); + ahpsp[IDD_NODRIVER-IDD_FIRSTPAGE] = CreatePropertySheetPage(&psp); /* Create the Install failed page */ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE; psp.pfnDlgProc = InstallFailedDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLFAILED); - ahpsp[IDD_INSTALLFAILED] = CreatePropertySheetPage(&psp); + ahpsp[IDD_INSTALLFAILED-IDD_FIRSTPAGE] = CreatePropertySheetPage(&psp); /* Create the Need reboot page */ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE; psp.pfnDlgProc = NeedRebootDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_NEEDREBOOT); - ahpsp[IDD_NEEDREBOOT] = CreatePropertySheetPage(&psp); + ahpsp[IDD_NEEDREBOOT-200] = CreatePropertySheetPage(&psp); /* Create the Finish page */ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE; psp.pfnDlgProc = FinishDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_FINISHPAGE); - ahpsp[IDD_FINISHPAGE] = CreatePropertySheetPage(&psp); + ahpsp[IDD_FINISHPAGE-IDD_FIRSTPAGE] = CreatePropertySheetPage(&psp); /* Create the property sheet */ psh.dwSize = sizeof(PROPSHEETHEADER);
9 years, 10 months
1
0
0
0
[tkreuzer] 66411: [NTVDM] - Fix BINARY_TO_BCD and BCD_TO_BINARY - Fix MSVC warnings
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Feb 22 16:31:58 2015 New Revision: 66411 URL:
http://svn.reactos.org/svn/reactos?rev=66411&view=rev
Log: [NTVDM] - Fix BINARY_TO_BCD and BCD_TO_BINARY - Fix MSVC warnings Modified: trunk/reactos/subsystems/ntvdm/bios/vidbios.c trunk/reactos/subsystems/ntvdm/emulator.h Modified: trunk/reactos/subsystems/ntvdm/bios/vidbios.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/bios/vidb…
============================================================================== --- trunk/reactos/subsystems/ntvdm/bios/vidbios.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/ntvdm/bios/vidbios.c [iso-8859-1] Sun Feb 22 16:31:58 2015 @@ -2014,6 +2014,8 @@ case SCROLL_DOWN: { + INT Bottom; + /* Move text lines down */ for (i = Rectangle.Bottom - Amount; i >= Rectangle.Top; i--) { @@ -2024,7 +2026,8 @@ } /* Fill the top of the rectangle */ - for (i = Rectangle.Top; i <= Rectangle.Top + Amount - 1; i++) + Bottom = Rectangle.Top + Amount - 1; + for (i = Rectangle.Top; i <= Bottom; i++) { for (j = Rectangle.Left; j <= Rectangle.Right; j++) { @@ -2078,7 +2081,8 @@ /* Fill the left of the rectangle */ for (i = Rectangle.Top; i <= Rectangle.Bottom; i++) { - for (j = Rectangle.Left; j <= Rectangle.Left + Amount - 1; j++) + INT Right = Rectangle.Left + Amount - 1; + for (j = Rectangle.Left; j <= Right; j++) { EmulatorWriteMemory(&EmulatorContext, VideoAddress + (i * Bda->ScreenColumns + j) * sizeof(WORD), Modified: trunk/reactos/subsystems/ntvdm/emulator.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/emulator.…
============================================================================== --- trunk/reactos/subsystems/ntvdm/emulator.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/ntvdm/emulator.h [iso-8859-1] Sun Feb 22 16:31:58 2015 @@ -36,9 +36,40 @@ /* BCD-Binary conversion */ -#define BINARY_TO_BCD(x) ((((x) / 1000) << 12) + (((x) / 100) << 8) + (((x) / 10) << 4) + ((x) % 10)) -#define BCD_TO_BINARY(x) (((x) >> 12) * 1000 + ((x) >> 8) * 100 + ((x) >> 4) * 10 + ((x) & 0x0F)) +FORCEINLINE +USHORT +BINARY_TO_BCD(USHORT Value) +{ + USHORT Result; + + Result = (Value / 1000) << 12; + Value %= 1000; + Result |= (Value / 100) << 8; + Value %= 100; + Result |= (Value / 10) << 4; + Value %= 10; + Result |= Value; + + return Result; +} + +FORCEINLINE +USHORT +BCD_TO_BINARY(USHORT Value) +{ + USHORT Result; + + Result = Value & 0xF; + Value >>= 4; + Result += (Value & 0xF) * 10; + Value >>= 4; + Result += (Value & 0xF) * 100; + Value >>= 4; + Result += Value * 1000; + + return Result; +} /* System I/O ports */ #define CONTROL_SYSTEM_PORT61H 0x61
9 years, 10 months
1
0
0
0
[spetreolle] 66410: [BROWSEUI] update Russian Translation by Akhlamov Petr CORE-7981 #resolve #comment Committed.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Sun Feb 22 16:25:23 2015 New Revision: 66410 URL:
http://svn.reactos.org/svn/reactos?rev=66410&view=rev
Log: [BROWSEUI] update Russian Translation by Akhlamov Petr CORE-7981 #resolve #comment Committed. Modified: trunk/reactos/dll/win32/browseui/lang/ru-RU.rc Modified: trunk/reactos/dll/win32/browseui/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/ru…
============================================================================== --- trunk/reactos/dll/win32/browseui/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/lang/ru-RU.rc [iso-8859-1] Sun Feb 22 16:25:23 2015 @@ -102,16 +102,16 @@ LTEXT "", IDC_TEXT_LINE + 1, 7, 55, 250, 10, SS_LEFT|SS_NOPREFIX LTEXT "", IDC_TEXT_LINE + 2, 7, 75, 190, 10, SS_LEFT|SS_NOPREFIX CONTROL "", IDC_PROGRESS_BAR, PROGRESS_CLASSA, WS_BORDER, 7, 65, 190, 8 - PUSHBUTTON "Cancel", IDCANCEL, 205, 65, 50, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE + PUSHBUTTON "ÐÑмена", IDCANCEL, 205, 65, 50, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE } IDD_CUSTOMIZETOOLBAREX DIALOGEX 0, 0, 357, 33 STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT "Te&xt options:", -1, 4, 2, 48, 15 + LTEXT "ТекÑÑ ÐºÐ½&опки:", -1, 4, 2, 48, 15 COMBOBOX IDC_TEXTOPTIONS, 52, 0, 123, 57, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Ico&n options:", -1, 4, 20, 48, 15 + LTEXT "Ð Ð°Ð·Ð¼ÐµÑ Ð·Ð½&аÑка:", -1, 4, 20, 48, 15 COMBOBOX IDC_ICONOPTIONS, 52, 18, 123, 57, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END @@ -138,8 +138,8 @@ STRINGTABLE BEGIN - IDS_CANCELLING "Canceling..." - IDS_REMAINING "Remaining" + IDS_CANCELLING "ÐÑмена..." + IDS_REMAINING "ÐÑÑалоÑÑ" END STRINGTABLE
9 years, 10 months
1
0
0
0
[tfaber] 66409: [SPOOLSV] - The Spooler service is not pausable. Fixes some wbemprox:query tests
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Feb 22 16:25:20 2015 New Revision: 66409 URL:
http://svn.reactos.org/svn/reactos?rev=66409&view=rev
Log: [SPOOLSV] - The Spooler service is not pausable. Fixes some wbemprox:query tests Modified: trunk/reactos/base/services/spoolsv/spoolsv.c Modified: trunk/reactos/base/services/spoolsv/spoolsv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/spoolsv/spoo…
============================================================================== --- trunk/reactos/base/services/spoolsv/spoolsv.c [iso-8859-1] (original) +++ trunk/reactos/base/services/spoolsv/spoolsv.c [iso-8859-1] Sun Feb 22 16:25:20 2015 @@ -38,9 +38,7 @@ ServiceStatus.dwCurrentState = dwState; if (dwState == SERVICE_RUNNING) - ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_PAUSE_CONTINUE | SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN; - else if (dwState == SERVICE_PAUSED) - ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_PAUSE_CONTINUE; + ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN; else ServiceStatus.dwControlsAccepted = 0; @@ -49,9 +47,7 @@ ServiceStatus.dwCheckPoint = 0; if (dwState == SERVICE_START_PENDING || - dwState == SERVICE_STOP_PENDING || - dwState == SERVICE_PAUSE_PENDING || - dwState == SERVICE_CONTINUE_PENDING) + dwState == SERVICE_STOP_PENDING) ServiceStatus.dwWaitHint = 10000; else ServiceStatus.dwWaitHint = 0; @@ -74,16 +70,6 @@ case SERVICE_CONTROL_STOP: TRACE(" SERVICE_CONTROL_STOP received\n"); UpdateServiceStatus(SERVICE_STOPPED); - return ERROR_SUCCESS; - - case SERVICE_CONTROL_PAUSE: - TRACE(" SERVICE_CONTROL_PAUSE received\n"); - UpdateServiceStatus(SERVICE_PAUSED); - return ERROR_SUCCESS; - - case SERVICE_CONTROL_CONTINUE: - TRACE(" SERVICE_CONTROL_CONTINUE received\n"); - UpdateServiceStatus(SERVICE_RUNNING); return ERROR_SUCCESS; case SERVICE_CONTROL_INTERROGATE:
9 years, 10 months
1
0
0
0
[tkreuzer] 66408: [PSDK] Improve / fix range constants in limits.h and intsafe.h, get rid of stuff that shouldn't be there.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Feb 22 16:05:51 2015 New Revision: 66408 URL:
http://svn.reactos.org/svn/reactos?rev=66408&view=rev
Log: [PSDK] Improve / fix range constants in limits.h and intsafe.h, get rid of stuff that shouldn't be there. Modified: trunk/reactos/include/crt/limits.h trunk/reactos/include/psdk/intsafe.h Modified: trunk/reactos/include/crt/limits.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/limits.h?rev=6…
============================================================================== --- trunk/reactos/include/crt/limits.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/limits.h [iso-8859-1] Sun Feb 22 16:05:51 2015 @@ -3,6 +3,7 @@ * This file is part of the w64 mingw-runtime package. * No warranty is given; refer to the file DISCLAIMER within this package. */ +#pragma once #include <crtdefs.h> #ifndef _INC_LIMITS @@ -23,8 +24,13 @@ #define SCHAR_MAX 127 #define UCHAR_MAX 0xff -#define CHAR_MIN SCHAR_MIN -#define CHAR_MAX SCHAR_MAX +#ifdef _CHAR_UNSIGNED + #define CHAR_MIN 0 + #define CHAR_MAX UCHAR_MAX +#else + #define CHAR_MIN SCHAR_MIN + #define CHAR_MAX SCHAR_MAX +#endif /* _CHAR_UNSIGNED */ #define MB_LEN_MAX 5 #define SHRT_MIN (-32768) @@ -36,41 +42,30 @@ #define LONG_MIN (-2147483647L - 1) #define LONG_MAX 2147483647L #define ULONG_MAX 0xffffffffUL -#define LLONG_MAX 9223372036854775807ll -#define LLONG_MIN (-9223372036854775807ll - 1) -#define ULLONG_MAX 0xffffffffffffffffull +#define LLONG_MAX 9223372036854775807LL +#define LLONG_MIN (-9223372036854775807LL - 1) +#define ULLONG_MAX 0xffffffffffffffffULL -#if _INTEGRAL_MAX_BITS >= 8 -#define _I8_MIN (-127 - 1) -#define _I8_MAX 127i8 -#define _UI8_MAX 0xffu -#endif +#define _I8_MIN ((signed char)(-127 - 1)) +#define _I8_MAX ((signed char)127) +#define _UI8_MAX ((unsigned char)0xff) -#if _INTEGRAL_MAX_BITS >= 16 -#define _I16_MIN (-32767 - 1) -#define _I16_MAX 32767i16 -#define _UI16_MAX 0xffffu -#endif +#define _I16_MIN ((short)(-32767 - 1)) +#define _I16_MAX ((short)32767) +#define _UI16_MAX ((unsigned short)0xffffU) -#if _INTEGRAL_MAX_BITS >= 32 #define _I32_MIN (-2147483647 - 1) #define _I32_MAX 2147483647 #define _UI32_MAX 0xffffffffu -#endif -#if defined(__GNUC__) -#undef LONG_LONG_MAX -#define LONG_LONG_MAX 9223372036854775807ll -#undef LONG_LONG_MIN -#define LONG_LONG_MIN (-LONG_LONG_MAX-1) -#undef ULONG_LONG_MAX -#define ULONG_LONG_MAX (2ull * LONG_LONG_MAX + 1ull) -#endif +#define _I64_MIN (-9223372036854775807LL - 1) +#define _I64_MAX 9223372036854775807LL +#define _UI64_MAX 0xffffffffffffffffULL -#if _INTEGRAL_MAX_BITS >= 64 -#define _I64_MIN (-9223372036854775807ll - 1) -#define _I64_MAX 9223372036854775807ll -#define _UI64_MAX 0xffffffffffffffffull +#if defined(_MSC_VER) && (_INTEGRAL_MAX_BITS >= 128) +#define _I128_MIN (-170141183460469231731687303715884105727i128 - 1) +#define _I128_MAX 170141183460469231731687303715884105727i128 +#define _UI128_MAX 0xffffffffffffffffffffffffffffffffui128 #endif #ifndef SIZE_MAX @@ -79,33 +74,12 @@ #else #define SIZE_MAX UINT_MAX #endif -#endif +#endif /* SIZE_MAX */ -#ifdef _POSIX_ -#define _POSIX_ARG_MAX 4096 -#define _POSIX_CHILD_MAX 6 -#define _POSIX_LINK_MAX 8 -#define _POSIX_MAX_CANON 255 -#define _POSIX_MAX_INPUT 255 -#define _POSIX_NAME_MAX 14 -#define _POSIX_NGROUPS_MAX 0 -#define _POSIX_OPEN_MAX 16 -#define _POSIX_PATH_MAX 255 -#define _POSIX_PIPE_BUF 512 -#define _POSIX_SSIZE_MAX 32767 -#define _POSIX_STREAM_MAX 8 -#define _POSIX_TZNAME_MAX 3 -#define ARG_MAX 14500 -#define LINK_MAX 1024 -#define MAX_CANON _POSIX_MAX_CANON -#define MAX_INPUT _POSIX_MAX_INPUT -#define NAME_MAX 255 -#define NGROUPS_MAX 16 -#define OPEN_MAX 32 -#define PATH_MAX 512 -#define PIPE_BUF _POSIX_PIPE_BUF -#define SSIZE_MAX _POSIX_SSIZE_MAX -#define STREAM_MAX 20 -#define TZNAME_MAX 10 -#endif -#endif +#if __STDC_WANT_SECURE_LIB__ +#ifndef RSIZE_MAX +#define RSIZE_MAX SIZE_MAX +#endif /* RSIZE_MAX */ +#endif /* __STDC_WANT_SECURE_LIB__ */ + +#endif /* _INC_LIMITS */ Modified: trunk/reactos/include/psdk/intsafe.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intsafe.h?rev…
============================================================================== --- trunk/reactos/include/psdk/intsafe.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/intsafe.h [iso-8859-1] Sun Feb 22 16:05:51 2015 @@ -122,52 +122,40 @@ C_ASSERT(sizeof(DWORD) == 4); C_ASSERT(sizeof(UINT_PTR) == sizeof(ULONG_PTR)); -/* Undefine these to avoid conflicts with limits.h */ -#undef CHAR_MIN -#undef CHAR_MAX -#undef INT_MIN -#undef INT_MAX -#undef LONG_MIN -#undef LONG_MAX -#undef UCHAR_MAX -#undef UINT_MAX -#undef ULONG_MAX - /* Integer range margins (use (x-1) to prevent warnings) */ -#define INT8_MIN (-127 - 1) -#define SHORT_MIN (-32767 - 1) -#define INT16_MIN (-32767 - 1) +#define INT8_MIN ((signed char)(-127 - 1)) +#define SHORT_MIN (-32768) +#define INT16_MIN ((short)(-32767 - 1)) #define INT_MIN (-2147483647 - 1) #define INT32_MIN (-2147483647 - 1) #define LONG_MIN (-2147483647L - 1) #define LONGLONG_MIN (-9223372036854775807LL - 1) #define LONG64_MIN (-9223372036854775807LL - 1) #define INT64_MIN (-9223372036854775807LL - 1) -//#define INT128_MIN (-170141183460469231731687303715884105728) +#define INT128_MIN (-170141183460469231731687303715884105727i128 - 1) #ifdef _WIN64 -#define INT_PTR_MIN INT64_MIN -#define LONG_PTR_MIN LONG64_MIN -#define PTRDIFF_T_MIN INT64_MIN -#define SSIZE_T_MIN INT64_MIN -#else // _WIN64 -#define INT_PTR_MIN INT_MIN -#define LONG_PTR_MIN LONG_MIN -#define PTRDIFF_T_MIN INT_MIN -#define SSIZE_T_MIN INT_MIN -#endif // _WIN64 - -#define INT8_MAX 127 -#define UINT8_MAX 0xff -#define UCHAR_MAX 0xff +#define INT_PTR_MIN (-9223372036854775807LL - 1) +#define LONG_PTR_MIN (-9223372036854775807LL - 1) +#define PTRDIFF_T_MIN (-9223372036854775807LL - 1) +#define SSIZE_T_MIN (-9223372036854775807LL - 1) +#else /* _WIN64 */ +#define INT_PTR_MIN (-2147483647 - 1) +#define LONG_PTR_MIN (-2147483647L - 1) +#define PTRDIFF_T_MIN (-2147483647 - 1) +#define SSIZE_T_MIN (-2147483647L - 1) +#endif /* _WIN64 */ + +#define INT8_MAX ((signed char)127) +#define UINT8_MAX ((unsigned char)0xffU) #define BYTE_MAX 0xff #define SHORT_MAX 32767 -#define INT16_MAX 32767 +#define INT16_MAX ((short)32767) #define USHORT_MAX 0xffff -#define UINT16_MAX 0xffff +#define UINT16_MAX ((unsigned short)0xffffU) #define WORD_MAX 0xffff #define INT_MAX 2147483647 #define INT32_MAX 2147483647 -#define UINT_MAX 0xffffffffU +#define UINT_MAX 0xffffffff #define UINT32_MAX 0xffffffffU #define LONG_MAX 2147483647L #define ULONG_MAX 0xffffffffUL @@ -180,54 +168,44 @@ #define ULONG64_MAX 0xffffffffffffffffULL #define DWORD64_MAX 0xffffffffffffffffULL #define UINT64_MAX 0xffffffffffffffffULL -#define INT128_MAX 170141183460469231731687303715884105727 -#define UINT128_MAX 0xffffffffffffffffffffffffffffffff +#define INT128_MAX 170141183460469231731687303715884105727i128 +#define UINT128_MAX 0xffffffffffffffffffffffffffffffffui128 #undef SIZE_T_MAX #ifdef _WIN64 -#define INT_PTR_MAX INT64_MAX -#define UINT_PTR_MAX UINT64_MAX -#define LONG_PTR_MAX LONG64_MAX -#define ULONG_PTR_MAX ULONG64_MAX -#define DWORD_PTR_MAX DWORD64_MAX -#define PTRDIFF_T_MAX INT64_MAX -#define SIZE_T_MAX UINT64_MAX -#define SSIZE_T_MAX INT64_MAX -#define _SIZE_T_MAX UINT64_MAX -#else // _WIN64 -#define INT_PTR_MAX INT_MAX -#define UINT_PTR_MAX UINT_MAX -#define LONG_PTR_MAX LONG_MAX -#define ULONG_PTR_MAX ULONG_MAX -#define DWORD_PTR_MAX DWORD_MAX -#define PTRDIFF_T_MAX INT_MAX -#define SIZE_T_MAX UINT_MAX -#define SSIZE_T_MAX INT_MAX -#define _SIZE_T_MAX UINT_MAX -#endif // _WIN64 - -#ifndef CHAR_MIN -#ifdef _CHAR_UNSIGNED -#define CHAR_MIN 0 -#define CHAR_MAX 0xff -#else -#define CHAR_MIN (-128) -#define CHAR_MAX 127 -#endif -#endif +#define INT_PTR_MAX 9223372036854775807LL +#define UINT_PTR_MAX 0xffffffffffffffffULL +#define LONG_PTR_MAX 9223372036854775807LL +#define ULONG_PTR_MAX 0xffffffffffffffffULL +#define DWORD_PTR_MAX 0xffffffffffffffffULL +#define PTRDIFF_T_MAX 9223372036854775807LL +#define SIZE_T_MAX 0xffffffffffffffffULL +#define SSIZE_T_MAX 9223372036854775807LL +#define _SIZE_T_MAX 0xffffffffffffffffULL +#else /* _WIN64 */ +#define INT_PTR_MAX 2147483647 +#define UINT_PTR_MAX 0xffffffff +#define LONG_PTR_MAX 2147483647L +#define ULONG_PTR_MAX 0xffffffffUL +#define DWORD_PTR_MAX 0xffffffffUL +#define PTRDIFF_T_MAX 2147483647 +#define SIZE_T_MAX 0xffffffff +#define SSIZE_T_MAX 2147483647L +#define _SIZE_T_MAX 0xffffffffUL +#endif /* _WIN64 */ /* Error values */ -#define INT8_ERROR (-1) -#define UINT8_ERROR 0xff +#define INT8_ERROR ((signed char)(-1)) +#define UINT8_ERROR ((unsigned char)0xff) #define BYTE_ERROR 0xff #define SHORT_ERROR (-1) -#define INT16_ERROR (-1) +#define INT16_ERROR ((short)(-1)) #define USHORT_ERROR 0xffff -#define UINT16_ERROR 0xffff +#define UINT16_ERROR ((unsigned short)0xffffU) #define WORD_ERROR 0xffff #define INT_ERROR (-1) #define INT32_ERROR (-1) #define UINT_ERROR 0xffffffff -#define UINT32_ERROR 0xffffffff +#define UINT32_ERROR 0xffffffffU #define LONG_ERROR (-1L) #define ULONG_ERROR 0xffffffffUL #define DWORD_ERROR 0xffffffffUL @@ -248,7 +226,7 @@ #define SIZE_T_ERROR 0xffffffffffffffffULL #define SSIZE_T_ERROR (-1LL) #define _SIZE_T_ERROR 0xffffffffffffffffULL -#else // _WIN64 +#else /* _WIN64 */ #define INT_PTR_ERROR (-1) #define UINT_PTR_ERROR 0xffffffff #define LONG_PTR_ERROR (-1L) @@ -258,7 +236,18 @@ #define SIZE_T_ERROR 0xffffffff #define SSIZE_T_ERROR (-1L) #define _SIZE_T_ERROR 0xffffffffUL -#endif // _WIN64 +#endif /* _WIN64 */ + +/* special definitons (the CHAR ones should not be defined here!) */ +#define _INTSAFE_CHAR CHAR +#define _INTSAFE_CHAR_ERROR 0xff +#ifdef _CHAR_UNSIGNED + #define _INTSAFE_CHAR_MIN 0 + #define _INTSAFE_CHAR_MAX 0xff +#else + #define _INTSAFE_CHAR_MIN (-128) + #define _INTSAFE_CHAR_MAX 127 +#endif /* _CHAR_UNSIGNED */ #define size_t_ERROR SIZE_T_ERROR #define UCHAR_ERROR '\0' @@ -290,23 +279,23 @@ } \ } -DEFINE_SAFE_CONVERT_UTOX(ByteToChar, BYTE, CHAR) +DEFINE_SAFE_CONVERT_UTOX(ByteToChar, BYTE, _INTSAFE_CHAR) DEFINE_SAFE_CONVERT_UTOX(ByteToInt8, BYTE, INT8) -DEFINE_SAFE_CONVERT_UTOX(UInt8ToChar, UINT8, CHAR) +DEFINE_SAFE_CONVERT_UTOX(UInt8ToChar, UINT8, _INTSAFE_CHAR) DEFINE_SAFE_CONVERT_UTOX(UInt8ToInt8, UINT8, INT8) -DEFINE_SAFE_CONVERT_UTOX(UShortToChar, USHORT, CHAR) -DEFINE_SAFE_CONVERT_UTOX(UShortToUChar, USHORT, UCHAR) +DEFINE_SAFE_CONVERT_UTOX(UShortToChar, USHORT, _INTSAFE_CHAR) +DEFINE_SAFE_CONVERT_UTOX(UShortToUChar, USHORT, UINT8) DEFINE_SAFE_CONVERT_UTOX(UShortToInt8, USHORT, INT8) DEFINE_SAFE_CONVERT_UTOX(UShortToUInt8, USHORT, UINT8) DEFINE_SAFE_CONVERT_UTOX(UShortToShort, USHORT, SHORT) -DEFINE_SAFE_CONVERT_UTOX(UIntToUChar, UINT, UCHAR) +DEFINE_SAFE_CONVERT_UTOX(UIntToUChar, UINT, UINT8) DEFINE_SAFE_CONVERT_UTOX(UIntToInt8, UINT, INT8) DEFINE_SAFE_CONVERT_UTOX(UIntToUInt8, UINT, UINT8) DEFINE_SAFE_CONVERT_UTOX(UIntToShort, UINT, SHORT) DEFINE_SAFE_CONVERT_UTOX(UIntToUShort, UINT, USHORT) DEFINE_SAFE_CONVERT_UTOX(UIntToInt, UINT, INT) DEFINE_SAFE_CONVERT_UTOX(UIntToLong, UINT, LONG) -DEFINE_SAFE_CONVERT_UTOX(UIntPtrToUChar, UINT_PTR, UCHAR) +DEFINE_SAFE_CONVERT_UTOX(UIntPtrToUChar, UINT_PTR, UINT8) DEFINE_SAFE_CONVERT_UTOX(UIntPtrToInt8, UINT_PTR, INT8) DEFINE_SAFE_CONVERT_UTOX(UIntPtrToUInt8, UINT_PTR, UINT8) DEFINE_SAFE_CONVERT_UTOX(UIntPtrToShort, UINT_PTR, SHORT) @@ -317,7 +306,7 @@ DEFINE_SAFE_CONVERT_UTOX(UIntPtrToLong, UINT_PTR, LONG) DEFINE_SAFE_CONVERT_UTOX(UIntPtrToIntPtr, UINT_PTR, INT_PTR) DEFINE_SAFE_CONVERT_UTOX(UIntPtrToLongPtr, UINT_PTR, LONG_PTR) -DEFINE_SAFE_CONVERT_UTOX(ULongToUChar, ULONG, UCHAR) +DEFINE_SAFE_CONVERT_UTOX(ULongToUChar, ULONG, UINT8) DEFINE_SAFE_CONVERT_UTOX(ULongToUInt8, ULONG, UINT8) DEFINE_SAFE_CONVERT_UTOX(ULongToShort, ULONG, SHORT) DEFINE_SAFE_CONVERT_UTOX(ULongToUShort, ULONG, USHORT) @@ -354,7 +343,7 @@ } \ } -DEFINE_SAFE_CONVERT_STOU(Int8ToUChar, INT8, UCHAR) +DEFINE_SAFE_CONVERT_STOU(Int8ToUChar, INT8, UINT8) DEFINE_SAFE_CONVERT_STOU(Int8ToUInt8, INT8, UINT8) DEFINE_SAFE_CONVERT_STOU(Int8ToUShort, INT8, USHORT) DEFINE_SAFE_CONVERT_STOU(Int8ToUInt, INT8, UINT) @@ -362,7 +351,7 @@ DEFINE_SAFE_CONVERT_STOU(Int8ToUIntPtr, INT8, UINT_PTR) DEFINE_SAFE_CONVERT_STOU(Int8ToULongPtr, INT8, ULONG_PTR) DEFINE_SAFE_CONVERT_STOU(Int8ToULongLong, INT8, ULONGLONG) -DEFINE_SAFE_CONVERT_STOU(ShortToUChar, SHORT, UCHAR) +DEFINE_SAFE_CONVERT_STOU(ShortToUChar, SHORT, UINT8) DEFINE_SAFE_CONVERT_STOU(ShortToUInt8, SHORT, UINT8) DEFINE_SAFE_CONVERT_STOU(ShortToUShort, SHORT, USHORT) DEFINE_SAFE_CONVERT_STOU(ShortToUInt, SHORT, UINT) @@ -371,13 +360,13 @@ DEFINE_SAFE_CONVERT_STOU(ShortToULongPtr, SHORT, ULONG_PTR) DEFINE_SAFE_CONVERT_STOU(ShortToDWordPtr, SHORT, DWORD_PTR) DEFINE_SAFE_CONVERT_STOU(ShortToULongLong, SHORT, ULONGLONG) -DEFINE_SAFE_CONVERT_STOU(IntToUChar, INT, UCHAR) +DEFINE_SAFE_CONVERT_STOU(IntToUChar, INT, UINT8) DEFINE_SAFE_CONVERT_STOU(IntToUInt8, INT, UINT8) DEFINE_SAFE_CONVERT_STOU(IntToUShort, INT, USHORT) DEFINE_SAFE_CONVERT_STOU(IntToUInt, INT, UINT) DEFINE_SAFE_CONVERT_STOU(IntToULong, INT, ULONG) DEFINE_SAFE_CONVERT_STOU(IntToULongLong, INT, ULONGLONG) -DEFINE_SAFE_CONVERT_STOU(LongToUChar, LONG, UCHAR) +DEFINE_SAFE_CONVERT_STOU(LongToUChar, LONG, UINT8) DEFINE_SAFE_CONVERT_STOU(LongToUInt8, LONG, UINT8) DEFINE_SAFE_CONVERT_STOU(LongToUShort, LONG, USHORT) DEFINE_SAFE_CONVERT_STOU(LongToUInt, LONG, UINT) @@ -385,7 +374,7 @@ DEFINE_SAFE_CONVERT_STOU(LongToUIntPtr, LONG, UINT_PTR) DEFINE_SAFE_CONVERT_STOU(LongToULongPtr, LONG, ULONG_PTR) DEFINE_SAFE_CONVERT_STOU(LongToULongLong, LONG, ULONGLONG) -DEFINE_SAFE_CONVERT_STOU(IntPtrToUChar, INT_PTR, UCHAR) +DEFINE_SAFE_CONVERT_STOU(IntPtrToUChar, INT_PTR, UINT8) DEFINE_SAFE_CONVERT_STOU(IntPtrToUInt8, INT_PTR, UINT8) DEFINE_SAFE_CONVERT_STOU(IntPtrToUShort, INT_PTR, USHORT) DEFINE_SAFE_CONVERT_STOU(IntPtrToUInt, INT_PTR, UINT) @@ -393,7 +382,7 @@ DEFINE_SAFE_CONVERT_STOU(IntPtrToUIntPtr, INT_PTR, UINT_PTR) DEFINE_SAFE_CONVERT_STOU(IntPtrToULongPtr, INT_PTR, ULONG_PTR) DEFINE_SAFE_CONVERT_STOU(IntPtrToULongLong, INT_PTR, ULONGLONG) -DEFINE_SAFE_CONVERT_STOU(LongPtrToUChar, LONG_PTR, UCHAR) +DEFINE_SAFE_CONVERT_STOU(LongPtrToUChar, LONG_PTR, UINT8) DEFINE_SAFE_CONVERT_STOU(LongPtrToUInt8, LONG_PTR, UINT8) DEFINE_SAFE_CONVERT_STOU(LongPtrToUShort, LONG_PTR, USHORT) DEFINE_SAFE_CONVERT_STOU(LongPtrToUInt, LONG_PTR, UINT) @@ -402,8 +391,8 @@ DEFINE_SAFE_CONVERT_STOU(LongPtrToULongPtr, LONG_PTR, ULONG_PTR) DEFINE_SAFE_CONVERT_STOU(LongPtrToULongLong, LONG_PTR, ULONGLONG) #ifdef _CHAR_UNSIGNED -DEFINE_SAFE_CONVERT_STOU(ShortToChar, SHORT, UCHAR) -DEFINE_SAFE_CONVERT_STOU(LongPtrToChar, LONG_PTR, UCHAR) +DEFINE_SAFE_CONVERT_STOU(ShortToChar, SHORT, UINT8) +DEFINE_SAFE_CONVERT_STOU(LongPtrToChar, LONG_PTR, UINT8) #endif @@ -447,10 +436,8 @@ DEFINE_SAFE_CONVERT_STOS(LongLongToLong, LONGLONG, LONG) DEFINE_SAFE_CONVERT_STOS(LongLongToIntPtr, LONGLONG, INT_PTR) DEFINE_SAFE_CONVERT_STOS(LongLongToLongPtr, LONGLONG, LONG_PTR) -#ifndef _CHAR_UNSIGNED -DEFINE_SAFE_CONVERT_STOS(ShortToChar, SHORT, CHAR) -DEFINE_SAFE_CONVERT_STOS(LongPtrToChar, LONG_PTR, CHAR) -#endif +DEFINE_SAFE_CONVERT_STOS(ShortToChar, SHORT, _INTSAFE_CHAR) +DEFINE_SAFE_CONVERT_STOS(LongPtrToChar, LONG_PTR, _INTSAFE_CHAR) #ifdef _NTINTSAFE_H_INCLUDED_ @@ -789,6 +776,10 @@ #else #endif +#undef _INTSAFE_CHAR_MIN +#undef _INTSAFE_CHAR_MAX +#undef _INTSAFE_CHAR_ERROR + #endif // _NTINTSAFE_H_INCLUDED_ #endif // !_INTSAFE_H_INCLUDED_
9 years, 10 months
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
38
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Results per page:
10
25
50
100
200