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
October 2009
----- 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
26 participants
641 discussions
Start a n
N
ew thread
[cwittich] 43750: -sync netapi32 with wine 1.1.32
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Oct 25 20:24:08 2009 New Revision: 43750 URL:
http://svn.reactos.org/svn/reactos?rev=43750&view=rev
Log: -sync netapi32 with wine 1.1.32 Modified: trunk/reactos/dll/win32/netapi32/access.c trunk/reactos/dll/win32/netapi32/nbt.c trunk/reactos/dll/win32/netapi32/netapi32.c trunk/reactos/dll/win32/netapi32/netapi32.spec trunk/reactos/dll/win32/netapi32/share.c trunk/reactos/include/psdk/lmshare.h Modified: trunk/reactos/dll/win32/netapi32/access.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/access.…
============================================================================== --- trunk/reactos/dll/win32/netapi32/access.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/access.c [iso-8859-1] Sun Oct 25 20:24:08 2009 @@ -112,7 +112,7 @@ BOOL ret = FALSE; dwSize = LM20_UNLEN+1; - curr_user = HeapAlloc(GetProcessHeap(), 0, dwSize); + curr_user = HeapAlloc(GetProcessHeap(), 0, dwSize * sizeof(WCHAR)); if(!curr_user) { ERR("Failed to allocate memory for user name.\n"); @@ -431,7 +431,7 @@ return status; size = UNLEN + 1; - NetApiBufferAllocate(size, (LPVOID*)¤tuser); + NetApiBufferAllocate(size * sizeof(WCHAR), (LPVOID*)¤tuser); GetUserNameW(currentuser, &size); if (lstrcmpiW(username, currentuser) && NETAPI_FindUser(username)) @@ -640,7 +640,7 @@ /* get data */ dwSize = UNLEN + 1; - NetApiBufferAllocate(dwSize, (LPVOID *) &name); + NetApiBufferAllocate(dwSize * sizeof(WCHAR), (LPVOID *) &name); if (!GetUserNameW(name, &dwSize)) { NetApiBufferFree(name); @@ -728,6 +728,16 @@ { FIXME("(%s, %d, %p, %d, %p, %p, %p) stub!\n", debugstr_w(servername), level, bufptr, prefmaxlen, entriesread, totalentries, resume_handle); + return ERROR_ACCESS_DENIED; +} + +/************************************************************ + * NetGroupGetInfo (NETAPI32.@) + * + */ +NET_API_STATUS WINAPI NetGroupGetInfo(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE *bufptr) +{ + FIXME("(%s, %s, %d, %p) stub!\n", debugstr_w(servername), debugstr_w(groupname), level, bufptr); return ERROR_ACCESS_DENIED; } Modified: trunk/reactos/dll/win32/netapi32/nbt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/nbt.c?r…
============================================================================== --- trunk/reactos/dll/win32/netapi32/nbt.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/nbt.c [iso-8859-1] Sun Oct 25 20:24:08 2009 @@ -1478,8 +1478,7 @@ gBCastQueries = dword; size = sizeof(dword); if (RegQueryValueExW(hKey, BcastNameQueryTimeoutW, NULL, NULL, - (LPBYTE)&dword, &size) == ERROR_SUCCESS && dword >= MIN_QUERY_TIMEOUT - && dword <= MAX_QUERY_TIMEOUT) + (LPBYTE)&dword, &size) == ERROR_SUCCESS && dword >= MIN_QUERY_TIMEOUT) gBCastQueryTimeout = dword; size = sizeof(dword); if (RegQueryValueExW(hKey, NameSrvQueryCountW, NULL, NULL, @@ -1488,8 +1487,7 @@ gWINSQueries = dword; size = sizeof(dword); if (RegQueryValueExW(hKey, NameSrvQueryTimeoutW, NULL, NULL, - (LPBYTE)&dword, &size) == ERROR_SUCCESS && dword >= MIN_QUERY_TIMEOUT - && dword <= MAX_QUERY_TIMEOUT) + (LPBYTE)&dword, &size) == ERROR_SUCCESS && dword >= MIN_QUERY_TIMEOUT) gWINSQueryTimeout = dword; size = sizeof(gScopeID) - 1; if (RegQueryValueExW(hKey, ScopeIDW, NULL, NULL, (LPBYTE)gScopeID + 1, &size) Modified: trunk/reactos/dll/win32/netapi32/netapi32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
============================================================================== --- trunk/reactos/dll/win32/netapi32/netapi32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/netapi32.c [iso-8859-1] Sun Oct 25 20:24:08 2009 @@ -97,7 +97,7 @@ */ NET_API_STATUS WINAPI NetServerGetInfo(LMSTR servername, DWORD level, LPBYTE* bufptr) { - FIXME("stub (%p, %d, %p)\n", servername, level, bufptr); + FIXME("stub (%s, %d, %p)\n", debugstr_w(servername), level, bufptr); return ERROR_ACCESS_DENIED; } Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi3…
============================================================================== --- trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] Sun Oct 25 20:24:08 2009 @@ -88,7 +88,7 @@ @ stub NetErrorLogRead @ stub NetErrorLogWrite @ stub NetFileClose -@ stub NetFileEnum +@ stdcall NetFileEnum(wstr wstr wstr long ptr long ptr ptr ptr) @ stub NetFileGetInfo @ stub NetGetAnyDCName @ stdcall NetGetDCName(wstr wstr ptr) @@ -99,7 +99,7 @@ @ stub NetGroupDel @ stub NetGroupDelUser @ stdcall NetGroupEnum(wstr long ptr long ptr ptr ptr) -@ stub NetGroupGetInfo +@ stdcall NetGroupGetInfo(wstr wstr long ptr) @ stub NetGroupGetUsers @ stub NetGroupSetInfo @ stub NetGroupSetUsers Modified: trunk/reactos/dll/win32/netapi32/share.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/share.c…
============================================================================== --- trunk/reactos/dll/win32/netapi32/share.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/share.c [iso-8859-1] Sun Oct 25 20:24:08 2009 @@ -113,3 +113,16 @@ FIXME("Stub (%s %d %p %p)\n", debugstr_w(servername), level, buf, parm_err); return ERROR_NOT_SUPPORTED; } + +/************************************************************ + * NetFileEnum (NETAPI32.@) + */ +NET_API_STATUS WINAPI NetFileEnum( + LPWSTR ServerName, LPWSTR BasePath, LPWSTR UserName, + DWORD Level, LPBYTE* BufPtr, DWORD PrefMaxLen, + LPDWORD EntriesRead, LPDWORD TotalEntries, PDWORD_PTR ResumeHandle) +{ + FIXME("(%s, %s, %s, %u): stub\n", debugstr_w(ServerName), debugstr_w(BasePath), + debugstr_w(UserName), Level); + return ERROR_NOT_SUPPORTED; +} Modified: trunk/reactos/include/psdk/lmshare.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/lmshare.h?rev…
============================================================================== --- trunk/reactos/include/psdk/lmshare.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/lmshare.h [iso-8859-1] Sun Oct 25 20:24:08 2009 @@ -123,20 +123,24 @@ LPWSTR coni1_username; LPWSTR coni1_netname; } CONNECTION_INFO_1,*PCONNECTION_INFO_1,*LPCONNECTION_INFO_1; -NET_API_STATUS WINAPI NetShareAdd(LPWSTR,DWORD,PBYTE,PDWORD); -NET_API_STATUS WINAPI NetShareEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); -NET_API_STATUS WINAPI NetShareEnumSticky(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD resume_handle); -NET_API_STATUS WINAPI NetShareGetInfo(LPWSTR,LPWSTR,DWORD,PBYTE*); -NET_API_STATUS WINAPI NetShareSetInfo(LPWSTR,LPWSTR,DWORD,PBYTE,PDWORD); -NET_API_STATUS WINAPI NetShareDel(LPWSTR,LPWSTR,DWORD); -NET_API_STATUS WINAPI NetShareDelSticky(LPWSTR,LPWSTR,DWORD); -NET_API_STATUS WINAPI NetShareCheck(LPWSTR,LPWSTR,PDWORD); -NET_API_STATUS WINAPI NetSessionEnum(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); -NET_API_STATUS WINAPI NetSessionDel(LPWSTR,LPWSTR,LPWSTR); -NET_API_STATUS WINAPI NetSessionGetInfo(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*); + +NET_API_STATUS WINAPI NetShareAdd(LMSTR,DWORD,LPBYTE,LPDWORD); +NET_API_STATUS WINAPI NetShareCheck(LMSTR,LMSTR,LPDWORD); +NET_API_STATUS WINAPI NetShareDel(LMSTR,LMSTR,DWORD); +NET_API_STATUS WINAPI NetShareDelEx(LMSTR,DWORD,LPBYTE); +NET_API_STATUS WINAPI NetShareDelSticky(LMSTR,LMSTR,DWORD); +NET_API_STATUS WINAPI NetShareEnum(LMSTR,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD); +NET_API_STATUS WINAPI NetShareEnumSticky(LMSTR,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD); +NET_API_STATUS WINAPI NetShareGetInfo(LMSTR,LMSTR,DWORD,LPBYTE*); +NET_API_STATUS WINAPI NetShareSetInfo(LMSTR,LMSTR,DWORD,LPBYTE,LPDWORD); + +NET_API_STATUS WINAPI NetSessionDel(LMSTR,LMSTR,LMSTR); +NET_API_STATUS WINAPI NetSessionEnum(LMSTR,LMSTR,LMSTR,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD); +NET_API_STATUS WINAPI NetSessionGetInfo(LMSTR,LMSTR,LMSTR,DWORD,LPBYTE*); + NET_API_STATUS WINAPI NetConnectionEnum(LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); NET_API_STATUS WINAPI NetFileClose(LPWSTR,DWORD); -NET_API_STATUS WINAPI NetFileEnum(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); +NET_API_STATUS WINAPI NetFileEnum(LMSTR,LMSTR,LMSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD_PTR); NET_API_STATUS WINAPI NetFileGetInfo(LPWSTR,DWORD,DWORD,PBYTE*); #ifdef __cplusplus }
15 years, 2 months
1
0
0
0
[gschneider] 43749: [win32k] Stub out page to device space conversion, fixes three more gdi32 mapping winetests
by gschneider@svn.reactos.org
Author: gschneider Date: Sun Oct 25 19:49:08 2009 New Revision: 43749 URL:
http://svn.reactos.org/svn/reactos?rev=43749&view=rev
Log: [win32k] Stub out page to device space conversion, fixes three more gdi32 mapping winetests Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] Sun Oct 25 19:49:08 2009 @@ -202,12 +202,16 @@ MatrixS2XForm(XForm, &dc->dclevel.mxWorldToDevice); break; + case GdiPageSpaceToDeviceSpace: + DPRINT1("Page space -> device space is unsupported!\n"); + break; + case GdiDeviceSpaceToWorldSpace: MatrixS2XForm(XForm, &dc->dclevel.mxDeviceToWorld); break; default: - DPRINT1("Unknown or unsupported transform %lu\n", iXform); + DPRINT1("Unknown transform %lu\n", iXform); Status = STATUS_INVALID_PARAMETER; break; }
15 years, 2 months
1
0
0
0
[janderwald] 43748: - Make sure that no duplicate wdmaud.drv audio drivers exists as winmm currently not recognizes duplicate audio driver entries
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Oct 25 19:22:03 2009 New Revision: 43748 URL:
http://svn.reactos.org/svn/reactos?rev=43748&view=rev
Log: - Make sure that no duplicate wdmaud.drv audio drivers exists as winmm currently not recognizes duplicate audio driver entries Modified: trunk/reactos/dll/cpl/mmsys/mmsys.c Modified: trunk/reactos/dll/cpl/mmsys/mmsys.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/mmsys/mmsys.c?rev=…
============================================================================== --- trunk/reactos/dll/cpl/mmsys/mmsys.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/mmsys/mmsys.c [iso-8859-1] Sun Oct 25 19:22:03 2009 @@ -435,7 +435,26 @@ swprintf(WaveName, L"wave%u", Index); if (RegQueryValueExW(hKey, WaveName, 0, NULL, NULL, &BufferSize) != ERROR_MORE_DATA) { + /* Store new audio driver entry */ RegSetValueExW(hKey, WaveName, 0, REG_SZ, (LPBYTE)szBuffer, (wcslen(szBuffer)+1) * sizeof(WCHAR)); + break; + } + else + { + WCHAR Buffer[MAX_PATH]; + BufferSize = sizeof(Buffer); + + if (RegQueryValueExW(hKey, WaveName, 0, NULL, (LPBYTE)Buffer, &BufferSize) == ERROR_SUCCESS) + { + /* Make sure the buffer is zero terminated */ + Buffer[MAX_PATH-1] = L'\0'; + + if (!wcsicmp(Buffer, szBuffer)) + { + /* an entry already exists */ + break; + } + } } } RegCloseKey(hKey);
15 years, 2 months
1
0
0
0
[janderwald] 43747: - Partially sync winmm - Remove unused code - Fix function headers
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Oct 25 18:54:50 2009 New Revision: 43747 URL:
http://svn.reactos.org/svn/reactos?rev=43747&view=rev
Log: - Partially sync winmm - Remove unused code - Fix function headers Removed: trunk/reactos/dll/win32/winmm/message16.c trunk/reactos/dll/win32/winmm/mmsystem.c trunk/reactos/dll/win32/winmm/mmsystem.spec trunk/reactos/dll/win32/winmm/sound.spec trunk/reactos/dll/win32/winmm/sound16.c Modified: trunk/reactos/dll/win32/winmm/driver.c trunk/reactos/dll/win32/winmm/joystick.c trunk/reactos/dll/win32/winmm/lolvldrv.c trunk/reactos/dll/win32/winmm/mci.c trunk/reactos/dll/win32/winmm/mmio.c trunk/reactos/dll/win32/winmm/playsound.c trunk/reactos/dll/win32/winmm/time.c trunk/reactos/dll/win32/winmm/winemm.h trunk/reactos/dll/win32/winmm/winmm.c trunk/reactos/dll/win32/winmm/winmm.rbuild trunk/reactos/dll/win32/winmm/winmm.spec trunk/reactos/include/psdk/mmddk.h trunk/reactos/include/psdk/mmsystem.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/winmm/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/driver.c?r…
Modified: trunk/reactos/dll/win32/winmm/joystick.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/joystick.c…
Modified: trunk/reactos/dll/win32/winmm/lolvldrv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/lolvldrv.c…
Modified: trunk/reactos/dll/win32/winmm/mci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/mci.c?rev=…
Removed: trunk/reactos/dll/win32/winmm/message16.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/message16.…
Modified: trunk/reactos/dll/win32/winmm/mmio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/mmio.c?rev…
Removed: trunk/reactos/dll/win32/winmm/mmsystem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/mmsystem.c…
Removed: trunk/reactos/dll/win32/winmm/mmsystem.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/mmsystem.s…
Modified: trunk/reactos/dll/win32/winmm/playsound.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/playsound.…
Removed: trunk/reactos/dll/win32/winmm/sound.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/sound.spec…
Removed: trunk/reactos/dll/win32/winmm/sound16.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/sound16.c?…
Modified: trunk/reactos/dll/win32/winmm/time.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/time.c?rev…
Modified: trunk/reactos/dll/win32/winmm/winemm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/winemm.h?r…
Modified: trunk/reactos/dll/win32/winmm/winmm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/winmm.c?re…
Modified: trunk/reactos/dll/win32/winmm/winmm.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/winmm.rbui…
Modified: trunk/reactos/dll/win32/winmm/winmm.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winmm/winmm.spec…
Modified: trunk/reactos/include/psdk/mmddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/mmddk.h?rev=4…
Modified: trunk/reactos/include/psdk/mmsystem.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/mmsystem.h?re…
15 years, 2 months
1
0
0
0
[cwittich] 43746: partially sync kernel32 profile to wine 1.1.32
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Oct 25 18:28:35 2009 New Revision: 43746 URL:
http://svn.reactos.org/svn/reactos?rev=43746&view=rev
Log: partially sync kernel32 profile to wine 1.1.32 Modified: trunk/reactos/dll/win32/kernel32/misc/profile.c Modified: trunk/reactos/dll/win32/kernel32/misc/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/pr…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/profile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/profile.c [iso-8859-1] Sun Oct 25 18:28:35 2009 @@ -126,7 +126,6 @@ if (quote && (len >= (int)wcslen(value))) buffer[wcslen(buffer)-1] = '\0'; } - /* byte-swaps shorts in-place in a buffer. len is in WCHARs */ static __inline void PROFILE_ByteSwapShortBuffer(WCHAR * buffer, int len) { @@ -135,7 +134,6 @@ for (i = 0; i < len; i++) shortbuffer[i] = RtlUshortByteSwap(shortbuffer[i]); } - /* writes any necessary encoding marker to the file */ static __inline void PROFILE_WriteMarker(HANDLE hFile, ENCODING encoding) @@ -344,7 +342,6 @@ DPRINT("Error %ld reading file\n", GetLastError()); return NULL; } - len = dwFileSize; *pEncoding = PROFILE_DetectTextEncoding(buffer_base, &len); /* len is set to the number of bytes in the character marker. @@ -431,8 +428,7 @@ while (szLineStart < szLineEnd && PROFILE_isspaceW(*szLineStart)) szLineStart++; while ((szLineEnd > szLineStart) && PROFILE_isspaceW(szLineEnd[-1])) szLineEnd--; - if (szLineStart >= szLineEnd) - continue; + if (szLineStart >= szLineEnd) continue; if (*szLineStart == '[') /* section start */ { @@ -888,12 +884,11 @@ * If return_values is TRUE, also include the corresponding values. */ static INT PROFILE_GetSection( PROFILESECTION *section, LPCWSTR section_name, - LPWSTR buffer, UINT len, BOOL return_values, BOOL return_noequalkeys ) + LPWSTR buffer, UINT len, BOOL return_values ) { PROFILEKEY *key; - if (!buffer) - return 0; + if(!buffer) return 0; DPRINT("%S,%p,%u\n", section_name, buffer, len); @@ -907,7 +902,7 @@ if (len <= 2) break; if (!*key->name) continue; /* Skip empty lines */ if (IS_ENTRY_COMMENT(key->name)) continue; /* Skip comments */ - if (!return_noequalkeys && !return_values && !key->value) continue; /* Skip lines w.o. '=' */ + if (!return_values && !key->value) continue; /* Skip lines w.o. '=' */ PROFILE_CopyEntry( buffer, key->name, len - 1, 0 ); len -= wcslen(buffer) + 1; buffer += wcslen(buffer) + 1; @@ -1032,7 +1027,7 @@ /* no "else" here ! */ if (section && section[0]) { - INT ret = PROFILE_GetSection(CurProfile->section, section, buffer, len, FALSE, !win32); + INT ret = PROFILE_GetSection(CurProfile->section, section, buffer, len, FALSE); if (!buffer[0]) /* no luck -> def_val */ { PROFILE_CopyEntry(buffer, def_val, len, TRUE); @@ -1303,19 +1298,15 @@ filename ))) return def_val; - if (len+1 == sizeof(buffer)/sizeof(WCHAR)) - DPRINT1("result may be wrong!\n"); - /* FIXME: if entry can be found but it's empty, then Win16 is * supposed to return 0 instead of def_val ! Difficult/problematic * to implement (every other failure also returns zero buffer), * thus wait until testing framework avail for making sure nothing * else gets broken that way. */ - if (!buffer[0]) - return (UINT)def_val; + if (!buffer[0]) return (UINT)def_val; RtlInitUnicodeString( &bufferW, buffer ); - RtlUnicodeStringToInteger( &bufferW, 0, &result); // 10 + RtlUnicodeStringToInteger( &bufferW, 0, &result); return result; } @@ -1362,7 +1353,7 @@ RtlEnterCriticalSection( &PROFILE_CritSect ); if (PROFILE_Open( filename, FALSE )) - ret = PROFILE_GetSection(CurProfile->section, section, buffer, len, TRUE, FALSE); + ret = PROFILE_GetSection(CurProfile->section, section, buffer, len, TRUE); RtlLeaveCriticalSection( &PROFILE_CritSect ); @@ -1385,7 +1376,7 @@ return 0; } - bufferW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + bufferW = HeapAlloc(GetProcessHeap(), 0, len * 2 * sizeof(WCHAR)); if (!bufferW) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); @@ -1396,18 +1387,18 @@ if (filename) RtlCreateUnicodeStringFromAsciiz(&filenameW, filename); else filenameW.Buffer = NULL; - retW = GetPrivateProfileSectionW(sectionW.Buffer, bufferW, len, filenameW.Buffer); - if (len > 2) - { + retW = GetPrivateProfileSectionW(sectionW.Buffer, bufferW, len * 2, filenameW.Buffer); + if (retW) + { + if (retW == len * 2 - 2) retW++; /* overflow */ ret = WideCharToMultiByte(CP_ACP, 0, bufferW, retW + 1, buffer, len, NULL, NULL); - if (ret > 2) - ret -= 1; - else - { - ret = 0; + if (!ret || ret == len) /* overflow */ + { + ret = len - 2; buffer[len-2] = 0; buffer[len-1] = 0; } + else ret--; } else { @@ -1513,7 +1504,7 @@ { if (CurProfile) PROFILE_ReleaseFile(); /* always return FALSE in this case */ } - } + } else if (PROFILE_Open( filename, TRUE )) { if (!string) {/* delete the named section*/ ret = PROFILE_SetString(section,NULL,NULL, FALSE); @@ -1663,10 +1654,8 @@ INT retW, ret = 0; bufferW = buffer ? HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)) : NULL; - if (filename) - RtlCreateUnicodeStringFromAsciiz(&filenameW, filename); - else - filenameW.Buffer = NULL; + if (filename) RtlCreateUnicodeStringFromAsciiz(&filenameW, filename); + else filenameW.Buffer = NULL; retW = GetPrivateProfileSectionNamesW(bufferW, size, filenameW.Buffer); if (retW && size) @@ -1794,6 +1783,7 @@ } + /*********************************************************************** * WritePrivateProfileStructW (KERNEL32.@) */ @@ -1841,7 +1831,6 @@ return ret; } - /*********************************************************************** * WritePrivateProfileStructA (KERNEL32.@)
15 years, 2 months
1
0
0
0
[gschneider] 43745: [win32k] GetTransform: - Add support for more transforms - Fix return value for invalid/unsupported transform types - Fixes 10 gdi32 mapping winetests
by gschneider@svn.reactos.org
Author: gschneider Date: Sun Oct 25 18:23:19 2009 New Revision: 43745 URL:
http://svn.reactos.org/svn/reactos?rev=43745&view=rev
Log: [win32k] GetTransform: - Add support for more transforms - Fix return value for invalid/unsupported transform types - Fixes 10 gdi32 mapping winetests Modified: trunk/reactos/include/reactos/win32k/ntgdityp.h trunk/reactos/subsystems/win32/win32k/objects/coord.c Modified: trunk/reactos/include/reactos/win32k/ntgdityp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdityp.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntgdityp.h [iso-8859-1] Sun Oct 25 18:23:19 2009 @@ -163,6 +163,9 @@ } GDILOOBJTYPE, *PGDILOOBJTYPE; #define GdiWorldSpaceToPageSpace 0x203 +#define GdiWorldSpaceToDeviceSpace 0x204 +#define GdiPageSpaceToDeviceSpace 0x304 +#define GdiDeviceSpaceToWorldSpace 0x402 /* FIXME: Unknown */ typedef DWORD FULLSCREENCONTROL; Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] Sun Oct 25 18:23:19 2009 @@ -198,7 +198,17 @@ MatrixS2XForm(XForm, &dc->dclevel.mxWorldToPage); break; + case GdiWorldSpaceToDeviceSpace: + MatrixS2XForm(XForm, &dc->dclevel.mxWorldToDevice); + break; + + case GdiDeviceSpaceToWorldSpace: + MatrixS2XForm(XForm, &dc->dclevel.mxDeviceToWorld); + break; + default: + DPRINT1("Unknown or unsupported transform %lu\n", iXform); + Status = STATUS_INVALID_PARAMETER; break; } }
15 years, 2 months
1
0
0
0
[cwittich] 43744: -sync kernel32_winetest with wine 1.1.32
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Oct 25 17:21:40 2009 New Revision: 43744 URL:
http://svn.reactos.org/svn/reactos?rev=43744&view=rev
Log: -sync kernel32_winetest with wine 1.1.32 Modified: trunk/rostests/winetests/kernel32/actctx.c trunk/rostests/winetests/kernel32/atom.c trunk/rostests/winetests/kernel32/codepage.c trunk/rostests/winetests/kernel32/comm.c trunk/rostests/winetests/kernel32/console.c trunk/rostests/winetests/kernel32/debugger.c trunk/rostests/winetests/kernel32/file.c trunk/rostests/winetests/kernel32/heap.c trunk/rostests/winetests/kernel32/kernel32.rbuild trunk/rostests/winetests/kernel32/locale.c trunk/rostests/winetests/kernel32/module.c trunk/rostests/winetests/kernel32/process.c trunk/rostests/winetests/kernel32/profile.c trunk/rostests/winetests/kernel32/resource.c trunk/rostests/winetests/kernel32/thread.c Modified: trunk/rostests/winetests/kernel32/actctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/actctx…
============================================================================== --- trunk/rostests/winetests/kernel32/actctx.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/actctx.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -246,7 +246,8 @@ typedef struct { ULONG format_version; - ULONG assembly_cnt; + ULONG assembly_cnt_min; + ULONG assembly_cnt_max; ULONG root_manifest_type; LPWSTR root_manifest_path; ULONG root_config_type; @@ -255,23 +256,24 @@ } detailed_info_t; static const detailed_info_t detailed_info0 = { - 0, 0, 0, NULL, 0, 0, NULL + 0, 0, 0, 0, NULL, 0, 0, NULL }; static const detailed_info_t detailed_info1 = { - 1, 1, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, manifest_path, + 1, 1, 1, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, manifest_path, ACTIVATION_CONTEXT_PATH_TYPE_NONE, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, work_dir, }; static const detailed_info_t detailed_info1_child = { - 1, 1, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, app_manifest_path, + 1, 1, 1, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, app_manifest_path, ACTIVATION_CONTEXT_PATH_TYPE_NONE, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, app_dir, }; +/* On Vista+, there's an extra assembly for Microsoft.Windows.Common-Controls.Resources */ static const detailed_info_t detailed_info2 = { - 1, 2, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, manifest_path, + 1, 2, 3, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, manifest_path, ACTIVATION_CONTEXT_PATH_TYPE_NONE, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, work_dir, }; @@ -310,9 +312,10 @@ ok(detailed_info->ulFormatVersion == exinfo->format_version, "detailed_info->ulFormatVersion=%u, expected %u\n", detailed_info->ulFormatVersion, exinfo->format_version); - ok(detailed_info->ulAssemblyCount == exinfo->assembly_cnt, - "detailed_info->ulAssemblyCount=%u, expected %u\n", detailed_info->ulAssemblyCount, - exinfo->assembly_cnt); + ok(exinfo->assembly_cnt_min <= detailed_info->ulAssemblyCount && + detailed_info->ulAssemblyCount <= exinfo->assembly_cnt_max, + "detailed_info->ulAssemblyCount=%u, expected between %u and %u\n", detailed_info->ulAssemblyCount, + exinfo->assembly_cnt_min, exinfo->assembly_cnt_max); ok(detailed_info->ulRootManifestPathType == exinfo->root_manifest_type, "detailed_info->ulRootManifestPathType=%u, expected %u\n", detailed_info->ulRootManifestPathType, exinfo->root_manifest_type); @@ -1139,6 +1142,8 @@ char **argv; PROCESS_INFORMATION pi; STARTUPINFO si = { 0 }; + HANDLE file; + FILETIME now; GetModuleFileNameA(NULL, path, MAX_PATH); strcat(path, ".manifest"); @@ -1149,6 +1154,15 @@ si.cb = sizeof(si); winetest_get_mainargs( &argv ); + /* Vista+ seems to cache presence of .manifest files. Change last modified + date to defeat the cache */ + file = CreateFileA(argv[0], FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, 0, NULL); + if (file != INVALID_HANDLE_VALUE) { + GetSystemTimeAsFileTime(&now); + SetFileTime(file, NULL, NULL, &now); + CloseHandle(file); + } sprintf(cmdline, "\"%s\" %s manifest1", argv[0], argv[1]); ok(CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi) != 0, "Could not create process: %u\n", GetLastError()); Modified: trunk/rostests/winetests/kernel32/atom.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/atom.c…
============================================================================== --- trunk/rostests/winetests/kernel32/atom.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/atom.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -619,6 +619,10 @@ START_TEST(atom) { + /* Global atom table seems to be available to GUI apps only in + Win7, so let's turn this app into a GUI app */ + GetDesktopWindow(); + test_add_atom(); test_get_atom_name(); test_error_handling(); Modified: trunk/rostests/winetests/kernel32/codepage.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/codepa…
============================================================================== --- trunk/rostests/winetests/kernel32/codepage.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/codepage.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -131,8 +131,10 @@ SetLastError( 0xdeadbeef ); memset(buf,'x',sizeof(buf)); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -2002, buf, 10, NULL, NULL); - ok(len == 7 && !lstrcmpA(buf, "foobar") && GetLastError() == 0xdeadbeef, + ok(len == 7 && GetLastError() == 0xdeadbeef, "WideCharToMultiByte(-2002): len=%d error=%u\n", len, GetLastError()); + ok(!lstrcmpA(buf, "foobar"), + "WideCharToMultiByte(-2002): expected \"foobar\" got \"%s\"\n", buf); SetLastError( 0xdeadbeef ); memset(bufW,'x',sizeof(bufW)); Modified: trunk/rostests/winetests/kernel32/comm.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/comm.c…
============================================================================== --- trunk/rostests/winetests/kernel32/comm.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/comm.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -684,7 +684,7 @@ if (hcom == INVALID_HANDLE_VALUE) trace("Could not find a valid COM port. Skipping test_ReadTimeOut\n"); else - trace("Found Com port %s. Connected devices may disturbe results\n", port_name); + trace("Found Com port %s. Connected devices may disturb results\n", port_name); /*shown = TRUE; */ } if (hcom != INVALID_HANDLE_VALUE) @@ -692,9 +692,12 @@ BOOL ret; ret = ClearCommError(hcom, &errors, &comstat); - if (!ret && GetLastError() == ERROR_NOT_READY) + if (!ret && (GetLastError() == ERROR_NOT_READY || GetLastError() == ERROR_INVALID_HANDLE)) { - trace("%s doesn't respond, skipping the test\n", port_name); + if (GetLastError() == ERROR_NOT_READY) + trace("%s doesn't respond, skipping the test\n", port_name); + else + trace("%s is not a real serial port, skipping the test\n", port_name); CloseHandle(hcom); return INVALID_HANDLE_VALUE; } @@ -1643,6 +1646,16 @@ ok(ClearCommBreak(hcom), "ClearCommBreak failed\n"); } +static void test_stdio(void) +{ + DCB dcb; + + /* cygwin tries this to determine the stdin handle type */ + ok( !GetCommState( GetStdHandle(STD_INPUT_HANDLE), &dcb ), "GetCommState succeeded on stdin\n" ); + ok( GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_INVALID_FUNCTION, + "got error %u\n", GetLastError() ); +} + START_TEST(comm) { HANDLE hcom; @@ -1735,4 +1748,5 @@ test_WaitBreak(hcom); CloseHandle(hcom); } -} + test_stdio(); +} Modified: trunk/rostests/winetests/kernel32/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/consol…
============================================================================== --- trunk/rostests/winetests/kernel32/console.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/console.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -160,17 +160,7 @@ ok(GetLastError() == 0xdeadbeef, "GetLastError: expecting %u got %u\n", 0xdeadbeef, GetLastError()); - if (info.dwSize == 12) - { - win_skip("NULL CONSOLE_CURSOR_INFO will crash on win9x\n"); - return; - } - - SetLastError(0xdeadbeef); - ret = GetConsoleCursorInfo(hCon, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ACCESS, "GetLastError: expecting %u got %u\n", - ERROR_INVALID_ACCESS, GetLastError()); + /* Don't test NULL CONSOLE_CURSOR_INFO, it crashes on win9x and win7 */ } static void testEmptyWrite(HANDLE hCon) @@ -280,6 +270,7 @@ const int mylen = strlen(mytest); const int mylen2 = strchr(mytest, '\n') - mytest; int p; + WORD attr; ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, (mode | ENABLE_PROCESSED_OUTPUT) & ~ENABLE_WRAP_AT_EOL_OUTPUT), "clearing wrap at EOL & setting processed output\n"); @@ -294,6 +285,15 @@ { okCHAR(hCon, c, mytest[c.X - sbSize.X + 5], TEST_ATTRIB); } + + ReadConsoleOutputAttribute(hCon, &attr, 1, c, &len); + /* Win9x and WinMe change the attribs for '\n' up to 'f' */ + if (attr == TEST_ATTRIB) + { + win_skip("Win9x/WinMe don't respect ~ENABLE_WRAP_AT_EOL_OUTPUT\n"); + return; + } + okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); c.X = 0; c.Y++; @@ -391,6 +391,7 @@ const char* mytest = "abcd\nf\tg"; const int mylen = strlen(mytest); int p; + WORD attr; ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, mode | (ENABLE_WRAP_AT_EOL_OUTPUT|ENABLE_PROCESSED_OUTPUT)), "setting wrap at EOL & processed output\n"); @@ -406,7 +407,11 @@ okCHAR(hCon, c, mytest[p], TEST_ATTRIB); } c.X = sbSize.X - 9 + p; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); + ReadConsoleOutputAttribute(hCon, &attr, 1, c, &len); + if (attr == TEST_ATTRIB) + win_skip("Win9x/WinMe changes attribs for '\\n' up to 'f'\n"); + else + okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); c.X = 0; c.Y++; okCHAR(hCon, c, mytest[5], TEST_ATTRIB); for (c.X = 1; c.X < 8; c.X++) @@ -429,7 +434,11 @@ c.X = 0; c.Y++; okCHAR(hCon, c, mytest[3], TEST_ATTRIB); c.X++; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); + ReadConsoleOutputAttribute(hCon, &attr, 1, c, &len); + if (attr == TEST_ATTRIB) + win_skip("Win9x/WinMe changes attribs for '\\n' up to 'f'\n"); + else + okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); c.X = 0; c.Y++; okCHAR(hCon, c, mytest[5], TEST_ATTRIB); Modified: trunk/rostests/winetests/kernel32/debugger.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/debugg…
============================================================================== --- trunk/rostests/winetests/kernel32/debugger.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/debugger.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -34,6 +34,7 @@ static int myARGC; static char** myARGV; +static BOOL (WINAPI *pCheckRemoteDebuggerPresent)(HANDLE,PBOOL); static BOOL (WINAPI *pDebugActiveProcessStop)(DWORD); static BOOL (WINAPI *pDebugSetProcessKillOnExit)(BOOL); @@ -283,6 +284,7 @@ * detaching, then the debuggee gets a special exit code. */ ok(exit_code == STATUS_DEBUGGER_INACTIVE || + broken(exit_code == STATUS_ACCESS_VIOLATION) || /* Intermittent Vista+ */ broken(exit_code == 0xffffffff) || /* Win9x */ broken(exit_code == WAIT_ABANDONED), /* NT4, W2K */ "wrong exit code : %08x\n", exit_code); @@ -433,11 +435,42 @@ } } +static void test_RemoteDebugger(void) +{ + BOOL bret, present; + if(!pCheckRemoteDebuggerPresent) + { + win_skip("CheckRemoteDebuggerPresent is not available\n"); + return; + } + present = TRUE; + SetLastError(0xdeadbeef); + bret = pCheckRemoteDebuggerPresent(GetCurrentProcess(),&present); + ok(bret , "expected CheckRemoteDebuggerPresent to succeed\n"); + ok(0xdeadbeef == GetLastError(), + "expected error to be unchanged, got %d/%x\n",GetLastError(), GetLastError()); + + present = TRUE; + SetLastError(0xdeadbeef); + bret = pCheckRemoteDebuggerPresent(NULL,&present); + ok(!bret , "expected CheckRemoteDebuggerPresent to fail\n"); + ok(present, "expected parameter to be unchanged\n"); + ok(ERROR_INVALID_PARAMETER == GetLastError(), + "expected error ERROR_INVALID_PARAMETER, got %d/%x\n",GetLastError(), GetLastError()); + + SetLastError(0xdeadbeef); + bret = pCheckRemoteDebuggerPresent(GetCurrentProcess(),NULL); + ok(!bret , "expected CheckRemoteDebuggerPresent to fail\n"); + ok(ERROR_INVALID_PARAMETER == GetLastError(), + "expected error ERROR_INVALID_PARAMETER, got %d/%x\n",GetLastError(), GetLastError()); +} + START_TEST(debugger) { HMODULE hdll; hdll=GetModuleHandle("kernel32.dll"); + pCheckRemoteDebuggerPresent=(void*)GetProcAddress(hdll, "CheckRemoteDebuggerPresent"); pDebugActiveProcessStop=(void*)GetProcAddress(hdll, "DebugActiveProcessStop"); pDebugSetProcessKillOnExit=(void*)GetProcAddress(hdll, "DebugSetProcessKillOnExit"); @@ -453,5 +486,6 @@ else { test_ExitCode(); - } -} + test_RemoteDebugger(); + } +} Modified: trunk/rostests/winetests/kernel32/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/file.c…
============================================================================== --- trunk/rostests/winetests/kernel32/file.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/file.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -77,9 +77,9 @@ { HFILE filehandle; char buffer[10000]; - long bytes_read; - long bytes_wanted; - long i; + LONG bytes_read; + LONG bytes_wanted; + LONG i; BOOL ret; SetFileAttributesA(filename,FILE_ATTRIBUTE_NORMAL); /* be sure to remove stale files */ @@ -124,10 +124,10 @@ { HFILE filehandle; char buffer[10000]; - long bytes_read; - long bytes_written; - long blocks; - long i; + LONG bytes_read; + LONG bytes_written; + ULONG blocks; + LONG i; char *contents; HLOCAL memory_object; char checksum[1]; @@ -159,7 +159,7 @@ srand( (unsigned)time( NULL ) ); for (blocks = 0; blocks < 100; blocks++) { - for (i = 0; i < (long)sizeof( buffer ); i++) + for (i = 0; i < (LONG)sizeof( buffer ); i++) { buffer[i] = rand( ); checksum[0] = checksum[0] + buffer[i]; @@ -355,7 +355,7 @@ INT i; HFILE filehandle; char buffer[1]; - long bytes_read; + LONG bytes_read; BOOL ret; filehandle = _lcreat( filename, 0 ); @@ -432,7 +432,7 @@ { HFILE filehandle; char buffer[10000]; - long bytes_read; + UINT bytes_read; UINT bytes_wanted; UINT i; BOOL ret; @@ -477,10 +477,10 @@ { HFILE filehandle; char buffer[10000]; - long bytes_read; - long bytes_written; - long blocks; - long i; + UINT bytes_read; + UINT bytes_written; + UINT blocks; + INT i; char *contents; HLOCAL memory_object; char checksum[1]; @@ -512,7 +512,7 @@ srand( (unsigned)time( NULL ) ); for (blocks = 0; blocks < 100; blocks++) { - for (i = 0; i < (long)sizeof( buffer ); i++) + for (i = 0; i < (INT)sizeof( buffer ); i++) { buffer[i] = rand( ); checksum[0] = checksum[0] + buffer[i]; @@ -1860,10 +1860,11 @@ ok ( err == ERROR_NO_MORE_FILES, "GetLastError should return ERROR_NO_MORE_FILES\n"); } -static void test_FindFirstFileExA(void) +static void test_FindFirstFileExA(FINDEX_SEARCH_OPS search_ops) { WIN32_FIND_DATAA search_results; HANDLE handle; + BOOL ret; if (!pFindFirstFileExA) { @@ -1875,9 +1876,8 @@ _lclose(_lcreat("test-dir\\file1", 0)); _lclose(_lcreat("test-dir\\file2", 0)); CreateDirectoryA("test-dir\\dir1", NULL); - /* FindExLimitToDirectories is ignored */ SetLastError(0xdeadbeef); - handle = pFindFirstFileExA("test-dir\\*", FindExInfoStandard, &search_results, FindExSearchLimitToDirectories, NULL, 0); + handle = pFindFirstFileExA("test-dir\\*", FindExInfoStandard, &search_results, search_ops, NULL, 0); if (handle == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { win_skip("FindFirstFileExA is not implemented\n"); @@ -1894,7 +1894,18 @@ ok(FindNextFile(handle, &search_results), "Fetching third file failed\n"); ok(CHECK_NAME(search_results.cFileName), "Invalid third entry - %s\n", search_results.cFileName); - ok(FindNextFile(handle, &search_results), "Fetching fourth file failed\n"); + SetLastError(0xdeadbeef); + ret = FindNextFile(handle, &search_results); + if (!ret && (GetLastError() == ERROR_NO_MORE_FILES) && (search_ops == FindExSearchLimitToDirectories)) + { + skip("File system supports directory filtering\n"); + /* Results from the previous call are not cleared */ + ok(strcmp(search_results.cFileName, "dir1") == 0, "Third entry should be 'dir1' is %s\n", search_results.cFileName); + FindClose( handle ); + goto cleanup; + } + + ok(ret, "Fetching fourth file failed\n"); ok(CHECK_NAME(search_results.cFileName), "Invalid fourth entry - %s\n", search_results.cFileName); ok(FindNextFile(handle, &search_results), "Fetching fifth file failed\n"); @@ -1902,7 +1913,7 @@ #undef CHECK_NAME - ok(FindNextFile(handle, &search_results) == FALSE, "Fetching sixth file should failed\n"); + ok(FindNextFile(handle, &search_results) == FALSE, "Fetching sixth file should fail\n"); FindClose( handle ); @@ -2804,14 +2815,16 @@ test_MoveFileW(); test_FindFirstFileA(); test_FindNextFileA(); - test_FindFirstFileExA(); + test_FindFirstFileExA(0); + /* FindExLimitToDirectories is ignored if the file system doesn't support directory filtering */ + test_FindFirstFileExA(FindExSearchLimitToDirectories); test_LockFile(); test_file_sharing(); test_offset_in_overlapped_structure(); test_MapFile(); test_GetFileType(); test_async_file_errors(); - //test_read_write(); + test_read_write(); test_OpenFile(); test_overlapped(); test_RemoveDirectory(); Modified: trunk/rostests/winetests/kernel32/heap.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/heap.c…
============================================================================== --- trunk/rostests/winetests/kernel32/heap.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/heap.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -28,6 +28,8 @@ #define MAGIC_DEAD 0xdeadbeef +static BOOL (WINAPI *pHeapQueryInformation)(HANDLE, HEAP_INFORMATION_CLASS, PVOID, SIZE_T, PSIZE_T); + static SIZE_T resize_9x(SIZE_T size) { DWORD dwSizeAligned = (size + 3) & ~3; @@ -70,6 +72,7 @@ /* Heap*() functions */ mem = HeapAlloc(GetProcessHeap(), 0, 0); ok(mem != NULL, "memory not allocated for size 0\n"); + HeapFree(GetProcessHeap(), 0, mem); mem = HeapReAlloc(GetProcessHeap(), 0, NULL, 10); ok(mem == NULL, "memory allocated by HeapReAlloc\n"); @@ -246,6 +249,8 @@ GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); } + + GlobalFree(gbl); /* ####################################### */ /* Local*() functions */ @@ -410,6 +415,58 @@ } } +static void test_HeapQueryInformation(void) +{ + ULONG info; + SIZE_T size; + BOOL ret; + + pHeapQueryInformation = (void *)GetProcAddress(GetModuleHandle("kernel32.dll"), "HeapQueryInformation"); + if (!pHeapQueryInformation) + { + win_skip("HeapQueryInformation is not available\n"); + return; + } + + if (0) /* crashes under XP */ + { + size = 0; + ret = pHeapQueryInformation(0, + HeapCompatibilityInformation, + &info, sizeof(info), &size); + size = 0; + ret = pHeapQueryInformation(GetProcessHeap(), + HeapCompatibilityInformation, + NULL, sizeof(info), &size); + } + + size = 0; + SetLastError(0xdeadbeef); + ret = pHeapQueryInformation(GetProcessHeap(), + HeapCompatibilityInformation, + NULL, 0, &size); + ok(!ret, "HeapQueryInformation should fail\n"); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "expected ERROR_INSUFFICIENT_BUFFER got %u\n", GetLastError()); + ok(size == sizeof(ULONG), "expected 4, got %lu\n", size); + + SetLastError(0xdeadbeef); + ret = pHeapQueryInformation(GetProcessHeap(), + HeapCompatibilityInformation, + NULL, 0, NULL); + ok(!ret, "HeapQueryInformation should fail\n"); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "expected ERROR_INSUFFICIENT_BUFFER got %u\n", GetLastError()); + + info = 0xdeadbeaf; + SetLastError(0xdeadbeef); + ret = pHeapQueryInformation(GetProcessHeap(), + HeapCompatibilityInformation, + &info, sizeof(info) + 1, NULL); + ok(ret, "HeapQueryInformation error %u\n", GetLastError()); + ok(info == 0 || info == 1 || info == 2, "expected 0, 1 or 2, got %u\n", info); +} + START_TEST(heap) { test_heap(); @@ -422,4 +479,5 @@ test_sized_HeapReAlloc(1, (1 << 20)); test_sized_HeapReAlloc((1 << 20), (2 << 20)); test_sized_HeapReAlloc((1 << 20), 1); -} + test_HeapQueryInformation(); +} Modified: trunk/rostests/winetests/kernel32/kernel32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/kernel…
============================================================================== --- trunk/rostests/winetests/kernel32/kernel32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/kernel32.rbuild [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -6,6 +6,7 @@ <define name="__ROS_LONG64__" /> <library>ntdll</library> <library>kernel32</library> + <library>user32</library> <library>advapi32</library> <file>actctx.c</file> <file>alloc.c</file> Modified: trunk/rostests/winetests/kernel32/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/locale…
============================================================================== --- trunk/rostests/winetests/kernel32/locale.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/locale.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -125,7 +125,9 @@ ok(lcid == 0x409, "wrong LCID calculated - %d\n", lcid); - /* en, ar and zh use SUBLANG_NEUTRAL, but GetLocaleInfo assume SUBLANG_DEFAULT */ + /* en and ar use SUBLANG_NEUTRAL, but GetLocaleInfo assume SUBLANG_DEFAULT + Same is true for zh on pre-Vista, but on Vista and higher GetLocaleInfo + assumes SUBLANG_NEUTRAL for zh */ memset(expected, 0, COUNTOF(expected)); len = GetLocaleInfoA(MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), LOCALE_SLANGUAGE, expected, COUNTOF(expected)); SetLastError(0xdeadbeef); @@ -148,19 +150,6 @@ else win_skip("LANG_ARABIC not installed\n"); - memset(expected, 0, COUNTOF(expected)); - len = GetLocaleInfoA(MAKELANGID(LANG_CHINESE, SUBLANG_DEFAULT), LOCALE_SLANGUAGE, expected, COUNTOF(expected)); - if (len) { - SetLastError(0xdeadbeef); - memset(buffer, 0, COUNTOF(buffer)); - ret = GetLocaleInfoA(LANG_CHINESE, LOCALE_SLANGUAGE, buffer, COUNTOF(buffer)); - ok((ret == len) && !lstrcmpA(buffer, expected), - "got %d with '%s' (expected %d with '%s')\n", - ret, buffer, len, expected); - } - else - win_skip("LANG_CHINESE not installed\n"); - /* SUBLANG_DEFAULT is required for mlang.dll, but optional for GetLocaleInfo */ memset(expected, 0, COUNTOF(expected)); len = GetLocaleInfoA(MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), LOCALE_SLANGUAGE, expected, COUNTOF(expected)); @@ -192,6 +181,89 @@ ret = GetLocaleInfoA(lcid, NUO|LOCALE_SDAYNAME1, buffer, 10); ok(ret == 7, "Expected ret == 7, got %d, error %d\n", ret, GetLastError()); ok(!strcmp(buffer, "Monday"), "Expected 'Monday', got '%s'\n", buffer); +} + +static void test_GetLocaleInfoW(void) +{ + LCID lcid_en = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); + LCID lcid_ru = MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_NEUTRAL), SORT_DEFAULT); + WCHAR bufferW[80], buffer2W[80]; + CHAR bufferA[80]; + DWORD ret; + INT i; + + ret = GetLocaleInfoW(lcid_en, LOCALE_SMONTHNAME1, bufferW, COUNTOF(bufferW)); + if (!ret) { + win_skip("GetLocaleInfoW() isn't implemented\n"); + return; + } + ret = GetLocaleInfoW(lcid_ru, LOCALE_SMONTHNAME1, bufferW, COUNTOF(bufferW)); + if (!ret) { + win_skip("LANG_RUSSIAN locale data unavailable\n"); + return; + } + ret = GetLocaleInfoW(lcid_ru, LOCALE_SMONTHNAME1|LOCALE_RETURN_GENITIVE_NAMES, + bufferW, COUNTOF(bufferW)); + if (!ret) { + win_skip("LOCALE_RETURN_GENITIVE_NAMES isn't supported\n"); + return; + } + + /* LOCALE_RETURN_GENITIVE_NAMES isn't supported for GetLocaleInfoA */ + bufferA[0] = 'a'; + SetLastError(0xdeadbeef); + ret = GetLocaleInfoA(lcid_ru, LOCALE_SMONTHNAME1|LOCALE_RETURN_GENITIVE_NAMES, + bufferA, COUNTOF(bufferA)); + ok(ret == 0, "LOCALE_RETURN_GENITIVE_NAMES should fail with GetLocaleInfoA\n"); + ok(bufferA[0] == 'a', "Expected buffer to be untouched\n"); + ok(GetLastError() == ERROR_INVALID_FLAGS, + "Expected ERROR_INVALID_FLAGS, got %x\n", GetLastError()); + + bufferW[0] = 'a'; + SetLastError(0xdeadbeef); + ret = GetLocaleInfoW(lcid_ru, LOCALE_RETURN_GENITIVE_NAMES, + bufferW, COUNTOF(bufferW)); + ok(ret == 0, + "LOCALE_RETURN_GENITIVE_NAMES itself doesn't return anything, got %d\n", ret); + ok(bufferW[0] == 'a', "Expected buffer to be untouched\n"); + ok(GetLastError() == ERROR_INVALID_FLAGS, + "Expected ERROR_INVALID_FLAGS, got %x\n", GetLastError()); + + /* yes, test empty 13 month entry too */ + for (i = 0; i < 12; i++) { + bufferW[0] = 0; + ret = GetLocaleInfoW(lcid_ru, (LOCALE_SMONTHNAME1+i)|LOCALE_RETURN_GENITIVE_NAMES, + bufferW, COUNTOF(bufferW)); + ok(ret, "Expected non zero result\n"); + ok(ret == lstrlenW(bufferW)+1, "Expected actual length, got %d, length %d\n", + ret, lstrlenW(bufferW)); + buffer2W[0] = 0; + ret = GetLocaleInfoW(lcid_ru, LOCALE_SMONTHNAME1+i, + buffer2W, COUNTOF(buffer2W)); + ok(ret, "Expected non zero result\n"); + ok(ret == lstrlenW(buffer2W)+1, "Expected actual length, got %d, length %d\n", + ret, lstrlenW(buffer2W)); + + ok(lstrcmpW(bufferW, buffer2W) != 0, + "Expected genitive name to differ, got the same for month %d\n", i+1); + + /* for locale without genitive names nominative returned in both cases */ + bufferW[0] = 0; + ret = GetLocaleInfoW(lcid_en, (LOCALE_SMONTHNAME1+i)|LOCALE_RETURN_GENITIVE_NAMES, + bufferW, COUNTOF(bufferW)); + ok(ret, "Expected non zero result\n"); + ok(ret == lstrlenW(bufferW)+1, "Expected actual length, got %d, length %d\n", + ret, lstrlenW(bufferW)); + buffer2W[0] = 0; + ret = GetLocaleInfoW(lcid_en, LOCALE_SMONTHNAME1+i, + buffer2W, COUNTOF(buffer2W)); + ok(ret, "Expected non zero result\n"); + ok(ret == lstrlenW(buffer2W)+1, "Expected actual length, got %d, length %d\n", + ret, lstrlenW(buffer2W)); + + ok(lstrcmpW(bufferW, buffer2W) == 0, + "Expected same names, got different for month %d\n", i+1); + } } static void test_GetTimeFormatA(void) @@ -1300,15 +1372,8 @@ ok(ret == ret2, "lengths of sort keys must be equal\n"); ok(!lstrcmpA(buf, buf2), "sort keys must be equal\n"); - /* test LCMAP_SORTKEY | NORM_IGNORENONSPACE */ - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_SORTKEY | NORM_IGNORENONSPACE, - lower_case, -1, buf, sizeof(buf)); - ok(ret, "LCMapStringA must succeed\n"); - ret2 = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_SORTKEY, - lower_case, -1, buf2, sizeof(buf2)); - ok(ret2, "LCMapStringA must succeed\n"); - ok(ret == ret2, "lengths of sort keys must be equal\n"); - ok(!lstrcmpA(buf, buf2), "sort keys must be equal\n"); + /* Don't test LCMAP_SORTKEY | NORM_IGNORENONSPACE, produces different + results from plain LCMAP_SORTKEY on Vista */ /* test LCMAP_SORTKEY | NORM_IGNORESYMBOLS */ ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_SORTKEY | NORM_IGNORESYMBOLS, @@ -1361,9 +1426,14 @@ win_skip("LCMapStringW is not implemented\n"); return; } - ok(!ret, "LCMAP_LOWERCASE and LCMAP_UPPERCASE are mutually exclusive\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "unexpected error code %d\n", GetLastError()); + if (broken(ret)) + ok(lstrcmpW(buf, upper_case) == 0, "Expected upper case string\n"); + else + { + ok(!ret, "LCMAP_LOWERCASE and LCMAP_UPPERCASE are mutually exclusive\n"); + ok(GetLastError() == ERROR_INVALID_FLAGS, + "unexpected error code %d\n", GetLastError()); + } ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_HIRAGANA | LCMAP_KATAKANA, upper_case, -1, buf, sizeof(buf)/sizeof(WCHAR)); @@ -1459,15 +1529,8 @@ ok(ret == ret2, "lengths of sort keys must be equal\n"); ok(!lstrcmpA(p_buf, p_buf2), "sort keys must be equal\n"); - /* test LCMAP_SORTKEY | NORM_IGNORENONSPACE */ - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_SORTKEY | NORM_IGNORENONSPACE, - lower_case, -1, buf, sizeof(buf)); - ok(ret, "LCMapStringW must succeed\n"); - ret2 = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_SORTKEY, - lower_case, -1, buf2, sizeof(buf2)); - ok(ret2, "LCMapStringW must succeed\n"); - ok(ret == ret2, "lengths of sort keys must be equal\n"); - ok(!lstrcmpA(p_buf, p_buf2), "sort keys must be equal\n"); + /* Don't test LCMAP_SORTKEY | NORM_IGNORENONSPACE, produces different + results from plain LCMAP_SORTKEY on Vista */ /* test LCMAP_SORTKEY | NORM_IGNORESYMBOLS */ ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_SORTKEY | NORM_IGNORESYMBOLS, @@ -1631,7 +1694,8 @@ static void test_FoldStringA(void) { - int ret, i; + int ret, i, j; + BOOL is_special; char src[256], dst[256]; static const char digits_src[] = { 0xB9,0xB2,0xB3,'\0' }; static const char digits_dst[] = { '1','2','3','\0' }; @@ -1664,6 +1728,24 @@ 0x6f,0xa8,0x6f,0x3f,0x75,0x60,0x75,0xb4, 0x75,0x5e,0x75,0xa8,0x79,0xb4,0x79,0xa8,'\0' }; + static const char composite_dst_alt[] = + { + 0x53,0x3f,0x5a,0x3f,0x73,0x3f,0x7a,0x3f, + 0x59,0xa8,0x41,0x60,0x41,0xb4,0x41,0x5e, + 0x41,0x7e,0x41,0xa8,0x41,0xb0,0x43,0xb8, + 0x45,0x60,0x45,0xb4,0x45,0x5e,0x45,0xa8, + 0x49,0x60,0x49,0xb4,0x49,0x5e,0x49,0xa8, + 0x4e,0x7e,0x4f,0x60,0x4f,0xb4,0x4f,0x5e, + 0x4f,0x7e,0x4f,0xa8,0xd8,0x55,0x60,0x55, + 0xb4,0x55,0x5e,0x55,0xa8,0x59,0xb4,0x61, + 0x60,0x61,0xb4,0x61,0x5e,0x61,0x7e,0x61, + 0xa8,0x61,0xb0,0x63,0xb8,0x65,0x60,0x65, + 0xb4,0x65,0x5e,0x65,0xa8,0x69,0x60,0x69, + 0xb4,0x69,0x5e,0x69,0xa8,0x6e,0x7e,0x6f, + 0x60,0x6f,0xb4,0x6f,0x5e,0x6f,0x7e,0x6f, + 0xa8,0xf8,0x75,0x60,0x75,0xb4,0x75,0x5e, + 0x75,0xa8,0x79,0xb4,0x79,0xa8,'\0' + }; static const char ligatures_src[] = { 0x8C,0x9C,0xC6,0xDE,0xDF,0xE6,0xFE,'\0' @@ -1671,6 +1753,31 @@ static const char ligatures_dst[] = { 'O','E','o','e','A','E','T','H','s','s','a','e','t','h','\0' + }; + static const struct special + { + char src; + char dst[4]; + } foldczone_special[] = + { + /* src dst */ + { 0x85, { 0x2e, 0x2e, 0x2e, 0x00 } }, + { 0x98, { 0x20, 0x7e, 0x00 } }, + { 0x99, { 0x54, 0x4d, 0x00 } }, + { 0xa0, { 0x20, 0x00 } }, + { 0xa8, { 0x20, 0xa8, 0x00 } }, + { 0xaa, { 0x61, 0x00 } }, + { 0xaf, { 0x20, 0xaf, 0x00 } }, + { 0xb2, { 0x32, 0x00 } }, + { 0xb3, { 0x33, 0x00 } }, + { 0xb4, { 0x20, 0xb4, 0x00 } }, + { 0xb8, { 0x20, 0xb8, 0x00 } }, + { 0xb9, { 0x31, 0x00 } }, + { 0xba, { 0x6f, 0x00 } }, + { 0xbc, { 0x31, 0x2f, 0x34, 0x00 } }, + { 0xbd, { 0x31, 0x2f, 0x32, 0x00 } }, + { 0xbe, { 0x33, 0x2f, 0x34, 0x00 } }, + { 0x00 } }; if (!pFoldStringA) @@ -1724,9 +1831,19 @@ src[1] = '\0'; SetLastError(0); ret = pFoldStringA(MAP_EXPAND_LIGATURES, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - ok(dst[0] == src[0], - "MAP_EXPAND_LIGATURES: Expected '%s', got '%s'\n", src, dst); + if (ret == 3) + { + /* Vista */ + ok((i == 0xDC && lstrcmpA(dst, "UE") == 0) || + (i == 0xFC && lstrcmpA(dst, "ue") == 0), + "Got %s for %d\n", dst, i); + } + else + { + ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); + ok(dst[0] == src[0], + "MAP_EXPAND_LIGATURES: Expected '%s', got '%s'\n", src, dst); + } } } } @@ -1735,13 +1852,9 @@ SetLastError(0); ret = pFoldStringA(MAP_COMPOSITE, composite_src, -1, dst, 256); ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - todo_wine - { - /* Wine gets close, but doesn't produce quite the same result as native */ - ok(ret == 121, "Expected 121, got %d\n", ret); - ok(strcmp(dst, composite_dst) == 0, - "MAP_COMPOSITE: Expected '%s', got '%s'\n", composite_dst, dst); - } + ok(ret == 121 || ret == 119, "Expected 121 or 119, got %d\n", ret); + ok(strcmp(dst, composite_dst) == 0 || strcmp(dst, composite_dst_alt) == 0, + "MAP_COMPOSITE: Mismatch, got '%s'\n", dst); for (i = 1; i < 256; i++) { @@ -1765,10 +1878,27 @@ src[1] = '\0'; SetLastError(0); ret = pFoldStringA(MAP_FOLDCZONE, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - ok(src[0] == dst[0], - "MAP_FOLDCZONE: Expected 0x%02x, got 0x%02x\n", - (unsigned char)src[0], (unsigned char)dst[0]); + is_special = FALSE; + for (j = 0; foldczone_special[j].src != 0 && ! is_special; j++) + { + if (foldczone_special[j].src == src[0]) + { + ok(ret == 2 || ret == lstrlenA(foldczone_special[j].dst) + 1, + "Expected ret == 2 or %d, got %d, error %d\n", + lstrlenA(foldczone_special[j].dst) + 1, ret, GetLastError()); + ok(src[0] == dst[0] || lstrcmpA(foldczone_special[j].dst, dst) == 0, + "MAP_FOLDCZONE: string mismatch for 0x%02x\n", + (unsigned char)src[0]); + is_special = TRUE; + } + } + if (! is_special) + { + ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); + ok(src[0] == dst[0], + "MAP_FOLDCZONE: Expected 0x%02x, got 0x%02x\n", + (unsigned char)src[0], (unsigned char)dst[0]); + } } /* MAP_PRECOMPOSED */ @@ -1788,7 +1918,7 @@ static void test_FoldStringW(void) { int ret; - unsigned int i, j, failures; + unsigned int i, j; WCHAR src[256], dst[256], ch, prev_ch = 1; static const DWORD badFlags[] = { @@ -1814,6 +1944,7 @@ 0x0D66, /* Maylayalam */ 0x0E50, /* Thai */ 0x0ED0, /* Laos */ + 0x0F29, /* Tibet - 0 is out of sequence */ 0x2070, /* Superscript - 1, 2, 3 are out of sequence */ 0x2080, /* Subscript */ 0x245F, /* Circled - 0 is out of sequence */ @@ -1822,6 +1953,7 @@ 0x2775, /* Inverted circled - No 0 */ 0x277F, /* Patterned circled - No 0 */ 0x2789, /* Inverted Patterned circled - No 0 */ + 0x3020, /* Hangzhou */ 0xff10, /* Pliene chasse (?) */ 0xffff /* Terminator */ }; @@ -1831,125 +1963,36 @@ 0xB9, /* Superscript 1 */ 0xB2, /* Superscript 2 */ 0xB3, /* Superscript 3 */ + 0x0F33, /* Tibetan half zero */ 0x24EA, /* Circled 0 */ + 0x3007, /* Ideographic number zero */ '\0' /* Terminator */ }; /* Digits in digitRanges for which no representation is available */ static const WCHAR noDigitAvailable[] = { 0x0BE6, /* No Tamil 0 */ + 0x0F29, /* No Tibetan half zero (out of sequence) */ 0x2473, /* No Bracketed 0 */ 0x2487, /* No 0 Full stop */ 0x2775, /* No inverted circled 0 */ 0x277F, /* No patterned circled */ 0x2789, /* No inverted Patterned circled */ + 0x3020, /* No Hangzhou 0 */ '\0' /* Terminator */ }; - /* Compatibility conversion results */ - static const WCHAR compat_F900_FA2F[256+48] = - { - 0x8c48, 0x66f4, 0x8eca, 0x8cc8, 0x6ed1, 0x4e32, 0x53e5, 0x9f9c, - 0x9f9c, 0x5951, 0x91d1, 0x5587, 0x5948, 0x61f6, 0x7669, 0x7f85, - 0x863f, 0x87ba, 0x88f8, 0x908f, 0x6a02, 0x6d1b, 0x70d9, 0x73de, - 0x843d, 0x916a, 0x99f1, 0x4e82, 0x5375, 0x6b04, 0x721b, 0x862d, - 0x9e1e, 0x5d50, 0x6feb, 0x85cd, 0x8964, 0x62c9, 0x81d8, 0x881f, - 0x5eca, 0x6717, 0x6d6a, 0x72fc, 0x0000, 0x4f86, 0x51b7, 0x52de, - 0x64c4, 0x6ad3, 0x7210, 0x76e7, 0x8001, 0x8606, 0x865c, 0x8def, - 0x9732, 0x9b6f, 0x9dfa, 0x788c, 0x797f, 0x7da0, 0x83c9, 0x9304, - 0x9e7f, 0x8ad6, 0x58df, 0x5f04, 0x7c60, 0x807e, 0x7262, 0x78ca, - 0x8cc2, 0x96f7, 0x58d8, 0x5c62, 0x6a13, 0x6dda, 0x6f0f, 0x7d2f, - 0x7e37, 0x964b, 0x52d2, 0x808b, 0x51dc, 0x51cc, 0x7a1c, 0x7dbe, - 0x83f1, 0x9675, 0x8b80, 0x62cf, 0x6a02, 0x8afe, 0x4e39, 0x5be7, - 0x6012, 0x7387, 0x7570, 0x5317, 0x78fb, 0x4fbf, 0x5fa9, 0x4e0d, - 0x6ccc, 0x6578, 0x7d22, 0x53c3, 0x585e, 0x7701, 0x8449, 0x8aaa, - 0x6bba, 0x8fb0, 0x6c88, 0x62fe, 0x82e5, 0x63a0, 0x7565, 0x4eae, - 0x5169, 0x0000, 0x6881, 0x7ce7, 0x826f, 0x8ad2, 0x91cf, 0x52f5, - 0x5442, 0x5973, 0x5eec, 0x65c5, 0x6ffe, 0x792a, 0x95ad, 0x9a6a, - 0x9e97, 0x9ece, 0x529b, 0x66c6, 0x6b77, 0x8f62, 0x5e74, 0x6190, - 0x6200, 0x649a, 0x6f23, 0x7149, 0x7489, 0x0000, 0x7df4, 0x806f, - 0x8f26, 0x84ee, 0x9023, 0x934a, 0x5217, 0x52a3, 0x54bd, 0x70c8, - 0x88c2, 0x8aaa, 0x5ec9, 0x5ff5, 0x637b, 0x6bae, 0x7c3e, 0x7375, - 0x4ee4, 0x56f9, 0x5be7, 0x5dba, 0x601c, 0x73b2, 0x7469, 0x7f9a, - 0x8046, 0x9234, 0x96f6, 0x9748, 0x9818, 0x4f8b, 0x79ae, 0x91b4, - 0x96b8, 0x60e1, 0x4e86, 0x50da, 0x5bee, 0x5c3f, 0x6599, 0x6a02, - 0x71ce, 0x7642, 0x84fc, 0x907c, 0x9f8d, 0x6688, 0x962e, 0x5289, - 0x677b, 0x67f3, 0x6d41, 0x6e9c, 0x7409, 0x7559, 0x786b, 0x7d10, - 0x985e, 0x516d, 0x622e, 0x9678, 0x502b, 0x5d19, 0x6dea, 0x8f2a, - 0x5f8b, 0x6144, 0x6817, 0x7387, 0x9686, 0x5229, 0x540f, 0x5c65, - 0x6613, 0x674e, 0x68a8, 0x6ce5, 0x7406, 0x75e2, 0x7f79, 0x0000, - 0x88e1, 0x91cc, 0x96e2, 0x533f, 0x6eba, 0x541d, 0x71d0, 0x7498, - 0x85fa, 0x0000, 0x9c57, 0x9e9f, 0x6797, 0x6dcb, 0x81e8, 0x7acb, - 0x7b20, 0x7c92, 0x72c0, 0x7099, 0x8b58, 0x4ec0, 0x8336, 0x523a, - 0x5207, 0x5ea6, 0x62d3, 0x7cd6, 0x5b85, 0x6d1e, 0x66b4, 0x8f3b, - 0x884c, 0x964d, 0x898b, 0x5ed3, 0x0000, 0x0000, 0x0000, 0x0000, - 0x585a, 0x0000, 0x6674, 0x0000, 0x0000, 0x51de, 0x8c6c, 0x76ca, - 0x0000, 0x795e, 0x7965, 0x798f, 0x9756, 0x7cbe, 0x7fbd, 0x0000, - 0x0000, 0x0000, 0x8af8, 0x0000, 0x0000, 0x9038, 0x90fd, 0x0000, - 0x0000, 0x0000, 0x98ef, 0x98fc, 0x9928, 0x9db4, 0x0000, 0x0000 + static const WCHAR foldczone_src[] = + { + 'W', 'i', 'n', 'e', 0x0348, 0x0551, 0x1323, 0x280d, + 0xff37, 0xff49, 0xff4e, 0xff45, '\0' }; - static const WCHAR compat_FE30_FEF7[200] = - { - 0x2025, 0x2014, 0x2013, 0x005f, 0x005f, 0x0028, 0x0029, 0x007b, - 0x007d, 0x3014, 0x3015, 0x3010, 0x3011, 0x300a, 0x300b, 0x3008, - 0x3009, 0x300c, 0x300d, 0x300e, 0x300f, 0x0000, 0x0000, 0x0000, - 0x0000, 0x203e, 0x203e, 0x203e, 0x203e, 0x005f, 0x005f, 0x005f, - 0x002c, 0x3001, 0x002e, 0x0000, 0x003b, 0x003a, 0x003f, 0x0021, - 0x2014, 0x0028, 0x0029, 0x007b, 0x007d, 0x3014, 0x3015, 0x0023, - 0x0026, 0x002a, 0x002b, 0x002d, 0x003c, 0x003e, 0x003d, 0x0000, - 0x0000, 0x0024, 0x0025, 0x0040, 0x0000, 0x0000, 0x0000, 0x0000, - 0x064b, 0x064b, 0x064c, 0x0000, 0x064d, 0x0000, 0x064e, 0x064e, - 0x064f, 0x064f, 0x0650, 0x0650, 0x0651, 0x0651, 0x0652, 0x0652, - 0x0621, 0x0622, 0x0622, 0x0623, 0x0623, 0x0624, 0x0624, 0x0625, - 0x0625, 0x0626, 0x0626, 0x0626, 0x0626, 0x0627, 0x0627, 0x0628, - 0x0628, 0x0628, 0x0628, 0x0629, 0x0629, 0x062a, 0x062a, 0x062a, - 0x062a, 0x062b, 0x062b, 0x062b, 0x062b, 0x062c, 0x062c, 0x062c, - 0x062c, 0x062d, 0x062d, 0x062d, 0x062d, 0x062e, 0x062e, 0x062e, - 0x062e, 0x062f, 0x062f, 0x0630, 0x0630, 0x0631, 0x0631, 0x0632, - 0x0632, 0x0633, 0x0633, 0x0633, 0x0633, 0x0634, 0x0634, 0x0634, - 0x0634, 0x0635, 0x0635, 0x0635, 0x0635, 0x0636, 0x0636, 0x0636, - 0x0636, 0x0637, 0x0637, 0x0637, 0x0637, 0x0638, 0x0638, 0x0638, - 0x0638, 0x0639, 0x0639, 0x0639, 0x0639, 0x063a, 0x063a, 0x063a, - 0x063a, 0x0641, 0x0641, 0x0641, 0x0641, 0x0642, 0x0642, 0x0642, - 0x0642, 0x0643, 0x0643, 0x0643, 0x0643, 0x0644, 0x0644, 0x0644, - 0x0644, 0x0645, 0x0645, 0x0645, 0x0645, 0x0646, 0x0646, 0x0646, - 0x0646, 0x0647, 0x0647, 0x0647, 0x0647, 0x0648, 0x0648, 0x0649, - 0x0649, 0x064a, 0x064a, 0x064a, 0x064a, 0x0000, 0x0000, 0x0000 - }; - static const WCHAR compat_FF00_FFEF[240] = - { - 0x0000, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x0000, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x0000, - 0x0000, 0x3002, 0x300c, 0x300d, 0x3001, 0x30fb, 0x30f2, 0x30a1, - 0x30a3, 0x30a5, 0x30a7, 0x30a9, 0x30e3, 0x30e5, 0x30e7, 0x30c3, - 0x30fc, 0x30a2, 0x30a4, 0x30a6, 0x30a8, 0x30aa, 0x30ab, 0x30ad, - 0x30af, 0x30b1, 0x30b3, 0x30b5, 0x30b7, 0x30b9, 0x30bb, 0x30bd, - 0x30bf, 0x30c1, 0x30c4, 0x30c6, 0x30c8, 0x30ca, 0x30cb, 0x30cc, - 0x30cd, 0x30ce, 0x30cf, 0x30d2, 0x30d5, 0x30d8, 0x30db, 0x30de, - 0x30df, 0x30e0, 0x30e1, 0x30e2, 0x30e4, 0x30e6, 0x30e8, 0x30e9, - 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ef, 0x30f3, 0x309b, 0x309c, - 0x3164, 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, - 0x3138, 0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, - 0x3140, 0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, - 0x3148, 0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x0000, - 0x0000, 0x0000, 0x314f, 0x3150, 0x3151, 0x3152, 0x3153, 0x3154, - 0x0000, 0x0000, 0x3155, 0x3156, 0x3157, 0x3158, 0x3159, 0x315a, - 0x0000, 0x0000, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f, 0x3160, - 0x0000, 0x0000, 0x3161, 0x3162, 0x3163, 0x0000, 0x0000, 0x0000, - 0x00a2, 0x00a3, 0x00ac, 0x00af, 0x00a6, 0x00a5, 0x20a9, 0x0000, - 0x2502, 0x2190, 0x2191, 0x2192, 0x2193, 0x25a0, 0x25cb, 0x0000 + static const WCHAR foldczone_dst[] = + { + 'W','i','n','e',0x0348,0x0551,0x1323,0x280d,'W','i','n','e','\0' }; static const WCHAR ligatures_src[] = { + 'W', 'i', 'n', 'e', 0x03a6, 0x03b9, 0x03bd, 0x03b5, 0x00c6, 0x00de, 0x00df, 0x00e6, 0x00fe, 0x0132, 0x0133, 0x0152, 0x0153, 0x01c4, 0x01c5, 0x01c6, 0x01c7, 0x01c8, 0x01c9, 0x01ca, 0x01cb, 0x01cc, 0x01e2, 0x01e3, 0x01f1, 0x01f2, 0x01f3, 0x01fc, @@ -1958,6 +2001,7 @@ }; static const WCHAR ligatures_dst[] = { + 'W','i','n','e',0x03a6,0x03b9,0x03bd,0x03b5, 'A','E','T','H','s','s','a','e','t','h','I','J','i','j','O','E','o','e', 'D',0x017d,'D',0x017e,'d',0x017e,'L','J','L','j','l','j','N','J','N','j', 'n','j',0x0100,0x0112,0x0101,0x0113,'D','Z','D','z','d','z',0x00c1,0x00c9, @@ -2073,6 +2117,8 @@ ok((dst[0] == '0' + ch - digitRanges[j] && dst[1] == '\0') || broken( dst[0] == ch ) || /* old Windows versions don't have all mappings */ + (digitRanges[j] == 0x3020 && dst[0] == ch) || /* Hangzhou not present in all Windows versions */ + (digitRanges[j] == 0x0F29 && dst[0] == ch) || /* Tibetan not present in all Windows versions */ strchrW(noDigitAvailable, c), "MAP_FOLDDIGITS: ch %d Expected %d got %d\n", ch, '0' + digitRanges[j] - ch, dst[0]); @@ -2081,45 +2127,12 @@ } /* MAP_FOLDCZONE */ - for (ch = 1, failures = 0; ch <0xffff; ch++) - { - WCHAR expected = 0; - - if (ch >= 0xF900 && ch <= 0xFA2F) - expected = compat_F900_FA2F[ch - 0xF900]; - else if (ch >= 0xFE30 && ch <= 0xFEF7) - expected = compat_FE30_FEF7[ch - 0xFE30]; - else if (ch >= 0xFF00 && ch <= 0xFFEF) - expected = compat_FF00_FFEF[ch - 0xFF00]; - - if (!expected) - expected = ch; - - SetLastError(0); - src[0] = ch; - src[1] = dst[0] = '\0'; - ret = pFoldStringW(MAP_FOLDCZONE, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - ok(dst[0] == expected || - broken( dst[0] == ch ) || /* old Windows versions don't have all mappings */ - /* Wine (correctly) uses updated mappings for some Unicode 4.0 chars */ - /* FIXME: But they should be re-checked */ - ch == 0xf92c || ch == 0xf979 || ch == 0xf995 || ch == 0xf9e7 || - ch == 0xf9f1 || - (0xfa0c <= ch && ch <= 0xfa6a) || - (0xfa70 <= ch && ch <= 0xfad9) || - ch == 0xfe47 || ch == 0xfe48 || ch == 0xfe68 || - (0xfe70 <= ch && ch <= 0xfe7f) || - ch == 0xff3c || ch == 0xff5f || ch == 0xff60 || - ch == 0xff9e || ch == 0xff9f, - "MAP_FOLDCZONE: ch %d 0x%04x Expected 0x%04x got 0x%04x\n", - ch, ch, expected, dst[0]); - if (dst[0] != expected && ch < 0xf000 && ++failures > 50) - { - trace( "MAP_FOLDCZONE: Too many failures, giving up\n" ); - break; - } - } + SetLastError(0); + ret = pFoldStringW(MAP_FOLDCZONE, foldczone_src, -1, dst, 256); + ok(ret == sizeof(foldczone_dst)/sizeof(foldczone_dst[0]), + "Got %d, error %d\n", ret, GetLastError()); + ok(!memcmp(dst, foldczone_dst, sizeof(foldczone_dst)), + "MAP_FOLDCZONE: Expanded incorrectly\n"); /* MAP_EXPAND_LIGATURES */ SetLastError(0); @@ -2130,29 +2143,6 @@ "Got %d, error %d\n", ret, GetLastError()); ok(!memcmp(dst, ligatures_dst, sizeof(ligatures_dst)), "MAP_EXPAND_LIGATURES: Expanded incorrectly\n"); - for (i = 1, failures = 0; i <= 0xffff; i++) - { - if (!strchrW(ligatures_src, i)) - { - src[0] = i; - src[1] = '\0'; - SetLastError(0); - ret = pFoldStringW(MAP_EXPAND_LIGATURES, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - if (ret == 3) - ok(0, "MAP_EXPAND_LIGATURES: %04x : Expected %04x, got %04x %04x\n", - i, src[0], dst[0], dst[1]); - else - ok(dst[0] == src[0], - "MAP_EXPAND_LIGATURES: %04x : Expected %04x, got %04x\n", - i, src[0], dst[0]); - if (dst[0] != src[0] && ++failures > 50) - { - trace( "MAP_EXPAND_LIGATURES: Too many failures, giving up\n" ); - break; - } - } - } } /* FIXME: MAP_PRECOMPOSED : MAP_COMPOSITE */ @@ -2182,13 +2172,9 @@ MKLCID(LANG_ENGLISH, SUBLANG_DEFAULT, SORT_DEFAULT)); LCID_RES(MKLCID(LANG_JAPANESE, SUBLANG_NEUTRAL, SORT_DEFAULT), MKLCID(LANG_JAPANESE, SUBLANG_DEFAULT, SORT_DEFAULT)); - LCID_RES(MKLCID(LANG_JAPANESE, SUBLANG_NEUTRAL, SORT_JAPANESE_UNICODE), - MKLCID(LANG_JAPANESE, SUBLANG_DEFAULT, SORT_JAPANESE_UNICODE)); /* Invariant language is not treated specially */ TEST_LCID(LANG_INVARIANT, SUBLANG_DEFAULT, SORT_DEFAULT); - LCID_RES(MKLCID(LANG_INVARIANT, SUBLANG_NEUTRAL, SORT_DEFAULT), - MKLCID(LANG_INVARIANT, SUBLANG_DEFAULT, SORT_DEFAULT)); /* User/system default languages alone are not mapped */ TEST_LCIDLANG(LANG_SYSTEM_DEFAULT, SORT_JAPANESE_UNICODE); @@ -2568,6 +2554,7 @@ test_EnumTimeFormatsA(); test_EnumDateFormatsA(); test_GetLocaleInfoA(); + test_GetLocaleInfoW(); test_GetTimeFormatA(); test_GetDateFormatA(); test_GetDateFormatW(); Modified: trunk/rostests/winetests/kernel32/module.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/module…
============================================================================== --- trunk/rostests/winetests/kernel32/module.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/module.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -228,13 +228,18 @@ ok(hfile != INVALID_HANDLE_VALUE, "Expected a valid file handle\n"); /* NULL lpFileName */ - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA(NULL, NULL, 0); - ok(hmodule == 0, "Expected 0, got %p\n", hmodule); - ok(GetLastError() == ERROR_MOD_NOT_FOUND || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d\n", - GetLastError()); + if (is_unicode_enabled) + { + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA(NULL, NULL, 0); + ok(hmodule == 0, "Expected 0, got %p\n", hmodule); + ok(GetLastError() == ERROR_MOD_NOT_FOUND || + GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ + "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d\n", + GetLastError()); + } + else + win_skip("NULL filename crashes on WinMe\n"); /* empty lpFileName */ SetLastError(0xdeadbeef); @@ -281,13 +286,16 @@ } /* lpFileName does not matter */ - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA(NULL, hfile, 0); - ok(hmodule == 0, "Expected 0, got %p\n", hmodule); - ok(GetLastError() == ERROR_MOD_NOT_FOUND || - GetLastError() == ERROR_INVALID_PARAMETER, /* win2k3 */ - "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d\n", - GetLastError()); + if (is_unicode_enabled) + { + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA(NULL, hfile, 0); + ok(hmodule == 0, "Expected 0, got %p\n", hmodule); + ok(GetLastError() == ERROR_MOD_NOT_FOUND || + GetLastError() == ERROR_INVALID_PARAMETER, /* win2k3 */ + "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d\n", + GetLastError()); + } CloseHandle(hfile); Modified: trunk/rostests/winetests/kernel32/process.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/proces…
============================================================================== --- trunk/rostests/winetests/kernel32/process.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/process.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -35,8 +35,6 @@ #include "wine/test.h" -#define PROCESS_NAME_NATIVE 1 - #define expect_eq_d(expected, actual) \ do { \ int value = (actual); \ @@ -957,7 +955,8 @@ ok(!ret, "CreateProcessA unexpectedly succeeded\n"); ok(GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_PATH_NOT_FOUND /* NT4 */ || - GetLastError() == ERROR_BAD_PATHNAME /* Win98 */, + GetLastError() == ERROR_BAD_PATHNAME /* Win98 */ || + GetLastError() == ERROR_INVALID_PARAMETER /* Win7 */, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); strcpy(buffer, "doesnotexist.exe"); Modified: trunk/rostests/winetests/kernel32/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/profil…
============================================================================== --- trunk/rostests/winetests/kernel32/profile.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/profile.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -236,6 +236,14 @@ broken(GetLastError() == 0xdeadbeef), /* Win9x, WinME */ "expected ERROR_SUCCESS, got %d\n", GetLastError()); + /* Overflow*/ + ret=GetPrivateProfileSectionA("section1", buf, 24, testfile4); + for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1) + p[-1] = ','; + ok( ret == 22 && !strcmp( buf, "name1=val1,name2=,name"), "wrong section returned(%d): %s\n", + ret, buf); + ok( buf[ret] == 0 && buf[ret+1] == 0, "returned buffer not terminated with double-null\n" ); + DeleteFileA( testfile4 ); } @@ -844,8 +852,9 @@ ok( ret == 0, "expected return size 0, got %d\n", ret ); ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); todo_wine - ok( GetLastError() == 0xdeadbeef , "expected 0xdeadbeef, got %d\n", - GetLastError()); + ok( GetLastError() == 0xdeadbeef || + GetLastError() == ERROR_FILE_NOT_FOUND /* Win 7 */, + "expected 0xdeadbeef or ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); DeleteFileA(path); Modified: trunk/rostests/winetests/kernel32/resource.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/resour…
============================================================================== --- trunk/rostests/winetests/kernel32/resource.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/resource.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -125,16 +125,21 @@ CloseHandle( file ); res = BeginUpdateResource( filename, TRUE ); - ok( res != NULL, "BeginUpdateResource failed\n"); - - /* check if it's possible to open the file now */ - test = CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); - ok (test != INVALID_HANDLE_VALUE, "failed to create file\n"); - - CloseHandle( test ); - - r = EndUpdateResource( res, FALSE ); - ok( r == FALSE, "EndUpdateResource failed\n"); + if ( res != NULL || GetLastError() != ERROR_FILE_INVALID ) + { + ok( res != NULL, "BeginUpdateResource failed\n"); + + /* check if it's possible to open the file now */ + test = CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); + ok (test != INVALID_HANDLE_VALUE, "failed to create file\n"); + + CloseHandle( test ); + + r = EndUpdateResource( res, FALSE ); + ok( r == FALSE, "EndUpdateResource failed\n"); + } + else + skip( "Can't update resource in empty file\n" ); res = BeginUpdateResource( filename, FALSE ); ok( res == NULL, "BeginUpdateResource failed\n"); Modified: trunk/rostests/winetests/kernel32/thread.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/thread…
============================================================================== --- trunk/rostests/winetests/kernel32/thread.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/thread.c [iso-8859-1] Sun Oct 25 17:21:40 2009 @@ -698,8 +698,7 @@ return; } - todo_wine - ok(rc!=0,"error=%d\n",GetLastError()); + ok(rc!=0,"error=%d\n",GetLastError()); if (pOpenThread) { /* check that access control is obeyed */ @@ -709,7 +708,7 @@ ok(access_thread!=NULL,"OpenThread returned an invalid handle\n"); if (access_thread!=NULL) { obey_ar(pSetThreadPriorityBoost(access_thread,1)==0); - obey_ar(pGetThreadPriorityBoost(access_thread,&disabled)==0); + todo_wine obey_ar(pGetThreadPriorityBoost(access_thread,&disabled)==0); ok(CloseHandle(access_thread),"Error Closing thread handle\n"); } } @@ -723,10 +722,10 @@ rc = pSetThreadPriorityBoost(curthread,0); ok( rc != 0, "error=%d\n",GetLastError()); - rc=pGetThreadPriorityBoost(curthread,&disabled); - ok(rc!=0 && disabled==0, - "rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled); } + rc=pGetThreadPriorityBoost(curthread,&disabled); + ok(rc!=0 && disabled==0, + "rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled); } /* check the GetThreadTimes function */
15 years, 2 months
1
0
0
0
[cwittich] 43743: add define for LOCALE_RETURN_GENITIVE_NAMES
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Oct 25 17:20:45 2009 New Revision: 43743 URL:
http://svn.reactos.org/svn/reactos?rev=43743&view=rev
Log: add define for LOCALE_RETURN_GENITIVE_NAMES Modified: trunk/reactos/include/psdk/winnls.h Modified: trunk/reactos/include/psdk/winnls.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnls.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/winnls.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnls.h [iso-8859-1] Sun Oct 25 17:20:45 2009 @@ -18,6 +18,7 @@ #if (WINVER >= 0x0400) #define LOCALE_RETURN_NUMBER 0x20000000 #endif +#define LOCALE_RETURN_GENITIVE_NAMES 0x10000000 #define LOCALE_ILANGUAGE 1 #define LOCALE_SLANGUAGE 2 #define LOCALE_SENGLANGUAGE 0x1001
15 years, 2 months
1
0
0
0
[cwittich] 43742: better stub for RtlQueryHeapInformation (taken from wine)
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Oct 25 17:20:00 2009 New Revision: 43742 URL:
http://svn.reactos.org/svn/reactos?rev=43742&view=rev
Log: better stub for RtlQueryHeapInformation (taken from wine) Modified: trunk/reactos/lib/rtl/heap.c Modified: trunk/reactos/lib/rtl/heap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/heap.c?rev=43742&r…
============================================================================== --- trunk/reactos/lib/rtl/heap.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/heap.c [iso-8859-1] Sun Oct 25 17:20:00 2009 @@ -1952,8 +1952,30 @@ SIZE_T HeapInformationLength OPTIONAL, PSIZE_T ReturnLength OPTIONAL) { - UNIMPLEMENTED; - return 0; + HEAP *heapPtr; + + heapPtr = HEAP_GetPtr(HeapHandle); + if (!heapPtr) + { + RtlSetLastWin32ErrorAndNtStatusFromNtStatus( STATUS_INVALID_HANDLE ); + return FALSE; + } + + UNIMPLEMENTED + + switch (HeapInformationClass) + { + case HeapCompatibilityInformation: + if (ReturnLength) *ReturnLength = sizeof(ULONG); + + if (HeapInformationLength < sizeof(ULONG)) + return STATUS_BUFFER_TOO_SMALL; + + *(ULONG *)HeapInformation = 0; /* standard heap */ + return STATUS_SUCCESS; + default: + return STATUS_INVALID_INFO_CLASS; + } } DWORD
15 years, 2 months
1
0
0
0
[sginsberg] 43741: - DBGKD_WAIT_STATE_CHANGE64 is used in KD protocol 5, not number 6 that we use. Protocol 6 uses the DBGKD_ANY_WAIT_STATE_CHANGE structure which is sized according to the largest control-report structure (AMD64_DBGKD_CONTROL_REPORT currently), and is larger than DBGKD_WAIT_STATE_CHANGE64 on x86. This worked because our DBGKD_WAIT_STATE_CHANGE32/64 structures contained incorrect DBGKD_CONTROL_REPORT (used) and CONTEXT (unused) members that sized up the wait-state structure to pa
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sun Oct 25 16:56:38 2009 New Revision: 43741 URL:
http://svn.reactos.org/svn/reactos?rev=43741&view=rev
Log: - DBGKD_WAIT_STATE_CHANGE64 is used in KD protocol 5, not number 6 that we use. Protocol 6 uses the DBGKD_ANY_WAIT_STATE_CHANGE structure which is sized according to the largest control-report structure (AMD64_DBGKD_CONTROL_REPORT currently), and is larger than DBGKD_WAIT_STATE_CHANGE64 on x86. This worked because our DBGKD_WAIT_STATE_CHANGE32/64 structures contained incorrect DBGKD_CONTROL_REPORT (used) and CONTEXT (unused) members that sized up the wait-state structure to pass WinDbg's length verification! It actually becomes larger than DBGKD_ANY_WAIT_STATE_CHANGE, but WinDbg only seems bail out only if the structure is too small. Remove the incorrect members from the protocol 5 structures and change to DBGKD_ANY_WAIT_STATE_CHANGE everywhere. - Correct the value of SIZE_OF_FX_REGISTERS -- it was 4 times too low which resulted in KeContextToTrapFrame not properly clearing out the XMM register area. Correct the define and move it out from ke.h to x86's ketypes.h and use it in the FXSAVE format structure. Also remove the IOPM definitions from ke.h as they have been in the NDK for a while. - KD uses STRINGs, not ANSI_STRINGs -- they are the same thing, but let's be consistent. - ExceptionRecord32To64 should be available for both 32 and 64 bit builds (and it shouldn't be a forceinline). Get rid of CopyExceptionRecord and determine if we need to convert or can just copy it directly instead. - Use _WIN64 instead of _M_AMD64 when determining if we need to set the DBGKD_VERS_FLAG_PTR64 flag. - Don't check Nt/DbgQueryDebugFilterState for zero or nonzero -- it actually returns TRUE, FALSE or STATUS_INVALID_PARAMETER_1! Check for != TRUE in preparation for proper implementation of NtSet/QueryDebugFilterState. - Fix Format parameter of DbgPrintReturnControlC -- it is const like the other DbgPrint* routines. - Be consistent with the types used in debug.c and don't set local variables to zero if we are going to return to caller -- this doesn't seem to be required anymore. - Fix DebugService and DebugService2: DebugService should take a ULONG followed by 4 pointers and DebugService2 doesn't return anything. - Use ZwCurrentProcess() instead of -1 or 0xFFFFFFFF (which is incorrect for 64-bit) for the ProcessId parameter of DbgLoad/UnloadImageSymbols to clarify what is being passed. Don't use ZwCurrentProcess() in KeBugCheckWithTf for the pointer parameter of DbgUnLoadImageSymbols either. Use MAXULONG_PTR casted to PVOID instead. - Use better named and sized variables in KdpTrap for setting the "return register" in the caller's CONTEXT. - Correct and clarify the comment documenting under what conditions we pass user mode exceptions to the kernel debugger. Modified: trunk/reactos/include/ddk/winddk.h trunk/reactos/include/ndk/i386/ketypes.h trunk/reactos/include/ndk/rtlfuncs.h trunk/reactos/include/reactos/windbgkd.h trunk/reactos/lib/drivers/ip/network/routines.c trunk/reactos/lib/rtl/debug.c trunk/reactos/lib/rtl/powerpc/debug.c trunk/reactos/lib/rtl/rtlp.h trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/include/internal/kd64.h trunk/reactos/ntoskrnl/include/internal/ke.h trunk/reactos/ntoskrnl/kd/kdmain.c trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c trunk/reactos/ntoskrnl/kd64/arm/kdsup.c trunk/reactos/ntoskrnl/kd64/i386/kdsup.c trunk/reactos/ntoskrnl/kd64/kdapi.c trunk/reactos/ntoskrnl/kd64/kddata.c trunk/reactos/ntoskrnl/kd64/kdinit.c trunk/reactos/ntoskrnl/kd64/kdprint.c trunk/reactos/ntoskrnl/kd64/kdtrap.c trunk/reactos/ntoskrnl/ke/bug.c trunk/reactos/ntoskrnl/ke/i386/exp.c trunk/reactos/ntoskrnl/mm/sysldr.c Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=4…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -10359,23 +10359,23 @@ vDbgPrintEx( IN ULONG ComponentId, IN ULONG Level, - IN LPCSTR Format, + IN PCCH Format, IN va_list ap); ULONG NTAPI vDbgPrintExWithPrefix( - IN LPCSTR Prefix, + IN PCCH Prefix, IN ULONG ComponentId, IN ULONG Level, - IN LPCSTR Format, + IN PCCH Format, IN va_list ap); NTKERNELAPI ULONG DDKCDECLAPI DbgPrintReturnControlC( - IN PCH Format, + IN PCCH Format, IN ...); ULONG Modified: trunk/reactos/include/ndk/i386/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/i386/ketypes.h…
============================================================================== --- trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -130,6 +130,11 @@ (MapNumber == IO_ACCESS_MAP_NONE) ? \ (USHORT)(sizeof(KTSS)) : \ (USHORT)(FIELD_OFFSET(KTSS, IoMaps[MapNumber-1].IoMap)) + +// +// Size of the XMM register save area in the FXSAVE format +// +#define SIZE_OF_FX_REGISTERS 128 // // Static Kernel-Mode Address start (use MM_KSEG0_BASE for actual) @@ -333,7 +338,7 @@ ULONG DataSelector; ULONG MXCsr; ULONG MXCsrMask; - UCHAR RegisterArea[128]; + UCHAR RegisterArea[SIZE_OF_FX_REGISTERS]; UCHAR Reserved3[128]; UCHAR Reserved4[224]; UCHAR Align16Byte[8]; Modified: trunk/reactos/include/ndk/rtlfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
============================================================================== --- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -2669,7 +2669,7 @@ VOID NTAPI DbgLoadImageSymbols( - IN PANSI_STRING Name, + IN PSTRING Name, IN PVOID Base, IN ULONG_PTR ProcessId ); @@ -2677,7 +2677,7 @@ VOID NTAPI DbgUnLoadImageSymbols( - IN PANSI_STRING Name, + IN PSTRING Name, IN PVOID Base, IN ULONG_PTR ProcessId ); Modified: trunk/reactos/include/reactos/windbgkd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/windbgkd.h…
============================================================================== --- trunk/reactos/include/reactos/windbgkd.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/windbgkd.h [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -446,8 +446,6 @@ DBGKM_EXCEPTION32 Exception; DBGKD_LOAD_SYMBOLS32 LoadSymbols; } u; - DBGKD_CONTROL_REPORT ControlReport; - CONTEXT Context; } DBGKD_WAIT_STATE_CHANGE32, *PDBGKD_WAIT_STATE_CHANGE32; typedef struct _DBGKD_WAIT_STATE_CHANGE64 @@ -463,8 +461,6 @@ DBGKM_EXCEPTION64 Exception; DBGKD_LOAD_SYMBOLS64 LoadSymbols; } u; - DBGKD_CONTROL_REPORT ControlReport; - CONTEXT Context; } DBGKD_WAIT_STATE_CHANGE64, *PDBGKD_WAIT_STATE_CHANGE64; typedef struct _DBGKD_ANY_WAIT_STATE_CHANGE @@ -864,15 +860,10 @@ } u; } DBGKD_TRACE_IO, *PDBGKD_TRACE_IO; -#if defined(_M_AMD64) - -#define CopyExceptionRecord(Ex64From, Ex64To) \ - RtlCopyMemory(Ex64To, Ex64From, sizeof(EXCEPTION_RECORD64)) - -#else - -FORCEINLINE +static +__inline VOID +NTAPI ExceptionRecord32To64(IN PEXCEPTION_RECORD32 Ex32, OUT PEXCEPTION_RECORD64 Ex64) { @@ -890,9 +881,4 @@ } } -#define CopyExceptionRecord(Ex32From, Ex64To) \ - ExceptionRecord32To64((PEXCEPTION_RECORD32)Ex32From, Ex64To) - #endif - -#endif Modified: trunk/reactos/lib/drivers/ip/network/routines.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/rou…
============================================================================== --- trunk/reactos/lib/drivers/ip/network/routines.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/network/routines.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -94,8 +94,8 @@ UINT Length; PCHAR Buffer; - if (!(DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_PBUFFER | DPFLTR_MASK)) || - !(DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_TCP | DPFLTR_MASK))) { + if ((DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_PBUFFER | DPFLTR_MASK) != TRUE) || + (DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_TCP | DPFLTR_MASK) != TRUE)) { return; } @@ -139,8 +139,8 @@ PNDIS_BUFFER NextBuffer; PCHAR CharBuffer; - if (!(DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_PBUFFER | DPFLTR_MASK)) || - !(DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_IP | DPFLTR_MASK))) { + if ((DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_PBUFFER | DPFLTR_MASK) != TRUE) || + (DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_IP | DPFLTR_MASK) != TRUE)) { return; } Modified: trunk/reactos/lib/rtl/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=43741&…
============================================================================== --- trunk/reactos/lib/rtl/debug.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/debug.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -16,29 +16,29 @@ /* PRIVATE FUNCTIONS ********************************************************/ -NTSTATUS -NTAPI -DebugPrint(IN PANSI_STRING DebugString, +ULONG +NTAPI +DebugPrint(IN PSTRING DebugString, IN ULONG ComponentId, IN ULONG Level) { /* Call the Debug Service */ return DebugService(BREAKPOINT_PRINT, DebugString->Buffer, - DebugString->Length, + UlongToPtr(DebugString->Length), UlongToPtr(ComponentId), UlongToPtr(Level)); } -NTSTATUS -NTAPI -DebugPrompt(IN PCSTRING Output, +ULONG +NTAPI +DebugPrompt(IN PSTRING Output, IN PSTRING Input) { /* Call the Debug Service */ return DebugService(BREAKPOINT_PROMPT, Output->Buffer, - Output->Length, + UlongToPtr(Output->Length), Input->Buffer, UlongToPtr(Input->MaximumLength)); } @@ -47,22 +47,22 @@ ULONG NTAPI -vDbgPrintExWithPrefixInternal(IN LPCSTR Prefix, +vDbgPrintExWithPrefixInternal(IN PCCH Prefix, IN ULONG ComponentId, IN ULONG Level, - IN LPCSTR Format, + IN PCCH Format, IN va_list ap, IN BOOLEAN HandleBreakpoint) { NTSTATUS Status; - ANSI_STRING DebugString; + STRING DebugString; CHAR Buffer[512]; ULONG Length, PrefixLength; EXCEPTION_RECORD ExceptionRecord; /* Check if we should print it or not */ if ((ComponentId != MAXULONG) && - !(NtQueryDebugFilterState(ComponentId, Level))) + (NtQueryDebugFilterState(ComponentId, Level)) != TRUE) { /* This message is masked */ return STATUS_SUCCESS; @@ -90,7 +90,6 @@ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { /* Fail */ - Length = PrefixLength = 0; _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END; @@ -160,10 +159,10 @@ */ ULONG NTAPI -vDbgPrintExWithPrefix(IN LPCSTR Prefix, +vDbgPrintExWithPrefix(IN PCCH Prefix, IN ULONG ComponentId, IN ULONG Level, - IN LPCSTR Format, + IN PCCH Format, IN va_list ap) { /* Call the internal routine that also handles ControlC */ @@ -182,7 +181,7 @@ NTAPI vDbgPrintEx(IN ULONG ComponentId, IN ULONG Level, - IN LPCSTR Format, + IN PCCH Format, IN va_list ap) { /* Call the internal routine that also handles ControlC */ @@ -202,19 +201,19 @@ DbgPrint(PCCH Format, ...) { - ULONG n; + ULONG Status; va_list ap; /* Call the internal routine that also handles ControlC */ va_start(ap, Format); - n = vDbgPrintExWithPrefixInternal("", - -1, - DPFLTR_ERROR_LEVEL, - Format, - ap, - TRUE); + Status = vDbgPrintExWithPrefixInternal("", + -1, + DPFLTR_ERROR_LEVEL, + Format, + ap, + TRUE); va_end(ap); - return n; + return Status; } /* @@ -227,19 +226,19 @@ IN PCCH Format, ...) { - ULONG n; + ULONG Status; va_list ap; /* Call the internal routine that also handles ControlC */ va_start(ap, Format); - n = vDbgPrintExWithPrefixInternal("", - ComponentId, - Level, - Format, - ap, - TRUE); + Status = vDbgPrintExWithPrefixInternal("", + ComponentId, + Level, + Format, + ap, + TRUE); va_end(ap); - return n; + return Status; } /* @@ -247,22 +246,22 @@ */ ULONG __cdecl -DbgPrintReturnControlC(PCH Format, +DbgPrintReturnControlC(PCCH Format, ...) { - ULONG n; + ULONG Status; va_list ap; /* Call the internal routine that also handles ControlC */ va_start(ap, Format); - n = vDbgPrintExWithPrefixInternal("", - -1, - DPFLTR_ERROR_LEVEL, - Format, - ap, - FALSE); + Status = vDbgPrintExWithPrefixInternal("", + -1, + DPFLTR_ERROR_LEVEL, + Format, + ap, + FALSE); va_end(ap); - return n; + return Status; } /* @@ -274,7 +273,7 @@ OUT PCH Response, IN ULONG MaximumResponseLength) { - CSTRING Output; + STRING Output; STRING Input; /* Setup the input string */ @@ -283,7 +282,7 @@ /* Setup the output string */ Output.Length = strlen(Prompt); - Output.Buffer = Prompt; + Output.Buffer = (PCH)Prompt; /* Call the system service */ return DebugPrompt(&Output, &Input); @@ -319,7 +318,7 @@ */ VOID NTAPI -DbgLoadImageSymbols(IN PANSI_STRING Name, +DbgLoadImageSymbols(IN PSTRING Name, IN PVOID Base, IN ULONG_PTR ProcessId) { @@ -328,7 +327,7 @@ /* Setup the symbol data */ SymbolInfo.BaseOfDll = Base; - SymbolInfo.ProcessId = (ULONG)ProcessId; + SymbolInfo.ProcessId = ProcessId; /* Get NT Headers */ NtHeader = RtlImageNtHeader(Base); @@ -353,7 +352,7 @@ */ VOID NTAPI -DbgUnLoadImageSymbols(IN PANSI_STRING Name, +DbgUnLoadImageSymbols(IN PSTRING Name, IN PVOID Base, IN ULONG_PTR ProcessId) { @@ -361,7 +360,7 @@ /* Setup the symbol data */ SymbolInfo.BaseOfDll = Base; - SymbolInfo.ProcessId = (ULONG)ProcessId; + SymbolInfo.ProcessId = ProcessId; SymbolInfo.CheckSum = SymbolInfo.SizeOfImage = 0; /* Load the symbols */ Modified: trunk/reactos/lib/rtl/powerpc/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/powerpc/debug.c?re…
============================================================================== --- trunk/reactos/lib/rtl/powerpc/debug.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/powerpc/debug.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -9,12 +9,12 @@ VOID DbgBreakPointWithStatus(ULONG Status) { __asm__("ti 31,0,0"); } -NTSTATUS +ULONG NTAPI DebugService -(ULONG Service, const void *Buffer, ULONG Length, PVOID Arg1, PVOID Arg2) +(ULONG Service, PVOID Argument1, PVOID Argument1, PVOID Argument3, PVOID Argument4) { - NTSTATUS Result; + ULONG Result; __asm__("mr 0,%1\n\t" "mr 3,%2\n\t" "mr 4,%3\n\t" @@ -26,17 +26,16 @@ "=r" (Result) : "r" (0x10000), "r" (Service), - "r" (Buffer), - "r" (Length), - "r" (Arg1), - "r" (Arg2) ); + "r" (Argument1), + "r" (Argument2), + "r" (Argument3), + "r" (Argument4) ); return Result; } -NTSTATUS +VOID NTAPI DebugService2 (PVOID Arg1, PVOID Arg2, ULONG Service) { - return STATUS_SUCCESS; } Modified: trunk/reactos/lib/rtl/rtlp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/rtlp.h?rev=43741&r…
============================================================================== --- trunk/reactos/lib/rtl/rtlp.h [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/rtlp.h [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -145,20 +145,26 @@ NTAPI RtlpCaptureContext(OUT PCONTEXT ContextRecord); -/* i386/debug.S */ -NTSTATUS +// +// Debug Service calls +// +ULONG NTAPI -DebugService(IN ULONG Service, - IN const void* Buffer, - IN ULONG Length, - IN PVOID Argument1, - IN PVOID Argument2); +DebugService( + IN ULONG Service, + IN PVOID Argument1, + IN PVOID Argument2, + IN PVOID Argument3, + IN PVOID Argument4 +); -NTSTATUS +VOID NTAPI -DebugService2(IN PVOID Argument1, - IN PVOID Argument2, - IN ULONG Service); +DebugService2( + IN PVOID Argument1, + IN PVOID Argument2, + IN ULONG Service +); /* Tags for the String Allocators */ #define TAG_USTR 'RTSU' Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=437…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -734,7 +734,7 @@ PLDR_DATA_TABLE_ENTRY LdrEntry; BOOLEAN OverFlow = FALSE; CHAR NameBuffer[256]; - ANSI_STRING SymbolString; + STRING SymbolString; /* Loop the driver list */ NextEntry = LoaderBlock->LoadOrderListHead.Flink; @@ -799,13 +799,13 @@ /* Check if the buffer was ok */ if (!OverFlow) { - /* Initialize the ANSI_STRING for the debugger */ + /* Initialize the STRING for the debugger */ RtlInitString(&SymbolString, NameBuffer); /* Load the symbols */ DbgLoadImageSymbols(&SymbolString, LdrEntry->DllBase, - 0xFFFFFFFF); + (ULONG_PTR)ZwCurrentProcess()); } } Modified: trunk/reactos/ntoskrnl/include/internal/kd64.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/kd64.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/kd64.h [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -217,7 +217,7 @@ NTAPI KdpSymbol( IN PSTRING DllPath, - IN PKD_SYMBOLS_INFO DllBase, + IN PKD_SYMBOLS_INFO SymbolInfo, IN BOOLEAN Unload, IN KPROCESSOR_MODE PreviousMode, IN PCONTEXT ContextRecord, @@ -322,7 +322,7 @@ VOID NTAPI KdpSetContextState( - IN PDBGKD_WAIT_STATE_CHANGE64 WaitStateChange, + IN PDBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange, IN PCONTEXT Context ); Modified: trunk/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -180,16 +180,6 @@ /* One of the Reserved Wait Blocks, this one is for the Thread's Timer */ #define TIMER_WAIT_BLOCK 0x3L -/* IOPM Definitions */ -#define IO_ACCESS_MAP_NONE 0 -#define IOPM_OFFSET FIELD_OFFSET(KTSS, IoMaps[0].IoMap) -#define KiComputeIopmOffset(MapNumber) \ - (MapNumber == IO_ACCESS_MAP_NONE) ? \ - (USHORT)(sizeof(KTSS)) : \ - (USHORT)(FIELD_OFFSET(KTSS, IoMaps[MapNumber-1].IoMap)) - -#define SIZE_OF_FX_REGISTERS 32 - /* INTERNAL KERNEL FUNCTIONS ************************************************/ VOID Modified: trunk/reactos/ntoskrnl/kd/kdmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdmain.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -368,13 +368,13 @@ if (ComponentId == KdComponentTable[i].ComponentId) { /* Check if mask are matching */ - return (Level & KdComponentTable[i].Level) != 0; + return (Level & KdComponentTable[i].Level) ? TRUE : FALSE; } } } /* Entry not found in the table, use default mask */ - return (Level & Kd_DEFAULT_MASK) != 0; + return (Level & Kd_DEFAULT_MASK) ? TRUE : FALSE; } NTSTATUS Modified: trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/amd64/kdsup.…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -28,7 +28,7 @@ VOID NTAPI -KdpSetContextState(IN PDBGKD_WAIT_STATE_CHANGE64 WaitStateChange, +KdpSetContextState(IN PDBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange, IN PCONTEXT Context) { UNIMPLEMENTED; Modified: trunk/reactos/ntoskrnl/kd64/arm/kdsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/arm/kdsup.c?…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/arm/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/arm/kdsup.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -28,7 +28,7 @@ VOID NTAPI -KdpSetContextState(IN PDBGKD_WAIT_STATE_CHANGE64 WaitStateChange, +KdpSetContextState(IN PDBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange, IN PCONTEXT Context) { UNIMPLEMENTED; Modified: trunk/reactos/ntoskrnl/kd64/i386/kdsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/i386/kdsup.c…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/i386/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/i386/kdsup.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -69,7 +69,7 @@ VOID NTAPI -KdpSetContextState(IN PDBGKD_WAIT_STATE_CHANGE64 WaitStateChange, +KdpSetContextState(IN PDBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange, IN PCONTEXT Context) { PKPRCB Prcb = KeGetCurrentPrcb(); Modified: trunk/reactos/ntoskrnl/kd64/kdapi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdapi.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdapi.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdapi.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -267,7 +267,7 @@ NTAPI KdpSetCommonState(IN ULONG NewState, IN PCONTEXT Context, - IN PDBGKD_WAIT_STATE_CHANGE64 WaitStateChange) + IN PDBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange) { USHORT InstructionCount; BOOLEAN HadBreakpoints; @@ -280,9 +280,9 @@ WaitStateChange->Thread = (ULONG64)(LONG_PTR)KeGetCurrentThread(); WaitStateChange->ProgramCounter = (ULONG64)(LONG_PTR)KeGetContextPc(Context); - /* Zero out the Control Report */ - RtlZeroMemory(&WaitStateChange->ControlReport, - sizeof(DBGKD_CONTROL_REPORT)); + /* Zero out the entire Control Report */ + RtlZeroMemory(&WaitStateChange->AnyControlReport, + sizeof(DBGKD_ANY_CONTROL_REPORT)); /* Now copy the instruction stream and set the count */ RtlCopyMemory(&WaitStateChange->ControlReport.InstructionStream[0], @@ -1296,7 +1296,7 @@ { PSTRING ExtraData; STRING Data, Header; - DBGKD_WAIT_STATE_CHANGE64 WaitStateChange; + DBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange; KCONTINUE_STATUS Status; /* Start wait loop */ @@ -1335,7 +1335,7 @@ } /* Setup the header */ - Header.Length = sizeof(DBGKD_WAIT_STATE_CHANGE64); + Header.Length = sizeof(DBGKD_ANY_WAIT_STATE_CHANGE); Header.Buffer = (PCHAR)&WaitStateChange; /* Send the packet */ @@ -1356,7 +1356,7 @@ IN BOOLEAN SecondChanceException) { STRING Header, Data; - DBGKD_WAIT_STATE_CHANGE64 WaitStateChange; + DBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange; KCONTINUE_STATUS Status; /* Start report loop */ @@ -1366,15 +1366,21 @@ KdpSetCommonState(DbgKdExceptionStateChange, Context, &WaitStateChange); /* Copy the Exception Record and set First Chance flag */ - CopyExceptionRecord(ExceptionRecord, - &WaitStateChange.u.Exception.ExceptionRecord); +#if !defined(_WIN64) + ExceptionRecord32To64((PEXCEPTION_RECORD32)ExceptionRecord, + &WaitStateChange.u.Exception.ExceptionRecord); +#else + RtlCopyMemory(&WaitStateChange.u.Exception.ExceptionRecord, + ExceptionRecord, + sizeof(EXCEPTION_RECORD)); +#endif WaitStateChange.u.Exception.FirstChance = !SecondChanceException; /* Now finish creating the structure */ KdpSetContextState(&WaitStateChange, Context); /* Setup the actual header to send to KD */ - Header.Length = sizeof(DBGKD_WAIT_STATE_CHANGE64); + Header.Length = sizeof(DBGKD_ANY_WAIT_STATE_CHANGE); Header.Buffer = (PCHAR)&WaitStateChange; /* Setup the trace data */ @@ -1828,20 +1834,26 @@ return KdDebuggerNotPresent; } +/* + * @unimplemented + */ NTSTATUS NTAPI -NtQueryDebugFilterState(ULONG ComponentId, - ULONG Level) +NtQueryDebugFilterState(IN ULONG ComponentId, + IN ULONG Level) { /* HACK */ return STATUS_SUCCESS; } +/* + * @unimplemented + */ NTSTATUS NTAPI -NtSetDebugFilterState(ULONG ComponentId, - ULONG Level, - BOOLEAN State) +NtSetDebugFilterState(IN ULONG ComponentId, + IN ULONG Level, + IN BOOLEAN State) { /* HACK */ return STATUS_SUCCESS; Modified: trunk/reactos/ntoskrnl/kd64/kddata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kddata.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kddata.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kddata.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -360,7 +360,7 @@ 0, DBGKD_64BIT_PROTOCOL_VERSION2, CURRENT_KD_SECONDARY_VERSION, -#if defined(_M_AMD64) +#if defined(_WIN64) DBGKD_VERS_FLAG_DATA | DBGKD_VERS_FLAG_PTR64, #else DBGKD_VERS_FLAG_DATA, Modified: trunk/reactos/ntoskrnl/kd64/kdinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdinit.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdinit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdinit.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -75,7 +75,7 @@ { BOOLEAN EnableKd, DisableKdAfterInit = FALSE, BlockEnable; LPSTR CommandLine, DebugLine, DebugOptionStart, DebugOptionEnd; - ANSI_STRING ImageName; + STRING ImageName; PLDR_DATA_TABLE_ENTRY LdrEntry; PLIST_ENTRY NextEntry; ULONG i, j, Length, DebugOptionLength; @@ -350,8 +350,10 @@ NameBuffer[j] = ANSI_NULL; /* Load symbols for image */ - RtlInitAnsiString(&ImageName, NameBuffer); - DbgLoadImageSymbols(&ImageName, LdrEntry->DllBase, -1); + RtlInitString(&ImageName, NameBuffer); + DbgLoadImageSymbols(&ImageName, + LdrEntry->DllBase, + (ULONG_PTR)ZwCurrentProcess()); /* Go to the next entry */ NextEntry = NextEntry->Flink; Modified: trunk/reactos/ntoskrnl/kd64/kdprint.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdprint.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdprint.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdprint.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -138,7 +138,7 @@ VOID NTAPI KdpSymbol(IN PSTRING DllPath, - IN PKD_SYMBOLS_INFO DllBase, + IN PKD_SYMBOLS_INFO SymbolInfo, IN BOOLEAN Unload, IN KPROCESSOR_MODE PreviousMode, IN PCONTEXT ContextRecord, @@ -163,7 +163,7 @@ /* Report the new state */ Status = KdpReportLoadSymbolsStateChange(DllPath, - DllBase, + SymbolInfo, Unload, &Prcb->ProcessorState. ContextFrame); @@ -243,7 +243,7 @@ { NTSTATUS ReturnStatus; BOOLEAN Entered; - ANSI_STRING AnsiString; + STRING OutputString; /* Assume failure */ *Status = FALSE; @@ -268,12 +268,12 @@ /* FIXME: Support user-mode */ } - /* Setup the ANSI string */ - AnsiString.Buffer = String; - AnsiString.Length = Length; + /* Setup the output string */ + OutputString.Buffer = String; + OutputString.Length = Length; /* Log the print */ - //KdLogDbgPrint(&AnsiString); + //KdLogDbgPrint(&OutputString); /* Check for a debugger */ if (KdDebuggerNotPresent) @@ -287,7 +287,7 @@ Entered = KdEnterDebugger(TrapFrame, ExceptionFrame); /* Print the string */ - if (KdpPrintString(&AnsiString)) + if (KdpPrintString(&OutputString)) { /* User pressed CTRL-C, breakpoint on return */ ReturnStatus = STATUS_BREAKPOINT; Modified: trunk/reactos/ntoskrnl/kd64/kdtrap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdtrap.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdtrap.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdtrap.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -135,8 +135,10 @@ IN BOOLEAN SecondChanceException) { BOOLEAN Unload = FALSE; - ULONG_PTR ProgramCounter, ReturnValue; + ULONG_PTR ProgramCounter; BOOLEAN Status = FALSE; + NTSTATUS ReturnStatus; + USHORT ReturnLength; /* * Check if we got a STATUS_BREAKPOINT with a SubID for Print, Prompt or @@ -156,38 +158,38 @@ case BREAKPOINT_PRINT: /* Call the worker routine */ - ReturnValue = KdpPrint((ULONG)KdpGetFirstParameter(ContextRecord), - (ULONG)KdpGetSecondParameter(ContextRecord), - (LPSTR)ExceptionRecord-> - ExceptionInformation[1], - (USHORT)ExceptionRecord-> - ExceptionInformation[2], - PreviousMode, - TrapFrame, - ExceptionFrame, - &Status); - - /* Update the return value for the caller */ - KeSetContextReturnRegister(ContextRecord, ReturnValue); - break; - - /* DbgPrompt */ - case BREAKPOINT_PROMPT: - - /* Call the worker routine */ - ReturnValue = KdpPrompt((LPSTR)ExceptionRecord-> + ReturnStatus = KdpPrint((ULONG)KdpGetFirstParameter(ContextRecord), + (ULONG)KdpGetSecondParameter(ContextRecord), + (LPSTR)ExceptionRecord-> ExceptionInformation[1], (USHORT)ExceptionRecord-> ExceptionInformation[2], - (LPSTR)KdpGetFirstParameter(ContextRecord), - (USHORT)KdpGetSecondParameter(ContextRecord), PreviousMode, TrapFrame, - ExceptionFrame); + ExceptionFrame, + &Status); + + /* Update the return value for the caller */ + KeSetContextReturnRegister(ContextRecord, ReturnStatus); + break; + + /* DbgPrompt */ + case BREAKPOINT_PROMPT: + + /* Call the worker routine */ + ReturnLength = KdpPrompt((LPSTR)ExceptionRecord-> + ExceptionInformation[1], + (USHORT)ExceptionRecord-> + ExceptionInformation[2], + (LPSTR)KdpGetFirstParameter(ContextRecord), + (USHORT)KdpGetSecondParameter(ContextRecord), + PreviousMode, + TrapFrame, + ExceptionFrame); Status = TRUE; /* Update the return value for the caller */ - KeSetContextReturnRegister(ContextRecord, ReturnValue); + KeSetContextReturnRegister(ContextRecord, ReturnLength); break; /* DbgUnLoadImageSymbols */ Modified: trunk/reactos/ntoskrnl/ke/bug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/bug.c?rev=4374…
============================================================================== --- trunk/reactos/ntoskrnl/ke/bug.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/bug.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -1197,7 +1197,7 @@ if (Reboot) { /* Unload symbols */ - DbgUnLoadImageSymbols(NULL, NtCurrentProcess(), 0); + DbgUnLoadImageSymbols(NULL, (PVOID)MAXULONG_PTR, 0); HalReturnToFirmware(HalRebootRoutine); } Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/exp.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/exp.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/exp.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -930,9 +930,8 @@ { /* * Break into the kernel debugger unless a user mode debugger - * is present or user mode exceptions are ignored, unless this is - * a breakpoint or a debug service in which case we have to - * handle it. + * is present or user mode exceptions are ignored, except if this + * is a debug service which we must always pass to KD */ if ((!(PsGetCurrentProcess()->DebugPort) && !(KdIgnoreUmExceptions)) || Modified: trunk/reactos/ntoskrnl/mm/sysldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/sysldr.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/mm/sysldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/sysldr.c [iso-8859-1] Sun Oct 25 16:56:38 2009 @@ -730,7 +730,7 @@ PLDR_DATA_TABLE_ENTRY LdrEntry = ImageHandle; PVOID BaseAddress = LdrEntry->DllBase; NTSTATUS Status; - ANSI_STRING TempName; + STRING TempName; BOOLEAN HadEntry = FALSE; /* Acquire the loader lock */ @@ -761,7 +761,9 @@ if (NT_SUCCESS(Status)) { /* Unload the symbols */ - DbgUnLoadImageSymbols(&TempName, BaseAddress, -1); + DbgUnLoadImageSymbols(&TempName, + BaseAddress, + (ULONG_PTR)ZwCurrentProcess()); RtlFreeAnsiString(&TempName); } } @@ -1528,7 +1530,7 @@ BOOLEAN LockOwned = FALSE; PLIST_ENTRY NextEntry; IMAGE_INFO ImageInfo; - ANSI_STRING AnsiTemp; + STRING AnsiTemp; PAGED_CODE(); /* Detect session-load */ @@ -1941,7 +1943,9 @@ RtlInitString(&AnsiTemp, Buffer); /* Notify the debugger */ - DbgLoadImageSymbols(&AnsiTemp, LdrEntry->DllBase, -1); + DbgLoadImageSymbols(&AnsiTemp, + LdrEntry->DllBase, + (ULONG_PTR)ZwCurrentProcess()); LdrEntry->Flags |= LDRP_DEBUG_SYMBOLS_LOADED; }
15 years, 2 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
65
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Results per page:
10
25
50
100
200