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
December 2018
----- 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
322 discussions
Start a n
N
ew thread
[reactos] 01/01: [UMPNPMGR] PNP_GetDeviceListSize: Implement the buffer size calculation for given enumerators and take care of the terminating double Unicode null character.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7c66247343697b5f1fe67…
commit 7c66247343697b5f1fe67207f850d1d88f232932 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Dec 30 00:39:08 2018 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun Dec 30 09:06:59 2018 +0100 [UMPNPMGR] PNP_GetDeviceListSize: Implement the buffer size calculation for given enumerators and take care of the terminating double Unicode null character. --- base/services/umpnpmgr/umpnpmgr.c | 70 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/base/services/umpnpmgr/umpnpmgr.c b/base/services/umpnpmgr/umpnpmgr.c index 3c96571dad..bae7fdda21 100644 --- a/base/services/umpnpmgr/umpnpmgr.c +++ b/base/services/umpnpmgr/umpnpmgr.c @@ -746,12 +746,73 @@ GetDeviceInstanceListSize( RegCloseKey(hDeviceKey); /* Return the largest possible buffer size */ - *pulLength = (dwSubKeys * (wcslen(pszDevice) + 1 + dwMaxSubKeyLength + 1)) + 1; + *pulLength = dwSubKeys * (wcslen(pszDevice) + 1 + dwMaxSubKeyLength + 1); return CR_SUCCESS; } +static +CONFIGRET +GetEnumeratorInstanceListSize( + _In_ LPCWSTR pszEnumerator, + _Out_ PULONG pulLength) +{ + WCHAR szDeviceBuffer[MAX_DEVICE_ID_LEN]; + WCHAR szPathBuffer[512]; + HKEY hEnumeratorKey; + DWORD dwIndex, dwDeviceLength, dwBufferLength; + DWORD dwError; + CONFIGRET ret = CR_SUCCESS; + + *pulLength = 0; + + /* Open the enumerator key */ + dwError = RegOpenKeyExW(hEnumKey, + pszEnumerator, + 0, + KEY_ENUMERATE_SUB_KEYS, + &hEnumeratorKey); + if (dwError != ERROR_SUCCESS) + { + DPRINT("Failed to open the enumerator key (Error %lu)\n", dwError); + return CR_REGISTRY_ERROR; + } + + for (dwIndex = 0; ; dwIndex++) + { + dwDeviceLength = MAX_DEVICE_ID_LEN; + dwError = RegEnumKeyExW(hEnumeratorKey, + dwIndex, + szDeviceBuffer, + &dwDeviceLength, + NULL, + NULL, + NULL, + NULL); + if (dwError != ERROR_SUCCESS) + break; + + wsprintf(szPathBuffer, L"%s\\%s", pszEnumerator, szDeviceBuffer); + DPRINT("Path: %S\n", szPathBuffer); + + ret = GetDeviceInstanceListSize(szPathBuffer, &dwBufferLength); + if (ret != CR_SUCCESS) + { + *pulLength = 0; + break; + } + + *pulLength += dwBufferLength; + } + + /* Close the enumerator key */ + RegCloseKey(hEnumeratorKey); + + return ret; +} + + /* Function 11 */ DWORD WINAPI @@ -840,7 +901,8 @@ PNP_GetDeviceListSize( } else { - ret = CR_CALL_NOT_IMPLEMENTED; + ret = GetEnumeratorInstanceListSize(pszFilter, + pulLength); } } else /* CM_GETIDLIST_FILTER_NONE */ @@ -848,6 +910,10 @@ PNP_GetDeviceListSize( ret = CR_CALL_NOT_IMPLEMENTED; } + /* Add one character for the terminating double UNICODE_NULL */ + if (ret == CR_SUCCESS) + (*pulLength) += 1; + return ret; }
5 years, 11 months
1
0
0
0
[reactos] 01/01: [WIN32K:NTUSER] Reference menus owned by a popup menu. CORE-15504
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e3c8002dfc79e478a6d15…
commit e3c8002dfc79e478a6d156c52abd4e243d36d754 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Fri Dec 28 13:39:23 2018 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sun Dec 30 00:25:01 2018 +0100 [WIN32K:NTUSER] Reference menus owned by a popup menu. CORE-15504 --- win32ss/user/ntuser/menu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c index 6c825f3f10..0dc6bac375 100644 --- a/win32ss/user/ntuser/menu.c +++ b/win32ss/user/ntuser/menu.c @@ -4512,6 +4512,10 @@ PopupMenuWndProc( { CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam; pPopupMenu->spmenu = UserGetMenuObject(cs->lpCreateParams); + if (pPopupMenu->spmenu) + { + UserReferenceObject(pPopupMenu->spmenu); + } break; } @@ -4556,6 +4560,10 @@ PopupMenuWndProc( case WM_NCDESTROY: { + if (pPopupMenu->spmenu) + { + IntReleaseMenuObject(pPopupMenu->spmenu); + } DesktopHeapFree(Wnd->head.rpdesk, pPopupMenu ); ((PMENUWND)Wnd)->ppopupmenu = 0; Wnd->fnid = FNID_DESTROY; @@ -4571,6 +4579,11 @@ PopupMenuWndProc( ERR("Bad Menu Handle\n"); break; } + UserReferenceObject(pmenu); + if (pPopupMenu->spmenu) + { + IntReleaseMenuObject(pPopupMenu->spmenu); + } pPopupMenu->spmenu = pmenu; break; }
5 years, 12 months
1
0
0
0
[reactos] 01/01: [UMPNPMGR] PNP_GetDeviceList / PNP_GetDeviceListSize: Implement the buffer size calculation and device instance enumeration for a given enumerator and device name.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a9b88efa7c12334482fbc…
commit a9b88efa7c12334482fbc8ffb3b386bf8d316bf9 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Dec 29 22:08:35 2018 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sat Dec 29 22:13:32 2018 +0100 [UMPNPMGR] PNP_GetDeviceList / PNP_GetDeviceListSize: Implement the buffer size calculation and device instance enumeration for a given enumerator and device name. --- base/services/umpnpmgr/umpnpmgr.c | 265 ++++++++++++++++++++++++++++++-------- 1 file changed, 214 insertions(+), 51 deletions(-) diff --git a/base/services/umpnpmgr/umpnpmgr.c b/base/services/umpnpmgr/umpnpmgr.c index 94bc37e914..3c96571dad 100644 --- a/base/services/umpnpmgr/umpnpmgr.c +++ b/base/services/umpnpmgr/umpnpmgr.c @@ -184,6 +184,53 @@ NtStatusToCrError(NTSTATUS Status) } +static VOID +SplitDeviceInstanceID(IN LPWSTR pszDeviceInstanceID, + OUT LPWSTR pszEnumerator, + OUT LPWSTR pszDevice, + OUT LPWSTR pszInstance) +{ + WCHAR szLocalDeviceInstanceID[MAX_DEVICE_ID_LEN]; + LPWSTR lpEnumerator = NULL; + LPWSTR lpDevice = NULL; + LPWSTR lpInstance = NULL; + LPWSTR ptr; + + wcscpy(szLocalDeviceInstanceID, pszDeviceInstanceID); + + *pszEnumerator = 0; + *pszDevice = 0; + *pszInstance = 0; + + lpEnumerator = szLocalDeviceInstanceID; + + ptr = wcschr(lpEnumerator, L'\\'); + if (ptr != NULL) + { + *ptr = 0; + lpDevice = ++ptr; + + ptr = wcschr(lpDevice, L'\\'); + if (ptr != NULL) + { + *ptr = 0; + lpInstance = ++ptr; + } + } + + if (lpEnumerator != NULL) + wcscpy(pszEnumerator, lpEnumerator); + + if (lpDevice != NULL) + wcscpy(pszDevice, lpDevice); + + if (lpInstance != NULL) + wcscpy(pszInstance, lpInstance); +} + + +/* PUBLIC FUNCTIONS **********************************************************/ + /* Function 0 */ DWORD WINAPI @@ -482,6 +529,77 @@ PNP_EnumerateSubKeys( } +static +CONFIGRET +GetDeviceInstanceList( + _In_ PWSTR pszDevice, + _Inout_ PWSTR pszBuffer, + _Inout_ PDWORD pulLength) +{ + WCHAR szInstanceBuffer[MAX_DEVICE_ID_LEN]; + WCHAR szPathBuffer[512]; + HKEY hDeviceKey; + DWORD dwInstanceLength, dwPathLength, dwUsedLength; + DWORD dwIndex, dwError; + PWSTR pPtr; + CONFIGRET ret = CR_SUCCESS; + + dwError = RegOpenKeyExW(hEnumKey, + pszDevice, + 0, + KEY_ENUMERATE_SUB_KEYS, + &hDeviceKey); + if (dwError != ERROR_SUCCESS) + { + DPRINT("Failed to open the device key (Error %lu)\n", dwError); + return CR_REGISTRY_ERROR; + } + + dwUsedLength = 0; + pPtr = pszBuffer; + + for (dwIndex = 0; ; dwIndex++) + { + dwInstanceLength = MAX_DEVICE_ID_LEN; + dwError = RegEnumKeyExW(hDeviceKey, + dwIndex, + szInstanceBuffer, + &dwInstanceLength, + NULL, + NULL, + NULL, + NULL); + if (dwError != ERROR_SUCCESS) + break; + + wsprintf(szPathBuffer, L"%s\\%s", pszDevice, szInstanceBuffer); + DPRINT("Path: %S\n", szPathBuffer); + + dwPathLength = wcslen(szPathBuffer) + 1; + if (dwUsedLength + dwPathLength + 1 > *pulLength) + { + ret = CR_BUFFER_SMALL; + break; + } + + wcscpy(pPtr, szPathBuffer); + dwUsedLength += dwPathLength; + pPtr += dwPathLength; + + *pPtr = UNICODE_NULL; + } + + RegCloseKey(hDeviceKey); + + if (ret == CR_SUCCESS) + *pulLength = dwUsedLength + 1; + else + *pulLength = 0; + + return ret; +} + + /* Function 10 */ DWORD WINAPI @@ -493,6 +611,9 @@ PNP_GetDeviceList( DWORD ulFlags) { PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA PlugPlayData; + WCHAR szEnumerator[MAX_DEVICE_ID_LEN]; + WCHAR szDevice[MAX_DEVICE_ID_LEN]; + WCHAR szInstance[MAX_DEVICE_ID_LEN]; CONFIGRET ret = CR_SUCCESS; NTSTATUS Status; @@ -501,11 +622,12 @@ PNP_GetDeviceList( if (ulFlags & ~CM_GETIDLIST_FILTER_BITS) return CR_INVALID_FLAG; - if (pulLength == NULL || pszFilter == NULL) + if (pulLength == NULL) return CR_INVALID_POINTER; -// if (Buffer == NULL) -// return CR_INVALID_POINTER; + if ((ulFlags != CM_GETIDLIST_FILTER_NONE) && + (pszFilter == NULL)) + return CR_INVALID_POINTER; if (ulFlags & (CM_GETIDLIST_FILTER_BUSRELATIONS | @@ -553,7 +675,21 @@ PNP_GetDeviceList( } else if (ulFlags & CM_GETIDLIST_FILTER_ENUMERATOR) { - ret = CR_CALL_NOT_IMPLEMENTED; + SplitDeviceInstanceID(pszFilter, + szEnumerator, + szDevice, + szInstance); + + if (*szEnumerator != UNICODE_NULL && *szDevice != UNICODE_NULL) + { + ret = GetDeviceInstanceList(pszFilter, + Buffer, + pulLength); + } + else + { + ret = CR_CALL_NOT_IMPLEMENTED; + } } else /* CM_GETIDLIST_FILTER_NONE */ { @@ -564,6 +700,58 @@ PNP_GetDeviceList( } +static +CONFIGRET +GetDeviceInstanceListSize( + _In_ LPCWSTR pszDevice, + _Out_ PULONG pulLength) +{ + HKEY hDeviceKey; + DWORD dwSubKeys, dwMaxSubKeyLength; + DWORD dwError; + + /* Open the device key */ + dwError = RegOpenKeyExW(hEnumKey, + pszDevice, + 0, + KEY_READ, + &hDeviceKey); + if (dwError != ERROR_SUCCESS) + { + DPRINT("Failed to open the device key (Error %lu)\n", dwError); + return CR_REGISTRY_ERROR; + } + + /* Retrieve the number of device instances and the maximum name length */ + dwError = RegQueryInfoKeyW(hDeviceKey, + NULL, + NULL, + NULL, + &dwSubKeys, + &dwMaxSubKeyLength, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL); + if (dwError != ERROR_SUCCESS) + { + DPRINT("RegQueryInfoKeyW failed (Error %lu)\n", dwError); + dwSubKeys = 0; + dwMaxSubKeyLength = 0; + } + + /* Close the device key */ + RegCloseKey(hDeviceKey); + + /* Return the largest possible buffer size */ + *pulLength = (dwSubKeys * (wcslen(pszDevice) + 1 + dwMaxSubKeyLength + 1)) + 1; + + return CR_SUCCESS; +} + + /* Function 11 */ DWORD WINAPI @@ -574,6 +762,9 @@ PNP_GetDeviceListSize( DWORD ulFlags) { PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA PlugPlayData; + WCHAR szEnumerator[MAX_DEVICE_ID_LEN]; + WCHAR szDevice[MAX_DEVICE_ID_LEN]; + WCHAR szInstance[MAX_DEVICE_ID_LEN]; CONFIGRET ret = CR_SUCCESS; NTSTATUS Status; @@ -582,7 +773,11 @@ PNP_GetDeviceListSize( if (ulFlags & ~CM_GETIDLIST_FILTER_BITS) return CR_INVALID_FLAG; - if (pulLength == NULL || pszFilter == NULL) + if (pulLength == NULL) + return CR_INVALID_POINTER; + + if ((ulFlags != CM_GETIDLIST_FILTER_NONE) && + (pszFilter == NULL)) return CR_INVALID_POINTER; *pulLength = 0; @@ -633,7 +828,20 @@ PNP_GetDeviceListSize( } else if (ulFlags & CM_GETIDLIST_FILTER_ENUMERATOR) { - ret = CR_CALL_NOT_IMPLEMENTED; + SplitDeviceInstanceID(pszFilter, + szEnumerator, + szDevice, + szInstance); + + if (*szEnumerator != UNICODE_NULL && *szDevice != UNICODE_NULL) + { + ret = GetDeviceInstanceListSize(pszFilter, + pulLength); + } + else + { + ret = CR_CALL_NOT_IMPLEMENTED; + } } else /* CM_GETIDLIST_FILTER_NONE */ { @@ -1630,51 +1838,6 @@ done: } -static VOID -SplitDeviceInstanceID(IN LPWSTR pszDeviceInstanceID, - OUT LPWSTR pszEnumerator, - OUT LPWSTR pszDevice, - OUT LPWSTR pszInstance) -{ - WCHAR szLocalDeviceInstanceID[MAX_DEVICE_ID_LEN]; - LPWSTR lpEnumerator = NULL; - LPWSTR lpDevice = NULL; - LPWSTR lpInstance = NULL; - LPWSTR ptr; - - wcscpy(szLocalDeviceInstanceID, pszDeviceInstanceID); - - *pszEnumerator = 0; - *pszDevice = 0; - *pszInstance = 0; - - lpEnumerator = szLocalDeviceInstanceID; - - ptr = wcschr(lpEnumerator, L'\\'); - if (ptr != NULL) - { - *ptr = 0; - lpDevice = ++ptr; - - ptr = wcschr(lpDevice, L'\\'); - if (ptr != NULL) - { - *ptr = 0; - lpInstance = ++ptr; - } - } - - if (lpEnumerator != NULL) - wcscpy(pszEnumerator, lpEnumerator); - - if (lpDevice != NULL) - wcscpy(pszDevice, lpDevice); - - if (lpInstance != NULL) - wcscpy(pszInstance, lpInstance); -} - - static CONFIGRET CreateDeviceInstance(LPWSTR pszDeviceID) {
5 years, 12 months
1
0
0
0
[reactos] 01/01: [ADVAPI32_APITEST] Unknown field isn't that unknown and should contain "1"
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=830f2998abf17123f3b01…
commit 830f2998abf17123f3b0126733cb4f49282ca1fe Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Dec 29 22:09:52 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Dec 29 22:09:52 2018 +0100 [ADVAPI32_APITEST] Unknown field isn't that unknown and should contain "1" See processhacker source code (as reference) --- modules/rostests/apitests/advapi32/ServiceEnv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/rostests/apitests/advapi32/ServiceEnv.c b/modules/rostests/apitests/advapi32/ServiceEnv.c index f71d25541d..cfb7318b4f 100644 --- a/modules/rostests/apitests/advapi32/ServiceEnv.c +++ b/modules/rostests/apitests/advapi32/ServiceEnv.c @@ -113,19 +113,20 @@ service_main(DWORD dwArgc, LPWSTR* lpszArgv) { /* IN/OUT parameter structure for I_QueryTagInformation() function * See:
https://wj32.org/wp/2010/03/30/howto-use-i_querytaginformation/
+ * See:
https://github.com/processhacker/processhacker/blob/master/phnt/include/sub…
*/ struct { ULONG ProcessId; PVOID ServiceTag; - ULONG Unknown; + ULONG TagType; PWSTR Buffer; } ServiceQuery; /* Set our input parameters */ ServiceQuery.ProcessId = GetCurrentProcessId(); ServiceQuery.ServiceTag = Teb->SubProcessTag; - ServiceQuery.Unknown = 0; + ServiceQuery.TagType = 0; ServiceQuery.Buffer = NULL; /* Call ADVAPI32 to query the correctness of our tag */ _I_QueryTagInformation(NULL, 1, &ServiceQuery); @@ -135,6 +136,7 @@ service_main(DWORD dwArgc, LPWSTR* lpszArgv) { /* It should match our service name */ service_ok(wcscmp(lpszArgv[0], ServiceQuery.Buffer) == 0, "Mismatching info: %S - %S\n", lpszArgv[0], ServiceQuery.Buffer); + service_ok(ServiceQuery.TagType == 1, "Invalid tag type: %x\n", ServiceQuery.TagType); LocalFree(ServiceQuery.Buffer); } }
5 years, 12 months
1
0
0
0
[reactos] 01/01: [CABMAN] Fix a problem with creating temp files on some Windows system
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bcb0d7c6c9f5577a64e5a…
commit bcb0d7c6c9f5577a64e5abdc3c1cedd95eeff6a3 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Tue Apr 3 21:25:04 2018 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Dec 29 21:37:42 2018 +0100 [CABMAN] Fix a problem with creating temp files on some Windows system --- sdk/tools/cabman/CCFDATAStorage.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sdk/tools/cabman/CCFDATAStorage.cxx b/sdk/tools/cabman/CCFDATAStorage.cxx index 1d7ef5e64f..b02551fbe7 100644 --- a/sdk/tools/cabman/CCFDATAStorage.cxx +++ b/sdk/tools/cabman/CCFDATAStorage.cxx @@ -56,7 +56,12 @@ CCFDATAStorage::~CCFDATAStorage() ULONG CCFDATAStorage::Create() { if ((FileHandle = tmpfile()) == NULL) - return CAB_STATUS_CANNOT_CREATE; + { + /* Workaround for breakage on some Windows system */ + FileHandle = fopen(tmpnam(NULL) + 1, "wb"); + if (FileHandle == NULL) + return CAB_STATUS_CANNOT_CREATE; + } return CAB_STATUS_SUCCESS; }
5 years, 12 months
1
0
0
0
[reactos] 01/01: [FONT][WIN32SS] Re-add casts for gcc
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=86ea03bf51528bde888d1…
commit 86ea03bf51528bde888d1ad8d04821bbb0b2cf2b Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Dec 29 20:03:06 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Dec 29 20:06:04 2018 +0100 [FONT][WIN32SS] Re-add casts for gcc --- win32ss/gdi/ntgdi/freetype.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 309774c6ef..3ac442e4ef 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -256,7 +256,7 @@ RemoveCachedEntry(PFONT_CACHE_ENTRY Entry) { ASSERT_FREETYPE_LOCK_HELD(); - FT_Done_Glyph(Entry->BitmapGlyph); + FT_Done_Glyph((FT_Glyph)Entry->BitmapGlyph); RemoveEntryList(&Entry->ListEntry); ExFreePoolWithTag(Entry, TAG_FONT); g_FontCacheNumEntries--; @@ -2950,7 +2950,7 @@ ftGdiGlyphSet( if (FT_Bitmap_Convert(GlyphSlot->library, &BitmapGlyph->bitmap, &AlignedBitmap, 4)) { DPRINT1("Conversion failed\n"); - FT_Done_Glyph(BitmapGlyph); + FT_Done_Glyph((FT_Glyph)BitmapGlyph); return NULL; } @@ -3007,7 +3007,7 @@ ftGdiGlyphCacheSet( DPRINT1("Conversion failed\n"); ExFreePoolWithTag(NewEntry, TAG_FONT); FT_Bitmap_Done(GlyphSlot->library, &AlignedBitmap); - FT_Done_Glyph(BitmapGlyph); + FT_Done_Glyph((FT_Glyph)BitmapGlyph); return NULL; } @@ -4091,7 +4091,7 @@ TextIntGetTextExtentPoint(PDC dc, /* Bold and italic do not use the cache */ if (EmuBold || EmuItalic) { - FT_Done_Glyph(realglyph); + FT_Done_Glyph((FT_Glyph)realglyph); } previous = glyph_index; @@ -5876,7 +5876,7 @@ GreExtTextOutW( previous = glyph_index; - FT_Done_Glyph(realglyph); + FT_Done_Glyph((FT_Glyph)realglyph); } TextWidth = TextLeft - RealXStart; @@ -6053,7 +6053,7 @@ GreExtTextOutW( bResult = FALSE; if (EmuBold || EmuItalic) { - FT_Done_Glyph(realglyph); + FT_Done_Glyph((FT_Glyph)realglyph); } break; @@ -6066,7 +6066,7 @@ GreExtTextOutW( bResult = FALSE; if (EmuBold || EmuItalic) { - FT_Done_Glyph(realglyph); + FT_Done_Glyph((FT_Glyph)realglyph); } break; @@ -6119,7 +6119,7 @@ GreExtTextOutW( { if (EmuBold || EmuItalic) { - FT_Done_Glyph(realglyph); + FT_Done_Glyph((FT_Glyph)realglyph); } break; @@ -6195,7 +6195,7 @@ GreExtTextOutW( /* No cache, so clean up */ if (EmuBold || EmuItalic) { - FT_Done_Glyph(realglyph); + FT_Done_Glyph((FT_Glyph)realglyph); } }
5 years, 12 months
1
0
0
0
[reactos] 07/07: [FONT][WIN32SS] Remove casts
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=85db46d75cb302c484306…
commit 85db46d75cb302c4843066b1af536f474940ea5b Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Dec 29 19:46:37 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Dec 29 19:47:00 2018 +0100 [FONT][WIN32SS] Remove casts --- win32ss/gdi/ntgdi/freetype.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 93abca4f90..309774c6ef 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -256,7 +256,7 @@ RemoveCachedEntry(PFONT_CACHE_ENTRY Entry) { ASSERT_FREETYPE_LOCK_HELD(); - FT_Done_Glyph((FT_Glyph)Entry->BitmapGlyph); + FT_Done_Glyph(Entry->BitmapGlyph); RemoveEntryList(&Entry->ListEntry); ExFreePoolWithTag(Entry, TAG_FONT); g_FontCacheNumEntries--; @@ -2950,7 +2950,7 @@ ftGdiGlyphSet( if (FT_Bitmap_Convert(GlyphSlot->library, &BitmapGlyph->bitmap, &AlignedBitmap, 4)) { DPRINT1("Conversion failed\n"); - FT_Done_Glyph((FT_Glyph)BitmapGlyph); + FT_Done_Glyph(BitmapGlyph); return NULL; } @@ -3007,7 +3007,7 @@ ftGdiGlyphCacheSet( DPRINT1("Conversion failed\n"); ExFreePoolWithTag(NewEntry, TAG_FONT); FT_Bitmap_Done(GlyphSlot->library, &AlignedBitmap); - FT_Done_Glyph((FT_Glyph)BitmapGlyph); + FT_Done_Glyph(BitmapGlyph); return NULL; } @@ -4088,10 +4088,10 @@ TextIntGetTextExtentPoint(PDC dc, Dx[i] = (TotalWidth + 32) >> 6; } + /* Bold and italic do not use the cache */ if (EmuBold || EmuItalic) { - FT_Done_Glyph((FT_Glyph)realglyph); - realglyph = NULL; + FT_Done_Glyph(realglyph); } previous = glyph_index; @@ -6192,10 +6192,10 @@ GreExtTextOutW( previous = glyph_index; + /* No cache, so clean up */ if (EmuBold || EmuItalic) { - FT_Done_Glyph((FT_Glyph)realglyph); - realglyph = NULL; + FT_Done_Glyph(realglyph); } }
5 years, 12 months
1
0
0
0
[reactos] 06/07: [FONT][WIN32SS] Hold the freetype lock while accessing freetype data
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=971c657b80fd4eb684a98…
commit 971c657b80fd4eb684a983a5dc9be217e9fe6845 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Dec 29 19:46:14 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Dec 29 19:47:00 2018 +0100 [FONT][WIN32SS] Hold the freetype lock while accessing freetype data --- win32ss/gdi/ntgdi/freetype.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 08d164a2eb..93abca4f90 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -6798,8 +6798,12 @@ NtGdiGetGlyphIndicesW( FT_Face Face = FontGDI->SharedFace->Face; if (FT_IS_SFNT(Face)) { - TT_OS2 *pOS2 = FT_Get_Sfnt_Table(Face, ft_sfnt_os2); + TT_OS2 *pOS2; + + IntLockFreeType(); + pOS2 = FT_Get_Sfnt_Table(Face, ft_sfnt_os2); DefChar = (pOS2->usDefaultChar ? get_glyph_index(Face, pOS2->usDefaultChar) : 0); + IntUnLockFreeType(); } else {
5 years, 12 months
1
0
0
0
[reactos] 05/07: [FONT][WIN32SS] Fix a memory leak
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2e44e5ce54ea67a6cc290…
commit 2e44e5ce54ea67a6cc29003a72500f05ebad7a43 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Dec 29 19:46:04 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Dec 29 19:47:00 2018 +0100 [FONT][WIN32SS] Fix a memory leak --- win32ss/gdi/ntgdi/freetype.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index e24e79cc22..08d164a2eb 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -6050,8 +6050,12 @@ GreExtTextOutW( if ( !HSourceGlyph ) { DPRINT1("WARNING: EngCreateBitmap() failed!\n"); - // FT_Done_Glyph(realglyph); bResult = FALSE; + if (EmuBold || EmuItalic) + { + FT_Done_Glyph(realglyph); + } + break; } SourceGlyphSurf = EngLockSurface((HSURF)HSourceGlyph); @@ -6060,6 +6064,11 @@ GreExtTextOutW( EngDeleteSurface((HSURF)HSourceGlyph); DPRINT1("WARNING: EngLockSurface() failed!\n"); bResult = FALSE; + if (EmuBold || EmuItalic) + { + FT_Done_Glyph(realglyph); + } + break; } @@ -6108,6 +6117,11 @@ GreExtTextOutW( if (DoBreak) { + if (EmuBold || EmuItalic) + { + FT_Done_Glyph(realglyph); + } + break; }
5 years, 12 months
1
0
0
0
[reactos] 04/07: [FONT][WIN32SS] Fix a memory leak
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1f13b95e5bea92843f2fb…
commit 1f13b95e5bea92843f2fb27ee5dda9aa7e29b7b5 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Dec 29 19:45:37 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Dec 29 19:47:00 2018 +0100 [FONT][WIN32SS] Fix a memory leak --- win32ss/gdi/ntgdi/freetype.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 58a81dc2b6..e24e79cc22 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -5876,11 +5876,7 @@ GreExtTextOutW( previous = glyph_index; - if (EmuBold || EmuItalic) - { - FT_Done_Glyph((FT_Glyph)realglyph); - realglyph = NULL; - } + FT_Done_Glyph(realglyph); } TextWidth = TextLeft - RealXStart;
5 years, 12 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
33
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
Results per page:
10
25
50
100
200