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
August 2012
----- 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
14 participants
198 discussions
Start a n
N
ew thread
[ekohl] 57108: [SERVICES] Remove "size_t to DWORD/int..." conversion warnings in x64 build. Patch by Hermes Belusca. I replaced size_t by SIZE_T, as this is the proper Win32 type. And I also used t...
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Aug 19 10:01:05 2012 New Revision: 57108 URL:
http://svn.reactos.org/svn/reactos?rev=57108&view=rev
Log: [SERVICES] Remove "size_t to DWORD/int..." conversion warnings in x64 build. Patch by Hermes Belusca. I replaced size_t by SIZE_T, as this is the proper Win32 type. And I also used the prefix 'cch' (count of characters) instead of the generic 'dw'. See issue #7149 for more details. Modified: trunk/reactos/base/system/services/config.c trunk/reactos/base/system/services/database.c trunk/reactos/base/system/services/rpcserver.c Modified: trunk/reactos/base/system/services/config.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/confi…
============================================================================== --- trunk/reactos/base/system/services/config.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/config.c [iso-8859-1] Sun Aug 19 10:01:05 2012 @@ -98,9 +98,9 @@ DWORD dwDependenciesLength) { DWORD dwError = ERROR_SUCCESS; - DWORD dwGroupLength = 0; - DWORD dwServiceLength = 0; - DWORD dwLength; + SIZE_T cchGroupLength = 0; + SIZE_T cchServiceLength = 0; + SIZE_T cchLength; LPWSTR lpGroupDeps; LPWSTR lpServiceDeps; LPCWSTR lpSrc; @@ -125,46 +125,46 @@ lpDst = lpGroupDeps; while (*lpSrc != 0) { - dwLength = wcslen(lpSrc) + 1; + cchLength = wcslen(lpSrc) + 1; if (*lpSrc == SC_GROUP_IDENTIFIERW) { lpSrc++; - dwGroupLength += dwLength; + cchGroupLength += cchLength; wcscpy(lpDst, lpSrc); - lpDst = lpDst + dwLength; + lpDst = lpDst + cchLength; } - lpSrc = lpSrc + dwLength; + lpSrc = lpSrc + cchLength; } *lpDst = 0; lpDst++; - dwGroupLength++; + cchGroupLength++; lpSrc = lpDependencies; lpServiceDeps = lpDst; while (*lpSrc != 0) { - dwLength = wcslen(lpSrc) + 1; + cchLength = wcslen(lpSrc) + 1; if (*lpSrc != SC_GROUP_IDENTIFIERW) { - dwServiceLength += dwLength; + cchServiceLength += cchLength; wcscpy(lpDst, lpSrc); - lpDst = lpDst + dwLength; + lpDst = lpDst + cchLength; } - lpSrc = lpSrc + dwLength; + lpSrc = lpSrc + cchLength; } *lpDst = 0; - dwServiceLength++; - - if (dwGroupLength > 1) + cchServiceLength++; + + if (cchGroupLength > 1) { dwError = RegSetValueExW(hServiceKey, L"DependOnGroup", 0, REG_MULTI_SZ, (LPBYTE)lpGroupDeps, - dwGroupLength * sizeof(WCHAR)); + (DWORD)(cchGroupLength * sizeof(WCHAR))); } else { @@ -174,14 +174,14 @@ if (dwError == ERROR_SUCCESS) { - if (dwServiceLength > 1) + if (cchServiceLength > 1) { dwError = RegSetValueExW(hServiceKey, L"DependOnService", 0, REG_MULTI_SZ, (LPBYTE)lpServiceDeps, - dwServiceLength * sizeof(WCHAR)); + (DWORD)(cchServiceLength * sizeof(WCHAR))); } else { @@ -324,12 +324,12 @@ { LPWSTR lpGroups = NULL; LPWSTR lpServices = NULL; - DWORD dwGroupsLength = 0; - DWORD dwServicesLength = 0; + SIZE_T cchGroupsLength = 0; + SIZE_T cchServicesLength = 0; LPWSTR lpSrc; LPWSTR lpDest; - DWORD len; - DWORD dwTotalLength; + SIZE_T cchLength; + SIZE_T cchTotalLength; *lpDependencies = NULL; *lpdwDependenciesLength = 0; @@ -356,10 +356,10 @@ { DPRINT(" %S\n", lpSrc); - len = wcslen(lpSrc) + 1; - dwGroupsLength += len + 1; - - lpSrc = lpSrc + len; + cchLength = wcslen(lpSrc) + 1; + cchGroupsLength += cchLength + 1; + + lpSrc = lpSrc + cchLength; } } @@ -371,18 +371,18 @@ { DPRINT(" %S\n", lpSrc); - len = wcslen(lpSrc) + 1; - dwServicesLength += len; - - lpSrc = lpSrc + len; - } - } - - dwTotalLength = dwGroupsLength + dwServicesLength + 1; - DPRINT("dwTotalLength: %lu\n", dwTotalLength); + cchLength = wcslen(lpSrc) + 1; + cchServicesLength += cchLength; + + lpSrc = lpSrc + cchLength; + } + } + + cchTotalLength = cchGroupsLength + cchServicesLength + 1; + DPRINT("cchTotalLength: %lu\n", cchTotalLength); /* Allocate the common buffer for the dependencies */ - *lpDependencies = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwTotalLength * sizeof(WCHAR)); + *lpDependencies = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cchTotalLength * sizeof(WCHAR)); if (*lpDependencies == NULL) { if (lpGroups) @@ -395,7 +395,7 @@ } /* Return the allocated buffer length in characters */ - *lpdwDependenciesLength = dwTotalLength; + *lpdwDependenciesLength = (DWORD)cchTotalLength; /* Copy the service dependencies into the common buffer */ lpDest = *lpDependencies; @@ -403,9 +403,9 @@ { memcpy(lpDest, lpServices, - dwServicesLength * sizeof(WCHAR)); - - lpDest = lpDest + dwServicesLength; + cchServicesLength * sizeof(WCHAR)); + + lpDest = lpDest + cchServicesLength; } /* Copy the group dependencies into the common buffer */ @@ -414,15 +414,15 @@ lpSrc = lpGroups; while (*lpSrc != 0) { - len = wcslen(lpSrc) + 1; + cchLength = wcslen(lpSrc) + 1; *lpDest = SC_GROUP_IDENTIFIERW; lpDest++; wcscpy(lpDest, lpSrc); - lpDest = lpDest + len; - lpSrc = lpSrc + len; + lpDest = lpDest + cchLength; + lpSrc = lpSrc + cchLength; } } Modified: trunk/reactos/base/system/services/database.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/datab…
============================================================================== --- trunk/reactos/base/system/services/database.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/database.c [iso-8859-1] Sun Aug 19 10:01:05 2012 @@ -902,7 +902,7 @@ /* Calculate the total length of the start command line */ PacketSize = sizeof(SCM_CONTROL_PACKET); - PacketSize += (wcslen(Service->lpServiceName) + 1) * sizeof(WCHAR); + PacketSize += (DWORD)((wcslen(Service->lpServiceName) + 1) * sizeof(WCHAR)); ControlPacket = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, @@ -1117,7 +1117,7 @@ /* Calculate the total length of the start command line */ PacketSize = sizeof(SCM_CONTROL_PACKET) + - (wcslen(Service->lpServiceName) + 1) * sizeof(WCHAR); + (DWORD)((wcslen(Service->lpServiceName) + 1) * sizeof(WCHAR)); /* Calculate the required packet size for the start arguments */ if (argc > 0 && argv != NULL) @@ -1128,7 +1128,7 @@ for (i = 0; i < argc; i++) { DPRINT("Argv[%lu]: %S\n", i, argv[i]); - PacketSize += (wcslen(argv[i]) + 1) * sizeof(WCHAR) + sizeof(PWSTR); + PacketSize += (DWORD)((wcslen(argv[i]) + 1) * sizeof(WCHAR) + sizeof(PWSTR)); } } Modified: trunk/reactos/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
============================================================================== --- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Sun Aug 19 10:01:05 2012 @@ -395,7 +395,8 @@ DWORD ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName) { - DWORD ServiceNameLen, BufferSize, ExpandedLen; + SIZE_T ServiceNameLen, ExpandedLen; + DWORD BufferSize; WCHAR Dest; WCHAR *Expanded; UNICODE_STRING NtPathName, SystemRoot, LinkTarget; @@ -652,7 +653,8 @@ const wchar_t *lpServiceName, wchar_t **lpCanonName) { - DWORD ServiceNameLen, Result; + DWORD Result; + SIZE_T ServiceNameLen; UNICODE_STRING NtServiceName; WCHAR *RelativeName; const WCHAR *SourceName = lpServiceName; @@ -895,8 +897,8 @@ { /* Calculate the required size */ dwRequiredSize += sizeof(SERVICE_STATUS); - dwRequiredSize += ((wcslen(lpCurrentService->lpServiceName) + 1) * sizeof(WCHAR)); - dwRequiredSize += ((wcslen(lpCurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); + dwRequiredSize += (DWORD)((wcslen(lpCurrentService->lpServiceName) + 1) * sizeof(WCHAR)); + dwRequiredSize += (DWORD)((wcslen(lpCurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); /* Add the size for service name and display name pointers */ dwRequiredSize += (2 * sizeof(PVOID)); @@ -923,7 +925,7 @@ } } - dwDependServiceStrPtr += (wcslen(lpszValueBuf + dwDependServiceStrPtr) + 1); + dwDependServiceStrPtr += (DWORD)(wcslen(lpszValueBuf + dwDependServiceStrPtr) + 1); } } else if (*pcbBytesNeeded) @@ -1813,7 +1815,7 @@ 0, REG_SZ, (LPBYTE)lpDisplayName, - (wcslen(lpDisplayName) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpDisplayName) + 1) * sizeof(WCHAR))); /* Update the display name */ lpDisplayNameW = HeapAlloc(GetProcessHeap(), @@ -1896,7 +1898,7 @@ 0, REG_EXPAND_SZ, (LPBYTE)lpImagePathW, - (wcslen(lpImagePathW) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpImagePathW) + 1) * sizeof(WCHAR))); if (lpImagePathW != lpBinaryPathName) HeapFree(GetProcessHeap(), 0, lpImagePathW); @@ -1913,7 +1915,7 @@ 0, REG_SZ, (LPBYTE)lpLoadOrderGroup, - (wcslen(lpLoadOrderGroup) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpLoadOrderGroup) + 1) * sizeof(WCHAR))); if (dwError != ERROR_SUCCESS) goto done; @@ -2183,7 +2185,7 @@ 0, REG_SZ, (LPBYTE)lpDisplayName, - (wcslen(lpDisplayName) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpDisplayName) + 1) * sizeof(WCHAR))); } /* Set the service type */ @@ -2224,7 +2226,7 @@ 0, REG_EXPAND_SZ, (LPBYTE)lpBinaryPathName, - (wcslen(lpBinaryPathName) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpBinaryPathName) + 1) * sizeof(WCHAR))); if (dwError != ERROR_SUCCESS) goto done; } @@ -2235,7 +2237,7 @@ 0, REG_EXPAND_SZ, (LPBYTE)lpImagePath, - (wcslen(lpImagePath) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpImagePath) + 1) * sizeof(WCHAR))); if (dwError != ERROR_SUCCESS) goto done; } @@ -2248,7 +2250,7 @@ 0, REG_SZ, (LPBYTE)lpLoadOrderGroup, - (wcslen(lpLoadOrderGroup) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpLoadOrderGroup) + 1) * sizeof(WCHAR))); if (dwError != ERROR_SUCCESS) goto done; } @@ -2284,7 +2286,7 @@ 0, REG_SZ, (LPBYTE)lpObjectName, - (wcslen(lpObjectName) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpObjectName) + 1) * sizeof(WCHAR))); if (dwError != ERROR_SUCCESS) goto done; } @@ -2716,12 +2718,12 @@ dwRequiredSize = sizeof(QUERY_SERVICE_CONFIGW); if (lpImagePath != NULL) - dwRequiredSize += ((wcslen(lpImagePath) + 1) * sizeof(WCHAR)); + dwRequiredSize += (DWORD)((wcslen(lpImagePath) + 1) * sizeof(WCHAR)); else dwRequiredSize += 2 * sizeof(WCHAR); if (lpService->lpGroup != NULL) - dwRequiredSize += ((wcslen(lpService->lpGroup->lpGroupName) + 1) * sizeof(WCHAR)); + dwRequiredSize += (DWORD)((wcslen(lpService->lpGroup->lpGroupName) + 1) * sizeof(WCHAR)); else dwRequiredSize += 2 * sizeof(WCHAR); @@ -2731,12 +2733,12 @@ dwRequiredSize += 2 * sizeof(WCHAR); if (lpServiceStartName != NULL) - dwRequiredSize += ((wcslen(lpServiceStartName) + 1) * sizeof(WCHAR)); + dwRequiredSize += (DWORD)((wcslen(lpServiceStartName) + 1) * sizeof(WCHAR)); else dwRequiredSize += 2 * sizeof(WCHAR); if (lpService->lpDisplayName != NULL) - dwRequiredSize += ((wcslen(lpService->lpDisplayName) + 1) * sizeof(WCHAR)); + dwRequiredSize += (DWORD)((wcslen(lpService->lpDisplayName) + 1) * sizeof(WCHAR)); else dwRequiredSize += 2 * sizeof(WCHAR); @@ -2995,7 +2997,7 @@ *lpcchBuffer = 2; if (lpDisplayName != NULL) { - *lpDisplayName = '\0'; + *lpDisplayName = 0; } } @@ -3004,7 +3006,7 @@ if (!lpService->lpDisplayName) { - dwLength = wcslen(lpService->lpServiceName); + dwLength = (DWORD)wcslen(lpService->lpServiceName); if (lpDisplayName != NULL && *lpcchBuffer > dwLength) @@ -3014,7 +3016,7 @@ } else { - dwLength = wcslen(lpService->lpDisplayName); + dwLength = (DWORD)wcslen(lpService->lpDisplayName); if (lpDisplayName != NULL && *lpcchBuffer > dwLength) @@ -3069,14 +3071,14 @@ *lpcchBuffer = 2; if (lpServiceName != NULL) { - *lpServiceName = '\0'; + *lpServiceName = 0; } } return ERROR_SERVICE_DOES_NOT_EXIST; } - dwLength = wcslen(lpService->lpServiceName); + dwLength = (DWORD)wcslen(lpService->lpServiceName); if (lpServiceName != NULL && *lpcchBuffer > dwLength) @@ -3202,14 +3204,14 @@ lpDisplayName, -1, lpDisplayNameW, - strlen(lpDisplayName) + 1); + (int)(strlen(lpDisplayName) + 1)); RegSetValueExW(hServiceKey, L"DisplayName", 0, REG_SZ, (LPBYTE)lpDisplayNameW, - (wcslen(lpDisplayNameW) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpDisplayNameW) + 1) * sizeof(WCHAR))); /* Update lpService->lpDisplayName */ if (lpService->lpDisplayName) @@ -3280,7 +3282,7 @@ lpBinaryPathName, -1, lpBinaryPathNameW, - strlen(lpBinaryPathName) + 1); + (int)(strlen(lpBinaryPathName) + 1)); if (lpService->Status.dwServiceType & SERVICE_DRIVER) { @@ -3301,7 +3303,7 @@ 0, REG_EXPAND_SZ, (LPBYTE)lpBinaryPathNameW, - (wcslen(lpBinaryPathNameW) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpBinaryPathNameW) + 1) * sizeof(WCHAR))); HeapFree(GetProcessHeap(), 0, lpBinaryPathNameW); @@ -3326,14 +3328,14 @@ lpLoadOrderGroup, -1, lpLoadOrderGroupW, - strlen(lpLoadOrderGroup) + 1); + (int)(strlen(lpLoadOrderGroup) + 1)); dwError = RegSetValueExW(hServiceKey, L"Group", 0, REG_SZ, (LPBYTE)lpLoadOrderGroupW, - (wcslen(lpLoadOrderGroupW) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpLoadOrderGroupW) + 1) * sizeof(WCHAR))); if (dwError != ERROR_SUCCESS) { HeapFree(GetProcessHeap(), 0, lpLoadOrderGroupW); @@ -3384,7 +3386,7 @@ lpDependencies, dwDependSize, lpDependenciesW, - strlen(lpDependencies) + 1); + (int)(strlen(lpDependencies) + 1)); dwError = ScmWriteDependencies(hServiceKey, (LPWSTR)lpDependenciesW, @@ -3438,7 +3440,7 @@ LPWSTR lpDependenciesW = NULL; LPWSTR lpServiceStartNameW = NULL; DWORD dwDependenciesLength = 0; - DWORD dwLength; + SIZE_T cchLength; int len; LPCSTR lpStr; @@ -3495,9 +3497,9 @@ lpStr = (LPCSTR)lpDependencies; while (*lpStr) { - dwLength = strlen(lpStr) + 1; - dwDependenciesLength += dwLength; - lpStr = lpStr + dwLength; + cchLength = strlen(lpStr) + 1; + dwDependenciesLength += (DWORD)cchLength; + lpStr = lpStr + cchLength; } dwDependenciesLength++; @@ -3679,7 +3681,7 @@ lpService->lpDisplayName, -1, lpStr, - wcslen(lpService->lpDisplayName), + (int)wcslen(lpService->lpDisplayName), 0, 0); lpServicesPtr->lpDisplayName = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpServices); @@ -3691,7 +3693,7 @@ lpService->lpServiceName, -1, lpStr, - wcslen(lpService->lpServiceName), + (int)wcslen(lpService->lpServiceName), 0, 0); lpServicesPtr->lpServiceName = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpServices); @@ -3773,7 +3775,7 @@ lpStringPtrW, -1, lpStringPtrA, - wcslen(lpStringPtrW), + (int)wcslen(lpStringPtrW), 0, 0); @@ -3787,7 +3789,7 @@ lpStringPtrW, -1, lpStringPtrA, - wcslen(lpStringPtrW), + (int)wcslen(lpStringPtrW), 0, 0); @@ -3954,12 +3956,12 @@ dwRequiredSize = sizeof(QUERY_SERVICE_CONFIGA); if (lpImagePath != NULL) - dwRequiredSize += wcslen(lpImagePath) + 1; + dwRequiredSize += (DWORD)(wcslen(lpImagePath) + 1); else dwRequiredSize += 2; if ((lpService->lpGroup != NULL) && (lpService->lpGroup->lpGroupName != NULL)) - dwRequiredSize += wcslen(lpService->lpGroup->lpGroupName) + 1; + dwRequiredSize += (DWORD)(wcslen(lpService->lpGroup->lpGroupName) + 1); else dwRequiredSize += 2; @@ -3970,12 +3972,12 @@ dwRequiredSize += 2; if (lpServiceStartName != NULL) - dwRequiredSize += wcslen(lpServiceStartName) + 1; + dwRequiredSize += (DWORD)(wcslen(lpServiceStartName) + 1); else dwRequiredSize += 2; if (lpService->lpDisplayName != NULL) - dwRequiredSize += wcslen(lpService->lpDisplayName) + 1; + dwRequiredSize += (DWORD)(wcslen(lpService->lpDisplayName) + 1); else dwRequiredSize += 2; @@ -4003,7 +4005,7 @@ lpImagePath, -1, lpStr, - wcslen(lpImagePath) + 1, + (int)(wcslen(lpImagePath) + 1), 0, 0); } @@ -4022,7 +4024,7 @@ lpService->lpGroup->lpGroupName, -1, lpStr, - wcslen(lpService->lpGroup->lpGroupName) + 1, + (int)(wcslen(lpService->lpGroup->lpGroupName) + 1), 0, 0); } @@ -4064,7 +4066,7 @@ lpServiceStartName, -1, lpStr, - wcslen(lpServiceStartName) + 1, + (int)(wcslen(lpServiceStartName) + 1), 0, 0); } @@ -4083,7 +4085,7 @@ lpService->lpDisplayName, -1, lpStr, - wcslen(lpService->lpDisplayName) + 1, + (int)(wcslen(lpService->lpDisplayName) + 1), 0, 0); } @@ -4298,7 +4300,7 @@ if (lpServiceName != NULL) { - dwLength = strlen(lpServiceName) + 1; + dwLength = (DWORD)(strlen(lpServiceName) + 1); lpServiceNameW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwLength * sizeof(WCHAR)); @@ -4328,7 +4330,7 @@ *lpcchBuffer = 1; if (lpDisplayName != NULL) { - *lpDisplayName = '\0'; + *lpDisplayName = 0; } } return ERROR_SERVICE_DOES_NOT_EXIST; @@ -4336,14 +4338,14 @@ if (!lpService->lpDisplayName) { - dwLength = wcslen(lpService->lpServiceName); + dwLength = (DWORD)wcslen(lpService->lpServiceName); if (lpDisplayName != NULL && *lpcchBuffer > dwLength) { WideCharToMultiByte(CP_ACP, 0, lpService->lpServiceName, - wcslen(lpService->lpServiceName), + (int)wcslen(lpService->lpServiceName), lpDisplayName, dwLength + 1, NULL, @@ -4353,14 +4355,14 @@ } else { - dwLength = wcslen(lpService->lpDisplayName); + dwLength = (DWORD)wcslen(lpService->lpDisplayName); if (lpDisplayName != NULL && *lpcchBuffer > dwLength) { WideCharToMultiByte(CP_ACP, 0, lpService->lpDisplayName, - wcslen(lpService->lpDisplayName), + (int)wcslen(lpService->lpDisplayName), lpDisplayName, dwLength + 1, NULL, @@ -4395,7 +4397,7 @@ DPRINT("lpServiceName: %p\n", lpServiceName); DPRINT("*lpcchBuffer: %lu\n", *lpcchBuffer); - dwLength = strlen(lpDisplayName) + 1; + dwLength = (DWORD)(strlen(lpDisplayName) + 1); lpDisplayNameW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwLength * sizeof(WCHAR)); @@ -4424,21 +4426,21 @@ *lpcchBuffer = 1; if (lpServiceName != NULL) { - *lpServiceName = '\0'; + *lpServiceName = 0; } } return ERROR_SERVICE_DOES_NOT_EXIST; } - dwLength = wcslen(lpService->lpServiceName); + dwLength = (DWORD)wcslen(lpService->lpServiceName); if (lpServiceName != NULL && *lpcchBuffer > dwLength) { WideCharToMultiByte(CP_ACP, 0, lpService->lpServiceName, - wcslen(lpService->lpServiceName), + (int)wcslen(lpService->lpServiceName), lpServiceName, dwLength + 1, NULL, @@ -4578,8 +4580,8 @@ } dwSize = sizeof(ENUM_SERVICE_STATUSW) + - ((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + - ((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + + (DWORD)((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); if (dwRequiredSize + dwSize > cbBufSize) { @@ -4630,8 +4632,8 @@ } dwRequiredSize += (sizeof(ENUM_SERVICE_STATUSW) + - ((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + - ((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR))); + (DWORD)((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + + (DWORD)((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR))); dwError = ERROR_MORE_DATA; } @@ -4683,8 +4685,8 @@ } dwSize = sizeof(ENUM_SERVICE_STATUSW) + - ((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + - ((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + + (DWORD)((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); if (dwRequiredSize + dwSize > cbBufSize) break; @@ -4751,7 +4753,7 @@ ///if (lpServiceDescriptonA && ///lpServiceDescriptonA->lpDescription) ///{ - dwLength = (strlen(Info.lpDescription) + 1) * sizeof(WCHAR); + dwLength = (DWORD)((strlen(Info.lpDescription) + 1) * sizeof(WCHAR)); lpServiceDescriptonW = HeapAlloc(GetProcessHeap(), 0, @@ -4787,11 +4789,11 @@ { if (lpServiceFailureActionsA->lpRebootMsg) { - dwRebootLen = (strlen(lpServiceFailureActionsA->lpRebootMsg) + 1) * sizeof(WCHAR); + dwRebootLen = (DWORD)((strlen(lpServiceFailureActionsA->lpRebootMsg) + 1) * sizeof(WCHAR)); } if (lpServiceFailureActionsA->lpCommand) { - dwCommandLen = (strlen(lpServiceFailureActionsA->lpCommand) + 1) * sizeof(WCHAR); + dwCommandLen = (DWORD)((strlen(lpServiceFailureActionsA->lpCommand) + 1) * sizeof(WCHAR)); } dwLength = dwRebootLen + dwCommandLen + sizeof(SERVICE_FAILURE_ACTIONSW); @@ -5068,7 +5070,7 @@ 0, REG_SZ, (LPBYTE)lpFailureActions->lpRebootMsg, - (wcslen(lpFailureActions->lpRebootMsg) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpFailureActions->lpRebootMsg) + 1) * sizeof(WCHAR))); } } @@ -5089,7 +5091,7 @@ 0, REG_SZ, (LPBYTE)lpFailureActions->lpCommand, - (wcslen(lpFailureActions->lpCommand) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpFailureActions->lpCommand) + 1) * sizeof(WCHAR))); } } } @@ -5184,7 +5186,7 @@ 0, REG_SZ, (LPBYTE)lpServiceDescription->lpDescription, - (wcslen(lpServiceDescription->lpDescription) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(lpServiceDescription->lpDescription) + 1) * sizeof(WCHAR))); } } else @@ -5283,7 +5285,7 @@ *pcbBytesNeeded = sizeof(SERVICE_DESCRIPTIONA); if (dwError == ERROR_SUCCESS) - *pcbBytesNeeded += ((wcslen(lpDescriptionW) + 1) * sizeof(WCHAR)); + *pcbBytesNeeded += (DWORD)((wcslen(lpDescriptionW) + 1) * sizeof(WCHAR)); if (cbBufSize < *pcbBytesNeeded) { @@ -5300,7 +5302,7 @@ lpDescriptionW, -1, lpStr, - wcslen(lpDescriptionW), + (int)wcslen(lpDescriptionW), NULL, NULL); lpServiceDescription->lpDescription = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpServiceDescription); @@ -5341,10 +5343,10 @@ &lpRebootMessageW); if (lpRebootMessageW) - dwRequiredSize += (wcslen(lpRebootMessageW) + 1) * sizeof(WCHAR); + dwRequiredSize += (DWORD)((wcslen(lpRebootMessageW) + 1) * sizeof(WCHAR)); if (lpFailureCommandW) - dwRequiredSize += (wcslen(lpFailureCommandW) + 1) * sizeof(WCHAR); + dwRequiredSize += (DWORD)((wcslen(lpFailureCommandW) + 1) * sizeof(WCHAR)); if (cbBufSize < dwRequiredSize) { @@ -5404,7 +5406,7 @@ lpRebootMessageW, -1, lpStr, - wcslen(lpRebootMessageW), + (int)wcslen(lpRebootMessageW), NULL, NULL); lpFailureActions->lpRebootMsg = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpFailureActions); @@ -5418,7 +5420,7 @@ lpFailureCommandW, -1, lpStr, - wcslen(lpFailureCommandW), + (int)wcslen(lpFailureCommandW), NULL, NULL); lpFailureActions->lpCommand = (LPSTR)((ULONG_PTR)lpStr - (ULONG_PTR)lpFailureActions); @@ -5519,7 +5521,7 @@ *pcbBytesNeeded = sizeof(SERVICE_DESCRIPTIONW); if (dwError == ERROR_SUCCESS) - *pcbBytesNeeded += ((wcslen(lpDescription) + 1) * sizeof(WCHAR)); + *pcbBytesNeeded += (DWORD)((wcslen(lpDescription) + 1) * sizeof(WCHAR)); if (cbBufSize < *pcbBytesNeeded) { @@ -5569,10 +5571,10 @@ &lpRebootMessage); if (lpRebootMessage) - dwRequiredSize += (wcslen(lpRebootMessage) + 1) * sizeof(WCHAR); + dwRequiredSize += (DWORD)((wcslen(lpRebootMessage) + 1) * sizeof(WCHAR)); if (lpFailureCommand) - dwRequiredSize += (wcslen(lpFailureCommand) + 1) * sizeof(WCHAR); + dwRequiredSize += (DWORD)((wcslen(lpFailureCommand) + 1) * sizeof(WCHAR)); if (cbBufSize < dwRequiredSize) { @@ -5768,7 +5770,7 @@ pszGroupName, -1, pszGroupNameW, - strlen(pszGroupName) + 1); + (int)(strlen(pszGroupName) + 1)); } if ((cbBufSize > 0) && (lpBuffer)) @@ -5811,7 +5813,7 @@ lpStringPtrW, -1, lpStringPtrA, - wcslen(lpStringPtrW), + (int)wcslen(lpStringPtrW), 0, 0); @@ -5825,7 +5827,7 @@ lpStringPtrW, -1, lpStringPtrA, - wcslen(lpStringPtrW), + (int)wcslen(lpStringPtrW), 0, 0); @@ -5975,8 +5977,8 @@ } dwSize = sizeof(ENUM_SERVICE_STATUS_PROCESSW) + - ((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + - ((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + + (DWORD)((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); if (dwRequiredSize + dwSize <= cbBufSize) { @@ -6030,8 +6032,8 @@ } dwRequiredSize += (sizeof(ENUM_SERVICE_STATUS_PROCESSW) + - ((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + - ((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR))); + (DWORD)((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + + (DWORD)((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR))); dwError = ERROR_MORE_DATA; } @@ -6090,8 +6092,8 @@ } dwSize = sizeof(ENUM_SERVICE_STATUS_PROCESSW) + - ((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + - ((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); + (DWORD)((wcslen(CurrentService->lpServiceName) + 1) * sizeof(WCHAR)) + + (DWORD)((wcslen(CurrentService->lpDisplayName) + 1) * sizeof(WCHAR)); if (dwRequiredSize + dwSize <= cbBufSize) {
12 years, 4 months
1
0
0
0
[cgutman] 57107: [WS2_32] - Set last error inside getaddrinfo to properly mask some non-fatal errors generated by adns
by cgutman@svn.reactos.org
Author: cgutman Date: Sun Aug 19 07:32:47 2012 New Revision: 57107 URL:
http://svn.reactos.org/svn/reactos?rev=57107&view=rev
Log: [WS2_32] - Set last error inside getaddrinfo to properly mask some non-fatal errors generated by adns Modified: trunk/reactos/dll/win32/ws2_32/misc/ns.c Modified: trunk/reactos/dll/win32/ws2_32/misc/ns.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/misc/ns.c…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/misc/ns.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/misc/ns.c [iso-8859-1] Sun Aug 19 07:32:47 2012 @@ -1598,14 +1598,24 @@ DNS_STATUS dns_status; PDNS_RECORD dp, currdns; struct sockaddr_in *sin; + INT error; if (res == NULL) - return WSAEINVAL; + { + error = WSAEINVAL; + goto End; + } if (nodename == NULL && servname == NULL) - return WSAHOST_NOT_FOUND; + { + error = WSAHOST_NOT_FOUND; + goto End; + } if (!WSAINITIALIZED) - return WSANOTINITIALISED; + { + error = WSANOTINITIALISED; + goto End; + } if (servname) { @@ -1619,14 +1629,20 @@ { pent = getprotobynumber(hints->ai_protocol); if (pent == NULL) - return WSAEINVAL; + { + error = WSAEINVAL; + goto End; + } proto = pent->p_name; } else proto = NULL; se = getservbyname(servname, proto); if (se == NULL) - return WSATYPE_NOT_FOUND; + { + error = WSATYPE_NOT_FOUND; + goto End; + } port = se->s_port; } else @@ -1639,7 +1655,10 @@ { /* Is it an IPv6 address? */ if (strstr(nodename, ":")) - return WSAHOST_NOT_FOUND; + { + error = WSAHOST_NOT_FOUND; + goto End; + } /* Is it an IPv4 address? */ addr = inet_addr(nodename); @@ -1729,16 +1748,24 @@ } if (ret == NULL) - return WSAHOST_NOT_FOUND; + { + error = WSAHOST_NOT_FOUND; + goto End; + } if (hints && hints->ai_family != PF_UNSPEC && hints->ai_family != PF_INET) { freeaddrinfo(ret); - return WSAEAFNOSUPPORT; + error = WSAEAFNOSUPPORT; + goto End; } *res = ret; - return 0; + error = 0; + +End: + WSASetLastError(error); + return error; } /* EOF */
12 years, 4 months
1
0
0
0
[cgutman] 57106: [ADNS] - Fix incorrect socket validity check that fails for unsigned types
by cgutman@svn.reactos.org
Author: cgutman Date: Sun Aug 19 07:10:57 2012 New Revision: 57106 URL:
http://svn.reactos.org/svn/reactos?rev=57106&view=rev
Log: [ADNS] - Fix incorrect socket validity check that fails for unsigned types Modified: trunk/reactos/lib/3rdparty/adns/src/setup.c Modified: trunk/reactos/lib/3rdparty/adns/src/setup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/adns/src/setu…
============================================================================== --- trunk/reactos/lib/3rdparty/adns/src/setup.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/adns/src/setup.c [iso-8859-1] Sun Aug 19 07:10:57 2012 @@ -680,7 +680,7 @@ else break; } adns_socket_close(ads->udpsocket); - if (ads->tcpsocket >= 0) adns_socket_close(ads->tcpsocket); + if (ads->tcpsocket != -1) adns_socket_close(ads->tcpsocket); adns__vbuf_free(&ads->tcpsend); adns__vbuf_free(&ads->tcprecv); freesearchlist(ads);
12 years, 4 months
1
0
0
0
[jimtabor] 57105: [Win32SS] - Move WM_SETREDRAW and WM_SYNCPAINT to Win32k. - Patch by Alex Henrie: Minimize and maximize boxes can only appear when WS_SYSMENU is set.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Aug 18 23:37:08 2012 New Revision: 57105 URL:
http://svn.reactos.org/svn/reactos?rev=57105&view=rev
Log: [Win32SS] - Move WM_SETREDRAW and WM_SYNCPAINT to Win32k. - Patch by Alex Henrie: Minimize and maximize boxes can only appear when WS_SYSMENU is set. Modified: trunk/reactos/win32ss/user/ntuser/defwnd.c trunk/reactos/win32ss/user/user32/windows/defwnd.c Modified: trunk/reactos/win32ss/user/ntuser/defwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/defwnd…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/defwnd.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/defwnd.c [iso-8859-1] Sat Aug 18 23:37:08 2012 @@ -230,6 +230,40 @@ return GetNCHitEx(Wnd, Point); } + case WM_SYNCPAINT: + { + HRGN hRgn; + Wnd->state &= ~WNDS_SYNCPAINTPENDING; + ERR("WM_SYNCPAINT\n"); + hRgn = IntSysCreateRectRgn(0, 0, 0, 0); + if (co_UserGetUpdateRgn(Wnd, hRgn, FALSE) != NULLREGION) + { + if (!wParam) wParam = (RDW_ERASENOW | RDW_ERASE | RDW_FRAME | RDW_ALLCHILDREN); + co_UserRedrawWindow(Wnd, NULL, hRgn, wParam); + } + GreDeleteObject(hRgn); + return 0; + } + + case WM_SETREDRAW: + if (wParam) + { + if (!(Wnd->style & WS_VISIBLE)) + { + IntSetStyle( Wnd, WS_VISIBLE, 0 ); + Wnd->state |= WNDS_SENDNCPAINT; + } + } + else + { + if (Wnd->style & WS_VISIBLE) + { + co_UserRedrawWindow( Wnd, NULL, NULL, RDW_ALLCHILDREN | RDW_VALIDATE ); + IntSetStyle( Wnd, 0, WS_VISIBLE ); + } + } + return 0; + /* ReactOS only. */ case WM_CBT: { @@ -373,8 +407,7 @@ rcWindow.top += UserGetSystemMetrics(SM_CYCAPTION) - 1; if (!RECTL_bPointInRect( &rcWindow, pt.x, pt.y )) { - BOOL min_or_max_box = (Style & WS_MAXIMIZEBOX) || - (Style & WS_MINIMIZEBOX); + BOOL min_or_max_box = (Style & WS_SYSMENU) && (Style & (WS_MINIMIZEBOX|WS_MAXIMIZEBOX)); if (ExStyle & WS_EX_LAYOUTRTL) { /* Check system menu */ Modified: trunk/reactos/win32ss/user/user32/windows/defwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/defwnd.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/defwnd.c [iso-8859-1] Sat Aug 18 23:37:08 2012 @@ -1245,7 +1245,7 @@ } return (0); } - +/* case WM_SYNCPAINT: { HRGN hRgn; @@ -1272,7 +1272,7 @@ } return (0); } - +*/ case WM_CLOSE: { DestroyWindow(hWnd); @@ -1816,6 +1816,8 @@ /* Move to win32k !*/ case WM_SHOWWINDOW: if (!lParam) break; // Call when it is necessary. + case WM_SYNCPAINT: + case WM_SETREDRAW: case WM_CLIENTSHUTDOWN: case WM_GETHOTKEY: case WM_SETHOTKEY:
12 years, 4 months
1
0
0
0
[jimtabor] 57104: [NtUser] - Patch based on Daniel Jelinski: search more aggressively for a window under a tooltip and better HTTRANSPARENT handling. When the test patch is applied, ReactOS passes ...
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Aug 18 23:01:55 2012 New Revision: 57104 URL:
http://svn.reactos.org/svn/reactos?rev=57104&view=rev
Log: [NtUser] - Patch based on Daniel Jelinski: search more aggressively for a window under a tooltip and better HTTRANSPARENT handling. When the test patch is applied, ReactOS passes the new tests. References:
http://www.winehq.org/pipermail/wine-patches/2012-July/116429.html
http://www.winehq.org/pipermail/wine-patches/2012-August/116776.html
http://www.winehq.org/pipermail/wine-patches/2012-August/116777.html
http://www.winehq.org/pipermail/wine-devel/2012-August/096681.html
Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.c trunk/reactos/win32ss/user/ntuser/winpos.c Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgque…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] Sat Aug 18 23:01:55 2012 @@ -41,6 +41,12 @@ IntChildrenWindowFromPoint(PWND pWndTop, INT x, INT y) { PWND pWnd, pWndChild; + + if ( !pWndTop ) + { + pWndTop = UserGetDesktopWindow(); + if ( !pWndTop ) return NULL; + } if (!(pWndTop->style & WS_VISIBLE)) return NULL; if ((pWndTop->style & WS_DISABLED)) return NULL; @@ -1338,7 +1344,7 @@ pwndDesktop = UserGetDesktopWindow(); MessageQueue = pti->MessageQueue; CurInfo = IntGetSysCursorInfo(); - pwndMsg = UserGetWindowObject(msg->hwnd); + pwndMsg = ValidateHwndNoErr(msg->hwnd); clk_msg = MessageQueue->msgDblClk; pDesk = pwndDesktop->head.rpdesk; @@ -1350,8 +1356,9 @@ if (pwndMsg) UserReferenceObject(pwndMsg); } else - { - pwndMsg = co_WinPosWindowFromPoint(pwndMsg, &msg->pt, &hittest); + { // Fix wine Msg test_HTTRANSPARENT. Start with a NULL window. + //
http://www.winehq.org/pipermail/wine-patches/2012-August/116776.html
+ pwndMsg = co_WinPosWindowFromPoint(NULL, &msg->pt, &hittest); } TRACE("Got mouse message for 0x%x, hittest: 0x%x\n", msg->hwnd, hittest ); Modified: trunk/reactos/win32ss/user/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winpos…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] Sat Aug 18 23:01:55 2012 @@ -2111,7 +2111,7 @@ { for (phWnd = List; *phWnd; ++phWnd) { - if (!(pwndChild = UserGetWindowObject(*phWnd))) + if (!(pwndChild = ValidateHwndNoErr(*phWnd))) { continue; } @@ -2130,13 +2130,18 @@ } } - *HitTest = (USHORT)co_IntSendMessage(ScopeWin->head.h, WM_NCHITTEST, 0, - MAKELONG(Point->x, Point->y)); - if ((*HitTest) == (USHORT)HTTRANSPARENT) + if (ScopeWin->head.pti == PsGetCurrentThreadWin32Thread()) { - UserDereferenceObject(ScopeWin); - return NULL; + *HitTest = (USHORT)co_IntSendMessage(ScopeWin->head.h, WM_NCHITTEST, 0, + MAKELONG(Point->x, Point->y)); + if ((*HitTest) == (USHORT)HTTRANSPARENT) + { + UserDereferenceObject(ScopeWin); + return NULL; + } } + else + *HitTest = HTCLIENT; return ScopeWin; } @@ -2163,7 +2168,7 @@ Window = co_WinPosSearchChildren(ScopeWin, &Point, HitTest); UserDerefObjectCo(ScopeWin); - if(Window) + if (Window) ASSERT_REFS_CO(Window); ASSERT_REFS_CO(ScopeWin); @@ -2193,7 +2198,7 @@ for (phWnd = List; *phWnd; phWnd++) { PWND Child; - if ((Child = UserGetWindowObject(*phWnd))) + if ((Child = ValidateHwndNoErr(*phWnd))) { if ( Child->style & WS_VISIBLE && IntPtInWindow(Child, Pt.x, Pt.y) ) { @@ -2238,7 +2243,7 @@ for (phWnd = List; *phWnd; phWnd++) { PWND Child; - if ((Child = UserGetWindowObject(*phWnd))) + if ((Child = ValidateHwndNoErr(*phWnd))) { if (uiFlags & (CWP_SKIPINVISIBLE|CWP_SKIPDISABLED)) { @@ -3098,9 +3103,9 @@ //pti = PsGetCurrentThreadWin32Thread(); Window = co_WinPosWindowFromPoint(DesktopWindow, &pt, &hittest); - if(Window) - { - Ret = Window->head.h; + if (Window) + { + Ret = UserHMGetHandle(Window); RETURN( Ret); }
12 years, 4 months
1
0
0
0
[jimtabor] 57103: [Win32k] - AttachThreadInput, this should fix the crash. Original crash patch by Giannis Adamopoulos. See bug 7225. - WARNING: This code should be turned off until the restructuri...
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Aug 18 22:13:38 2012 New Revision: 57103 URL:
http://svn.reactos.org/svn/reactos?rev=57103&view=rev
Log: [Win32k] - AttachThreadInput, this should fix the crash. Original crash patch by Giannis Adamopoulos. See bug 7225. - WARNING: This code should be turned off until the restructuring is finished. Please read bug 7225! Modified: trunk/reactos/win32ss/user/ntuser/input.c trunk/reactos/win32ss/user/ntuser/input.h trunk/reactos/win32ss/user/ntuser/main.c trunk/reactos/win32ss/user/ntuser/ntstubs.c Modified: trunk/reactos/win32ss/user/ntuser/input.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/input.…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/input.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/input.c [iso-8859-1] Sat Aug 18 22:13:38 2012 @@ -17,6 +17,7 @@ PTHREADINFO ptiMouse; PKTIMER MasterTimer = NULL; PATTACHINFO gpai = NULL; +INT paiCount = 0; HANDLE ghKeyboardDevice; static DWORD LastInputTick = 0; @@ -414,20 +415,20 @@ return pai->pti1; } -BOOL FASTCALL +NTSTATUS FASTCALL UserAttachThreadInput(PTHREADINFO ptiFrom, PTHREADINFO ptiTo, BOOL fAttach) { MSG msg; PATTACHINFO pai; /* Can not be the same thread. */ - if (ptiFrom == ptiTo) return FALSE; + if (ptiFrom == ptiTo) return STATUS_INVALID_PARAMETER; /* Do not attach to system threads or between different desktops. */ if (ptiFrom->TIF_flags & TIF_DONTATTACHQUEUE || - ptiTo->TIF_flags & TIF_DONTATTACHQUEUE || - ptiFrom->rpdesk != ptiTo->rpdesk) - return FALSE; + ptiTo->TIF_flags & TIF_DONTATTACHQUEUE || + ptiFrom->rpdesk != ptiTo->rpdesk) + return STATUS_ACCESS_DENIED; /* MSDN Note: Keyboard and mouse events received by both threads are processed by the thread specified by the idAttachTo. @@ -437,20 +438,34 @@ if (fAttach) { pai = ExAllocatePoolWithTag(PagedPool, sizeof(ATTACHINFO), USERTAG_ATTACHINFO); - if (!pai) return FALSE; + if (!pai) return STATUS_NO_MEMORY; pai->paiNext = gpai; pai->pti1 = ptiFrom; pai->pti2 = ptiTo; gpai = pai; - ERR("Attach Allocated! ptiFrom 0x%p ptiTo 0x%p\n",ptiFrom,ptiTo); + paiCount++; + ERR("Attach Allocated! ptiFrom 0x%p ptiTo 0x%p paiCount %d\n",ptiFrom,ptiTo,paiCount); + + if (ptiTo->MessageQueue == ptiFrom->MessageQueue) + { + ERR("Attach Threads are already associated!\n"); + } ptiTo->MessageQueue->iCursorLevel -= ptiFrom->iCursorLevel; - ptiFrom->pqAttach = ptiFrom->MessageQueue; + + /* Keep the original queue in pqAttach (ie do not trash it in a second attachment) */ + if (ptiFrom->pqAttach == NULL) + ptiFrom->pqAttach = ptiFrom->MessageQueue; ptiFrom->MessageQueue = ptiTo->MessageQueue; + + ptiFrom->MessageQueue->cThreads++; + ERR("ptiTo S Share count %d\n", ptiFrom->MessageQueue->cThreads); + // FIXME: conditions? if (ptiFrom->pqAttach == gpqForeground) { + ERR("ptiFrom is Foreground\n"); ptiFrom->MessageQueue->spwndActive = ptiFrom->pqAttach->spwndActive; ptiFrom->MessageQueue->spwndFocus = ptiFrom->pqAttach->spwndFocus; ptiFrom->MessageQueue->CursorObject = ptiFrom->pqAttach->CursorObject; @@ -458,31 +473,71 @@ ptiFrom->MessageQueue->QF_flags ^= ((ptiFrom->MessageQueue->QF_flags ^ ptiFrom->pqAttach->QF_flags) & QF_CAPTURELOCKED); ptiFrom->MessageQueue->CaretInfo = ptiFrom->pqAttach->CaretInfo; } + else + { + ERR("ptiFrom NOT Foreground\n"); + } + if (ptiTo->MessageQueue == gpqForeground) + { + ERR("ptiTo is Foreground\n"); + } + else + { + ERR("ptiTo NOT Foreground\n"); + } } else /* If clear, unlink and free it. */ { - PATTACHINFO paiprev = NULL; - - if (!gpai) return FALSE; - + BOOL Hit = FALSE; + PATTACHINFO *ppai; + + if (!gpai) return STATUS_INVALID_PARAMETER; + + /* Search list and free if found or return false. */ + ppai = &gpai; + while (*ppai != NULL) + { + if ( (*ppai)->pti2 == ptiTo && (*ppai)->pti1 == ptiFrom ) + { + pai = *ppai; + /* Remove it from the list */ + *ppai = (*ppai)->paiNext; + ExFreePoolWithTag(pai, USERTAG_ATTACHINFO); + paiCount--; + Hit = TRUE; + break; + } + ppai = &((*ppai)->paiNext); + } + + if (!Hit) return STATUS_INVALID_PARAMETER; + + ASSERT(ptiFrom->pqAttach); + + ERR("Attach Free! ptiFrom 0x%p ptiTo 0x%p paiCount %d\n",ptiFrom,ptiTo,paiCount); + + /* Search list and check if the thread is attached one more time */ pai = gpai; - - /* Search list and free if found or return false. */ - do - { - if (pai->pti2 == ptiTo && pai->pti1 == ptiFrom) break; - paiprev = pai; + while(pai) + { + /* If the thread is attached again , we are done */ + if (pai->pti1 == ptiFrom) + { + ptiFrom->MessageQueue->cThreads--; + ERR("ptiTo L Share count %d\n", ptiFrom->MessageQueue->cThreads); + /* Use the message queue of the last attachment */ + ptiFrom->MessageQueue = pai->pti2->MessageQueue; + ptiFrom->MessageQueue->CursorObject = NULL; + ptiFrom->MessageQueue->spwndActive = NULL; + ptiFrom->MessageQueue->spwndFocus = NULL; + ptiFrom->MessageQueue->spwndCapture = NULL; + return STATUS_SUCCESS; + } pai = pai->paiNext; - } while (pai); - - if (!pai) return FALSE; - - if (paiprev) paiprev->paiNext = pai->paiNext; - else if (!pai->paiNext) gpai = NULL; - - ExFreePoolWithTag(pai, USERTAG_ATTACHINFO); - ERR("Attach Free! ptiFrom 0x%p ptiTo 0x%p\n",ptiFrom,ptiTo); - + } + + ptiFrom->MessageQueue->cThreads--; + ERR("ptiTo E Share count %d\n", ptiFrom->MessageQueue->cThreads); ptiFrom->MessageQueue = ptiFrom->pqAttach; // FIXME: conditions? ptiFrom->MessageQueue->CursorObject = NULL; @@ -505,7 +560,7 @@ msg.pt = gpsi->ptCursor; co_MsqInsertMouseMessage(&msg, 0, 0, TRUE); - return TRUE; + return STATUS_SUCCESS; } /* Modified: trunk/reactos/win32ss/user/ntuser/input.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/input.…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/input.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/input.h [iso-8859-1] Sat Aug 18 22:13:38 2012 @@ -62,7 +62,7 @@ INIT_FUNCTION NTSTATUS NTAPI InitInputImpl(VOID); BOOL FASTCALL IntBlockInput(PTHREADINFO W32Thread, BOOL BlockIt); DWORD NTAPI CreateSystemThreads(UINT Type); -BOOL FASTCALL UserAttachThreadInput(PTHREADINFO,PTHREADINFO,BOOL); +NTSTATUS FASTCALL UserAttachThreadInput(PTHREADINFO,PTHREADINFO,BOOL); PTHREADINFO FASTCALL IsThreadAttach(PTHREADINFO); VOID FASTCALL DoTheScreenSaver(VOID); #define ThreadHasInputAccess(W32Thread) (TRUE) Modified: trunk/reactos/win32ss/user/ntuser/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/main.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/main.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/main.c [iso-8859-1] Sat Aug 18 22:13:38 2012 @@ -401,6 +401,28 @@ ppiCurrent = ptiCurrent->ppi; ASSERT(ppiCurrent); + // ptiTo + if (IsThreadAttach(ptiCurrent)) + { + PTHREADINFO ptiFrom = IsThreadAttach(ptiCurrent); + TRACE_CH(UserThread,"Attached Thread ptiTo is getting switched!\n"); + UserAttachThreadInput(ptiFrom, ptiCurrent, FALSE); + } + + // ptiFrom + if (ptiCurrent->pqAttach && ptiCurrent->MessageQueue) + { + PTHREADINFO ptiTo; + ptiTo = PsGetThreadWin32Thread(ptiCurrent->MessageQueue->Thread); + TRACE_CH(UserThread,"Attached Thread ptiFrom is getting switched!\n"); + if (ptiTo) UserAttachThreadInput( ptiCurrent, ptiTo, FALSE); + else + { + // eThread maybe okay but Win32Thread already made NULL! + ERR_CH(UserThread,"Attached Thread ptiFrom did not switch due to ptiTo is NULL!\n"); + } + } + /* Decrement thread count and check if its 0 */ ppiCurrent->cThreads--; @@ -470,23 +492,6 @@ psle = PopEntryList(&ptiCurrent->ReferencesList); } - } - - // ptiTo - if (IsThreadAttach(ptiCurrent)) - { - PTHREADINFO ptiFrom = IsThreadAttach(ptiCurrent); - TRACE_CH(UserThread,"Attached Thread ptiTo is getting switched!\n"); - UserAttachThreadInput(ptiFrom, ptiCurrent, FALSE); - } - - // ptiFrom - if (ptiCurrent->pqAttach && ptiCurrent->MessageQueue) - { - PTHREADINFO ptiTo; - ptiTo = PsGetThreadWin32Thread(ptiCurrent->MessageQueue->Thread); - TRACE_CH(UserThread,"Attached Thread ptiFrom is getting switched!\n"); - UserAttachThreadInput( ptiCurrent, ptiTo, FALSE); } /* Free the message queue */ Modified: trunk/reactos/win32ss/user/ntuser/ntstubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/ntstub…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/ntstubs.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/ntstubs.c [iso-8859-1] Sat Aug 18 22:13:38 2012 @@ -34,6 +34,7 @@ BOOL Ret = FALSE; UserEnterExclusive(); + ERR("Enter NtUserAttachThreadInput %s\n",(fAttach ? "TRUE" : "FALSE" )); Status = PsLookupThreadByThreadId((HANDLE)idAttach, &Thread); if (!NT_SUCCESS(Status)) { @@ -53,9 +54,15 @@ ObDereferenceObject(Thread); ObDereferenceObject(ThreadTo); - Ret = UserAttachThreadInput( pti, ptiTo, fAttach); + Status = UserAttachThreadInput( pti, ptiTo, fAttach); + if (!NT_SUCCESS(Status)) + { + EngSetLastError(RtlNtStatusToDosError(Status)); + } + else Ret = TRUE; Exit: + ERR("Leave NtUserAttachThreadInput, ret=%d\n",Ret); UserLeave(); return Ret; }
12 years, 4 months
1
0
0
0
[jimtabor] 57102: [NtUser] - Use thread information pointer instead if the message queue.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Aug 18 21:47:42 2012 New Revision: 57102 URL:
http://svn.reactos.org/svn/reactos?rev=57102&view=rev
Log: [NtUser] - Use thread information pointer instead if the message queue. Modified: trunk/reactos/win32ss/user/ntuser/main.c trunk/reactos/win32ss/user/ntuser/msgqueue.c trunk/reactos/win32ss/user/ntuser/msgqueue.h Modified: trunk/reactos/win32ss/user/ntuser/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/main.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/main.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/main.c [iso-8859-1] Sat Aug 18 21:47:42 2012 @@ -270,7 +270,7 @@ ptiCurrent->ptiSibling = ptiCurrent->ppi->ptiList; ptiCurrent->ppi->ptiList = ptiCurrent; ptiCurrent->ppi->cThreads++; - ptiCurrent->MessageQueue = MsqCreateMessageQueue(Thread); + ptiCurrent->MessageQueue = MsqCreateMessageQueue(ptiCurrent); if(ptiCurrent->MessageQueue == NULL) { ERR_CH(UserThread,"Failed to allocate message loop\n"); Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgque…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] Sat Aug 18 21:47:42 2012 @@ -1859,11 +1859,13 @@ } BOOLEAN FASTCALL -MsqInitializeMessageQueue(struct _ETHREAD *Thread, PUSER_MESSAGE_QUEUE MessageQueue) -{ +MsqInitializeMessageQueue(PTHREADINFO pti, PUSER_MESSAGE_QUEUE MessageQueue) +{ + struct _ETHREAD *Thread; LARGE_INTEGER LargeTickCount; NTSTATUS Status; + Thread = pti->pEThread; MessageQueue->Thread = Thread; MessageQueue->CaretInfo = (PTHRDCARETINFO)(MessageQueue + 1); InitializeListHead(&MessageQueue->PostedMessagesListHead); @@ -2061,7 +2063,7 @@ } PUSER_MESSAGE_QUEUE FASTCALL -MsqCreateMessageQueue(struct _ETHREAD *Thread) +MsqCreateMessageQueue(PTHREADINFO pti) { PUSER_MESSAGE_QUEUE MessageQueue; @@ -2078,7 +2080,7 @@ /* hold at least one reference until it'll be destroyed */ IntReferenceMessageQueue(MessageQueue); /* initialize the queue */ - if (!MsqInitializeMessageQueue(Thread, MessageQueue)) + if (!MsqInitializeMessageQueue(pti, MessageQueue)) { IntDereferenceMessageQueue(MessageQueue); return NULL; Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgque…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/msgqueue.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/msgqueue.h [iso-8859-1] Sat Aug 18 21:47:42 2012 @@ -181,8 +181,8 @@ IN UINT MsgFilterLow, IN UINT MsgFilterHigh, OUT MSG* pMsg); -BOOLEAN FASTCALL MsqInitializeMessageQueue(struct _ETHREAD *Thread, PUSER_MESSAGE_QUEUE MessageQueue); -PUSER_MESSAGE_QUEUE FASTCALL MsqCreateMessageQueue(struct _ETHREAD *Thread); +BOOLEAN FASTCALL MsqInitializeMessageQueue(PTHREADINFO, PUSER_MESSAGE_QUEUE); +PUSER_MESSAGE_QUEUE FASTCALL MsqCreateMessageQueue(PTHREADINFO); VOID FASTCALL MsqDestroyMessageQueue(PTHREADINFO); INIT_FUNCTION NTSTATUS NTAPI MsqInitializeImpl(VOID); BOOLEAN FASTCALL co_MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue);
12 years, 4 months
1
0
0
0
[jimtabor] 57101: [NtUser] - Stop spurious window handle errors and code fixes.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Aug 18 21:40:49 2012 New Revision: 57101 URL:
http://svn.reactos.org/svn/reactos?rev=57101&view=rev
Log: [NtUser] - Stop spurious window handle errors and code fixes. Modified: trunk/reactos/win32ss/user/ntuser/caret.c Modified: trunk/reactos/win32ss/user/ntuser/caret.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/caret.…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/caret.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/caret.c [iso-8859-1] Sat Aug 18 21:40:49 2012 @@ -42,14 +42,17 @@ if(!ThreadQueue || !ThreadQueue->CaretInfo) return FALSE; - pWnd = UserGetWindowObject(ThreadQueue->CaretInfo->hWnd); co_IntHideCaret(ThreadQueue->CaretInfo); ThreadQueue->CaretInfo->Bitmap = (HBITMAP)0; ThreadQueue->CaretInfo->hWnd = (HWND)0; ThreadQueue->CaretInfo->Size.cx = ThreadQueue->CaretInfo->Size.cy = 0; ThreadQueue->CaretInfo->Showing = 0; ThreadQueue->CaretInfo->Visible = 0; - IntNotifyWinEvent(EVENT_OBJECT_DESTROY, pWnd, OBJID_CARET, CHILDID_SELF, 0); + if (ThreadQueue->CaretInfo->hWnd) + { + pWnd = UserGetWindowObject(ThreadQueue->CaretInfo->hWnd); + IntNotifyWinEvent(EVENT_OBJECT_DESTROY, pWnd, OBJID_CARET, CHILDID_SELF, 0); + } return TRUE; } @@ -90,7 +93,7 @@ ThreadQueue->CaretInfo->Pos.x = X; ThreadQueue->CaretInfo->Pos.y = Y; co_IntSendMessage(ThreadQueue->CaretInfo->hWnd, WM_SYSTIMER, IDCARETTIMER, 0); - IntSetTimer(UserGetWindowObject(ThreadQueue->CaretInfo->hWnd), IDCARETTIMER, gpsi->dtCaretBlink, NULL, TMRF_SYSTEM); + IntSetTimer(pWnd, IDCARETTIMER, gpsi->dtCaretBlink, NULL, TMRF_SYSTEM); IntNotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, pWnd, OBJID_CARET, CHILDID_SELF, 0); } return TRUE; @@ -179,8 +182,8 @@ BOOL FASTCALL co_UserShowCaret(PWND Window OPTIONAL) { PTHREADINFO pti; - PWND pWnd; - PUSER_MESSAGE_QUEUE ThreadQueue; + PUSER_MESSAGE_QUEUE ThreadQueue; + PWND pWnd = NULL; if (Window) ASSERT_REFS_CO(Window); @@ -199,16 +202,16 @@ return FALSE; } - if(!ThreadQueue->CaretInfo->Visible) + if(!ThreadQueue->CaretInfo->Visible && ThreadQueue->CaretInfo->hWnd) { ThreadQueue->CaretInfo->Visible = 1; - if(!ThreadQueue->CaretInfo->Showing) + pWnd = UserGetWindowObject(ThreadQueue->CaretInfo->hWnd); + if (!ThreadQueue->CaretInfo->Showing) { - pWnd = UserGetWindowObject(ThreadQueue->CaretInfo->hWnd); co_IntSendMessage(ThreadQueue->CaretInfo->hWnd, WM_SYSTIMER, IDCARETTIMER, 0); IntNotifyWinEvent(EVENT_OBJECT_SHOW, pWnd, OBJID_CARET, OBJID_CARET, 0); } - IntSetTimer(UserGetWindowObject(ThreadQueue->CaretInfo->hWnd), IDCARETTIMER, gpsi->dtCaretBlink, NULL, TMRF_SYSTEM); + IntSetTimer(pWnd, IDCARETTIMER, gpsi->dtCaretBlink, NULL, TMRF_SYSTEM); } return TRUE; } @@ -248,8 +251,7 @@ if (ThreadQueue->CaretInfo->Visible) { - PWND pwnd = UserGetWindowObject(hWnd); - IntKillTimer(pwnd, IDCARETTIMER, TRUE); + IntKillTimer(Window, IDCARETTIMER, TRUE); co_IntHideCaret(ThreadQueue->CaretInfo); }
12 years, 4 months
1
0
0
0
[jimtabor] 57100: [Win32SS] - Do not register classes in case of errors at startup. - Fix desktop background.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Aug 18 21:35:35 2012 New Revision: 57100 URL:
http://svn.reactos.org/svn/reactos?rev=57100&view=rev
Log: [Win32SS] - Do not register classes in case of errors at startup. - Fix desktop background. Modified: trunk/reactos/win32ss/user/ntuser/class.c trunk/reactos/win32ss/user/user32/windows/class.c Modified: trunk/reactos/win32ss/user/ntuser/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/class.…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] Sat Aug 18 21:35:35 2012 @@ -13,10 +13,10 @@ { { ((PWSTR)((ULONG_PTR)(WORD)(0x8001))), CS_GLOBALCLASS|CS_DBLCLKS, - NULL, - 0, + NULL, // Use User32 procs + sizeof(ULONG)*2, (HICON)IDC_ARROW, - (HBRUSH)(COLOR_BACKGROUND + 1), + (HBRUSH)(COLOR_BACKGROUND), FNID_DESKTOP, ICLS_DESKTOP }, @@ -47,6 +47,17 @@ FNID_SCROLLBAR, ICLS_SCROLLBAR }, +#if 0 + { ((PWSTR)((ULONG_PTR)(WORD)(0x8006))), // Tooltips + CS_PARENTDC|CS_DBLCLKS, + NULL, // Use User32 procs + 0, + (HICON)IDC_ARROW, + 0, + FNID_TOOLTIPS, + ICLS_TOOLTIPS + }, +#endif { ((PWSTR)((ULONG_PTR)(WORD)(0x8004))), // IconTitle is here for now... 0, NULL, // Use User32 procs @@ -1948,6 +1959,7 @@ WNDCLASSEXW wc; PCLS Class; BOOL Ret = TRUE; + HBRUSH hBrush; DWORD Flags = 0; if (ppi->W32PF_flags & W32PF_CLASSESREGISTERED) @@ -1992,7 +2004,12 @@ wc.cbWndExtra = DefaultServerClasses[i].ExtraBytes; wc.hIcon = NULL; wc.hCursor = DefaultServerClasses[i].hCursor; - wc.hbrBackground = DefaultServerClasses[i].hBrush; + hBrush = DefaultServerClasses[i].hBrush; + if (hBrush <= (HBRUSH)COLOR_MENUBAR) + { + hBrush = IntGetSysColorBrush((INT)hBrush); + } + wc.hbrBackground = hBrush; wc.lpszMenuName = NULL; wc.lpszClassName = ClassName.Buffer; wc.hIconSm = NULL; Modified: trunk/reactos/win32ss/user/user32/windows/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/class.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/class.c [iso-8859-1] Sat Aug 18 21:35:35 2012 @@ -210,24 +210,24 @@ return FALSE; } + if (IS_ATOM(lpszClass)) + { + ClassName.Buffer = (PWSTR)((ULONG_PTR)lpszClass); + } + else + { + if (!RtlCreateUnicodeStringFromAsciiz(&ClassName, + lpszClass)) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + } + if (!RegisterDefaultClasses) { ERR("GetClassInfoExA RegisterSystemControls\n"); RegisterSystemControls(); - } - - if (IS_ATOM(lpszClass)) - { - ClassName.Buffer = (PWSTR)((ULONG_PTR)lpszClass); - } - else - { - if (!RtlCreateUnicodeStringFromAsciiz(&ClassName, - lpszClass)) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } } Ret = NtUserGetClassInfo(hInstance, @@ -289,20 +289,20 @@ return FALSE; } + if (IS_ATOM(lpszClass)) + { + ClassName.Buffer = (PWSTR)((ULONG_PTR)lpszClass); + } + else + { + RtlInitUnicodeString(&ClassName, + lpszClass); + } + if (!RegisterDefaultClasses) { ERR("GetClassInfoExW RegisterSystemControls\n"); RegisterSystemControls(); - } - - if (IS_ATOM(lpszClass)) - { - ClassName.Buffer = (PWSTR)((ULONG_PTR)lpszClass); - } - else - { - RtlInitUnicodeString(&ClassName, - lpszClass); } Ret = NtUserGetClassInfo( hInstance,
12 years, 4 months
1
0
0
0
[tkreuzer] 57099: [NDK] Fix a typo
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Aug 18 19:24:38 2012 New Revision: 57099 URL:
http://svn.reactos.org/svn/reactos?rev=57099&view=rev
Log: [NDK] Fix a typo Modified: trunk/reactos/include/ndk/umtypes.h Modified: trunk/reactos/include/ndk/umtypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/umtypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/umtypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/umtypes.h [iso-8859-1] Sat Aug 18 19:24:38 2012 @@ -54,7 +54,7 @@ #ifndef _MANAGED #if defined(_M_IX86) #ifndef FASTCALL -#define FASTCALL _fastcall +#define FASTCALL __fastcall #endif #else #define FASTCALL @@ -159,8 +159,8 @@ USHORT Length; USHORT MaximumLength; ULONG Buffer; -} STRING32, *PSTRING32, - UNICODE_STRING32, *PUNICODE_STRING32, +} STRING32, *PSTRING32, + UNICODE_STRING32, *PUNICODE_STRING32, ANSI_STRING32, *PANSI_STRING32; typedef struct _STRING64 { @@ -168,7 +168,7 @@ USHORT MaximumLength; ULONGLONG Buffer; } STRING64, *PSTRING64, - UNICODE_STRING64, *PUNICODE_STRING64, + UNICODE_STRING64, *PUNICODE_STRING64, ANSI_STRING64, *PANSI_STRING64;
12 years, 4 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
20
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Results per page:
10
25
50
100
200