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
November 2019
----- 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
24 participants
322 discussions
Start a n
N
ew thread
[reactos] 01/01: [MAPI32] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9d3a9694f436ea650135e…
commit 9d3a9694f436ea650135e2710da881d561b0ea7e Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:50:53 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:50:53 2019 +0100 [MAPI32] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/mapi32/precomp.h | 4 +--- dll/win32/mapi32/prop.c | 19 +++++++++---------- dll/win32/mapi32/sendmail.c | 2 -- dll/win32/mapi32/util.c | 9 ++++----- media/doc/README.WINE | 2 +- 5 files changed, 15 insertions(+), 21 deletions(-) diff --git a/dll/win32/mapi32/precomp.h b/dll/win32/mapi32/precomp.h index 36a4771cbb2..d85166d9a1d 100644 --- a/dll/win32/mapi32/precomp.h +++ b/dll/win32/mapi32/precomp.h @@ -2,8 +2,6 @@ #ifndef _MAPI32_PCH_ #define _MAPI32_PCH_ -#include <wine/config.h> - #include <stdarg.h> #define WIN32_NO_STATUS @@ -17,12 +15,12 @@ #include <windef.h> #include <winbase.h> #include <winreg.h> +#include <winnls.h> #include <mapi.h> #include <mapival.h> #include <shlwapi.h> #include <wine/debug.h> -#include <wine/unicode.h> #include "util.h" diff --git a/dll/win32/mapi32/prop.c b/dll/win32/mapi32/prop.c index 03df644f212..b217035e2c0 100644 --- a/dll/win32/mapi32/prop.c +++ b/dll/win32/mapi32/prop.c @@ -29,7 +29,6 @@ #include "shlwapi.h" #include "wine/list.h" #include "wine/debug.h" -#include "wine/unicode.h" #include "mapival.h" WINE_DEFAULT_DEBUG_CHANNEL(mapi); @@ -91,7 +90,7 @@ SCODE WINAPI PropCopyMore(LPSPropValue lpDest, LPSPropValue lpSrc, memcpy(lpDest->Value.lpszA, lpSrc->Value.lpszA, ulLen); break; case PT_UNICODE: - ulLen = (strlenW(lpSrc->Value.lpszW) + 1u) * sizeof(WCHAR); + ulLen = (lstrlenW(lpSrc->Value.lpszW) + 1u) * sizeof(WCHAR); scode = lpMore(ulLen, lpOrig, (LPVOID*)&lpDest->Value.lpszW); if (SUCCEEDED(scode)) memcpy(lpDest->Value.lpszW, lpSrc->Value.lpszW, ulLen); @@ -156,7 +155,7 @@ SCODE WINAPI PropCopyMore(LPSPropValue lpDest, LPSPropValue lpSrc, for (i = 0; i < lpSrc->Value.MVszW.cValues; i++) { - ULONG ulStrLen = strlenW(lpSrc->Value.MVszW.lppszW[i]) + 1u; + ULONG ulStrLen = lstrlenW(lpSrc->Value.MVszW.lppszW[i]) + 1u; lpDest->Value.MVszW.lppszW[i] = lpNextStr; memcpy(lpNextStr, lpSrc->Value.MVszW.lppszW[i], ulStrLen * sizeof(WCHAR)); @@ -263,7 +262,7 @@ ULONG WINAPI UlPropSize(LPSPropValue lpProp) break; case PT_MV_UNICODE: ulRet = 0u; for (i = 0; i < lpProp->Value.MVszW.cValues; i++) - ulRet += (strlenW(lpProp->Value.MVszW.lppszW[i]) + 1u); + ulRet += (lstrlenW(lpProp->Value.MVszW.lppszW[i]) + 1u); ulRet *= sizeof(WCHAR); break; case PT_UNICODE: ulRet = (lstrlenW(lpProp->Value.lpszW) + 1u) * sizeof(WCHAR); @@ -504,7 +503,7 @@ LONG WINAPI LPropCompareProp(LPSPropValue lpPropLeft, LPSPropValue lpPropRight) case PT_STRING8: return lstrcmpA(lpPropLeft->Value.lpszA, lpPropRight->Value.lpszA); case PT_UNICODE: - return strcmpW(lpPropLeft->Value.lpszW, lpPropRight->Value.lpszW); + return lstrcmpW(lpPropLeft->Value.lpszW, lpPropRight->Value.lpszW); case PT_ERROR: if (lpPropLeft->Value.err > lpPropRight->Value.err) return 1; @@ -828,7 +827,7 @@ SCODE WINAPI ScCopyProps(int cValues, LPSPropValue lpProps, LPVOID lpDst, ULONG lpDataDest += ulLen; break; case PT_UNICODE: - ulLen = (strlenW(lpProps->Value.lpszW) + 1u) * sizeof(WCHAR); + ulLen = (lstrlenW(lpProps->Value.lpszW) + 1u) * sizeof(WCHAR); lpDest->Value.lpszW = (LPWSTR)lpDataDest; memcpy(lpDest->Value.lpszW, lpProps->Value.lpszW, ulLen); lpDataDest += ulLen; @@ -867,7 +866,7 @@ SCODE WINAPI ScCopyProps(int cValues, LPSPropValue lpProps, LPVOID lpDst, ULONG for (i = 0; i < lpProps->Value.MVszW.cValues; i++) { - ULONG ulStrLen = (strlenW(lpProps->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR); + ULONG ulStrLen = (lstrlenW(lpProps->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR); lpDest->Value.MVszW.lppszW[i] = (LPWSTR)lpDataDest; memcpy(lpDataDest, lpProps->Value.MVszW.lppszW[i], ulStrLen); @@ -981,7 +980,7 @@ SCODE WINAPI ScRelocProps(int cValues, LPSPropValue lpProps, LPVOID lpOld, ulLen = bBadPtr ? 0 : (lstrlenW(lpDest->Value.lpszW) + 1u) * sizeof(WCHAR); lpDest->Value.lpszW = (LPWSTR)RELOC_PTR(lpDest->Value.lpszW); if (bBadPtr) - ulLen = (strlenW(lpDest->Value.lpszW) + 1u) * sizeof(WCHAR); + ulLen = (lstrlenW(lpDest->Value.lpszW) + 1u) * sizeof(WCHAR); ulCount += ulLen; break; case PT_BINARY: @@ -1020,11 +1019,11 @@ SCODE WINAPI ScRelocProps(int cValues, LPSPropValue lpProps, LPVOID lpOld, for (i = 0; i < lpDest->Value.MVszW.cValues; i++) { - ULONG ulStrLen = bBadPtr ? 0 : (strlenW(lpDest->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR); + ULONG ulStrLen = bBadPtr ? 0 : (lstrlenW(lpDest->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR); lpDest->Value.MVszW.lppszW[i] = (LPWSTR)RELOC_PTR(lpDest->Value.MVszW.lppszW[i]); if (bBadPtr) - ulStrLen = (strlenW(lpDest->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR); + ulStrLen = (lstrlenW(lpDest->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR); ulCount += ulStrLen; } break; diff --git a/dll/win32/mapi32/sendmail.c b/dll/win32/mapi32/sendmail.c index 407dd130411..e1b7a682088 100644 --- a/dll/win32/mapi32/sendmail.c +++ b/dll/win32/mapi32/sendmail.c @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include <stdio.h> #include <stdarg.h> diff --git a/dll/win32/mapi32/util.c b/dll/win32/mapi32/util.c index 9c3b01944a5..7e324a0e650 100644 --- a/dll/win32/mapi32/util.c +++ b/dll/win32/mapi32/util.c @@ -33,7 +33,6 @@ #include "objbase.h" #include "shlwapi.h" #include "wine/debug.h" -#include "wine/unicode.h" #include "mapival.h" #include "xcmc.h" #include "msi.h" @@ -404,7 +403,7 @@ VOID WINAPI SwapPword(PUSHORT lpData, ULONG ulLen) ULONG WINAPI MNLS_lstrlenW(LPCWSTR lpszStr) { TRACE("(%s)\n", debugstr_w(lpszStr)); - return strlenW(lpszStr); + return lstrlenW(lpszStr); } /************************************************************************* @@ -423,7 +422,7 @@ ULONG WINAPI MNLS_lstrlenW(LPCWSTR lpszStr) INT WINAPI MNLS_lstrcmpW(LPCWSTR lpszLeft, LPCWSTR lpszRight) { TRACE("(%s,%s)\n", debugstr_w(lpszLeft), debugstr_w(lpszRight)); - return strcmpW(lpszLeft, lpszRight); + return lstrcmpW(lpszLeft, lpszRight); } /************************************************************************* @@ -443,7 +442,7 @@ ULONG WINAPI MNLS_lstrcpyW(LPWSTR lpszDest, LPCWSTR lpszSrc) ULONG len; TRACE("(%p,%s)\n", lpszDest, debugstr_w(lpszSrc)); - len = (strlenW(lpszSrc) + 1) * sizeof(WCHAR); + len = (lstrlenW(lpszSrc) + 1) * sizeof(WCHAR); memcpy(lpszDest, lpszSrc, len); return len; } @@ -494,7 +493,7 @@ BOOL WINAPI FEqualNames(LPMAPINAMEID lpName1, LPMAPINAMEID lpName2) return FALSE; if (lpName1->ulKind == MNID_STRING) - return !strcmpW(lpName1->Kind.lpwstrName, lpName2->Kind.lpwstrName); + return !lstrcmpW(lpName1->Kind.lpwstrName, lpName2->Kind.lpwstrName); return lpName1->Kind.lID == lpName2->Kind.lID; } diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 6d6bb88064a..5b085abfe38 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -90,7 +90,7 @@ dll/win32/jscript # Synced to WineStaging-4.18 dll/win32/jsproxy # Synced to WineStaging-4.18 dll/win32/loadperf # Synced to WineStaging-4.18 dll/win32/lz32 # Synced to WineStaging-3.3 -dll/win32/mapi32 # Synced to WineStaging-4.0 +dll/win32/mapi32 # Synced to WineStaging-4.18 dll/win32/mciavi32 # Synced to WineStaging-3.3 dll/win32/mcicda # Synced to WineStaging-3.3 dll/win32/mciqtz32 # Synced to WineStaging-3.3
5 years, 1 month
1
0
0
0
[reactos] 01/01: [LOCALSPL_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=de78eb16d716e38d0ce5b…
commit de78eb16d716e38d0ce5bae35210bc12af4ede8b Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:50:22 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:50:22 2019 +0100 [LOCALSPL_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/localspl/localmon.c | 190 ++++++++++++++++++++++--- 1 file changed, 168 insertions(+), 22 deletions(-) diff --git a/modules/rostests/winetests/localspl/localmon.c b/modules/rostests/winetests/localspl/localmon.c index 8655aa0d1ec..a612cc0ffec 100644 --- a/modules/rostests/winetests/localspl/localmon.c +++ b/modules/rostests/winetests/localspl/localmon.c @@ -2,6 +2,7 @@ * Unit test suite for localspl API functions: local print monitor * * Copyright 2006-2007 Detlef Riekenberg + * Copyright 2019 Dmitry Timoshkov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -37,24 +38,35 @@ static HMODULE hdll; static HMODULE hlocalmon; +static HANDLE hmon; static LPMONITOREX (WINAPI *pInitializePrintMonitor)(LPWSTR); +static LPMONITOR2 (WINAPI *pInitializePrintMonitor2)(PMONITORINIT, LPHANDLE); static LPMONITOREX pm; +static LPMONITOR2 pm2; static BOOL (WINAPI *pEnumPorts)(LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD); +static BOOL (WINAPI *pEnumPorts2)(HANDLE, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD); static BOOL (WINAPI *pOpenPort)(LPWSTR, PHANDLE); +static BOOL (WINAPI *pOpenPort2)(HANDLE, LPWSTR, PHANDLE); static BOOL (WINAPI *pOpenPortEx)(LPWSTR, LPWSTR, PHANDLE, struct _MONITOR *); +static BOOL (WINAPI *pOpenPortEx2)(HANDLE, HANDLE, LPWSTR, LPWSTR, PHANDLE, struct _MONITOR2 *); static BOOL (WINAPI *pStartDocPort)(HANDLE, LPWSTR, DWORD, DWORD, LPBYTE); static BOOL (WINAPI *pWritePort)(HANDLE hPort, LPBYTE, DWORD, LPDWORD); static BOOL (WINAPI *pReadPort)(HANDLE hPort, LPBYTE, DWORD, LPDWORD); static BOOL (WINAPI *pEndDocPort)(HANDLE); static BOOL (WINAPI *pClosePort)(HANDLE); static BOOL (WINAPI *pAddPort)(LPWSTR, HWND, LPWSTR); +static BOOL (WINAPI *pAddPort2)(HANDLE, LPWSTR, HWND, LPWSTR); static BOOL (WINAPI *pAddPortEx)(LPWSTR, DWORD, LPBYTE, LPWSTR); +static BOOL (WINAPI *pAddPortEx2)(HANDLE, LPWSTR, DWORD, LPBYTE, LPWSTR); static BOOL (WINAPI *pConfigurePort)(LPWSTR, HWND, LPWSTR); +static BOOL (WINAPI *pConfigurePort2)(HANDLE, LPWSTR, HWND, LPWSTR); static BOOL (WINAPI *pDeletePort)(LPWSTR, HWND, LPWSTR); +static BOOL (WINAPI *pDeletePort2)(HANDLE, LPWSTR, HWND, LPWSTR); static BOOL (WINAPI *pGetPrinterDataFromPort)(HANDLE, DWORD, LPWSTR, LPWSTR, DWORD, LPWSTR, DWORD, LPDWORD); static BOOL (WINAPI *pSetPortTimeOuts)(HANDLE, LPCOMMTIMEOUTS, DWORD); -static BOOL (WINAPI *pXcvOpenPort)(LPCWSTR, ACCESS_MASK, PHANDLE phXcv); +static BOOL (WINAPI *pXcvOpenPort)(LPCWSTR, ACCESS_MASK, PHANDLE); +static BOOL (WINAPI *pXcvOpenPort2)(HANDLE, LPCWSTR, ACCESS_MASK, PHANDLE); static DWORD (WINAPI *pXcvDataPort)(HANDLE, LPCWSTR, PBYTE, DWORD, PBYTE, DWORD, PDWORD); static BOOL (WINAPI *pXcvClosePort)(HANDLE); @@ -127,6 +139,91 @@ static WCHAR have_file[PORTNAME_MAXSIZE]; /* ########################### */ +static LONG WINAPI CreateKey(HANDLE hcKey, LPCWSTR pszSubKey, DWORD dwOptions, + REGSAM samDesired, PSECURITY_ATTRIBUTES pSecurityAttributes, + PHANDLE phckResult, PDWORD pdwDisposition, HANDLE hSpooler) +{ + ok(0, "should not be called\n"); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +static LONG WINAPI OpenKey(HANDLE hcKey, LPCWSTR pszSubKey, REGSAM samDesired, + PHANDLE phkResult, HANDLE hSpooler) +{ + ok(0, "should not be called\n"); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +static LONG WINAPI CloseKey(HANDLE hcKey, HANDLE hSpooler) +{ + ok(0, "should not be called\n"); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +static LONG WINAPI DeleteKey(HANDLE hcKey, LPCWSTR pszSubKey, HANDLE hSpooler) +{ + ok(0, "should not be called\n"); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +static LONG WINAPI EnumKey(HANDLE hcKey, DWORD dwIndex, LPWSTR pszName, + PDWORD pcchName, PFILETIME pftLastWriteTime, HANDLE hSpooler) +{ + ok(0, "should not be called\n"); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +static LONG WINAPI QueryInfoKey(HANDLE hcKey, PDWORD pcSubKeys, PDWORD pcbKey, + PDWORD pcValues, PDWORD pcbValue, PDWORD pcbData, + PDWORD pcbSecurityDescriptor, PFILETIME pftLastWriteTime, + HANDLE hSpooler) +{ + ok(0, "should not be called\n"); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +static LONG WINAPI SetValue(HANDLE hcKey, LPCWSTR pszValue, DWORD dwType, + const BYTE* pData, DWORD cbData, HANDLE hSpooler) +{ + ok(0, "should not be called\n"); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +static LONG WINAPI DeleteValue(HANDLE hcKey, LPCWSTR pszValue, HANDLE hSpooler) +{ + ok(0, "should not be called\n"); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +static LONG WINAPI EnumValue(HANDLE hcKey, DWORD dwIndex, LPWSTR pszValue, + PDWORD pcbValue, PDWORD pType, PBYTE pData, PDWORD pcbData, + HANDLE hSpooler) +{ + ok(0, "should not be called\n"); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +static LONG WINAPI QueryValue(HANDLE hcKey, LPCWSTR pszValue, PDWORD pType, + PBYTE pData, PDWORD pcbData, HANDLE hSpooler) +{ + return ERROR_CALL_NOT_IMPLEMENTED; +} + +static MONITORREG monreg = +{ + sizeof(MONITORREG), + CreateKey, + OpenKey, + CloseKey, + DeleteKey, + EnumKey, + QueryInfoKey, + SetValue, + DeleteValue, + EnumValue, + QueryValue +}; + static DWORD delete_port(LPWSTR portname) { DWORD res; @@ -605,6 +702,8 @@ static void test_InitializePrintMonitor(void) { LPMONITOREX res; + if (!pInitializePrintMonitor) return; + SetLastError(0xdeadbeef); res = pInitializePrintMonitor(NULL); /* The Parameter was unchecked before w2k */ @@ -618,14 +717,32 @@ static void test_InitializePrintMonitor(void) "returned %p with %u\n (expected '!= NULL' or: NULL with " "ERROR_INVALID_PARAMETER)\n", res, GetLastError()); - /* Every call with a non-empty string returns the same Pointer */ SetLastError(0xdeadbeef); res = pInitializePrintMonitor(Monitors_LocalPortW); ok( res == pm, "returned %p with %u (expected %p)\n", res, GetLastError(), pm); + ok(res->dwMonitorSize == sizeof(MONITOR), "wrong dwMonitorSize %u\n", res->dwMonitorSize); } +static void test_InitializePrintMonitor2(void) +{ + MONITORINIT init; + MONITOR2 *monitor2; + HANDLE hmon; + + if (!pInitializePrintMonitor2) return; + + memset(&init, 0, sizeof(init)); + init.cbSize = sizeof(init); + init.hckRegistryRoot = 0; + init.pMonitorReg = &monreg; + init.bLocal = TRUE; + + monitor2 = pInitializePrintMonitor2(&init, &hmon); + ok(monitor2 != NULL, "InitializePrintMonitor2 error %u\n", GetLastError()); + ok(monitor2->cbSize >= FIELD_OFFSET(MONITOR2, pfnSendRecvBidiDataFromPort), "wrong cbSize %u\n", monitor2->cbSize); +} /* ########################### */ @@ -1349,11 +1466,12 @@ static void test_XcvOpenPort(void) /* ########################### */ #define GET_MONITOR_FUNC(name) \ - if(numentries > 0) { \ - numentries--; \ - p##name = pm->Monitor.pfn##name ; \ - } + if (pm) p##name = pm->Monitor.pfn##name; \ + else if (pm2) p##name = pm2->pfn##name; +#define GET_MONITOR_FUNC2(name) \ + if (pm) p##name = pm->Monitor.pfn##name; \ + else if (pm2) p##name##2 = pm2->pfn##name; START_TEST(localmon) { @@ -1376,6 +1494,7 @@ START_TEST(localmon) ok(res != 0, "with %u\n", GetLastError()); pInitializePrintMonitor = (void *) GetProcAddress(hdll, "InitializePrintMonitor"); + pInitializePrintMonitor2 = (void *) GetProcAddress(hdll, "InitializePrintMonitor2"); if (!pInitializePrintMonitor) { /* The Monitor for "Local Ports" was in a separate dll before w2k */ @@ -1384,34 +1503,60 @@ START_TEST(localmon) pInitializePrintMonitor = (void *) GetProcAddress(hlocalmon, "InitializePrintMonitor"); } } - if (!pInitializePrintMonitor) return; + if (!pInitializePrintMonitor && !pInitializePrintMonitor2) { + skip("InitializePrintMonitor or InitializePrintMonitor2 not found\n"); + return; + } /* Native localmon.dll / localspl.dll need a valid Port-Entry in: a) since xp: HKLM\Software\Microsoft\Windows NT\CurrentVersion\Ports b) up to w2k: Section "Ports" in win.ini or InitializePrintMonitor fails. */ - pm = pInitializePrintMonitor(Monitors_LocalPortW); - if (pm) { - numentries = (pm->dwMonitorSize ) / sizeof(VOID *); - /* NT4: 14, since w2k: 17 */ - ok( numentries == 14 || numentries == 17, - "dwMonitorSize (%d) => %d Functions\n", pm->dwMonitorSize, numentries); - - GET_MONITOR_FUNC(EnumPorts); - GET_MONITOR_FUNC(OpenPort); - GET_MONITOR_FUNC(OpenPortEx); + if (pInitializePrintMonitor) + pm = pInitializePrintMonitor(Monitors_LocalPortW); + else if (pInitializePrintMonitor2) { + MONITORINIT init; + + memset(&init, 0, sizeof(init)); + init.cbSize = sizeof(init); + init.hckRegistryRoot = 0; + init.pMonitorReg = &monreg; + init.bLocal = TRUE; + + pm2 = pInitializePrintMonitor2(&init, &hmon); + ok(pm2 != NULL, "InitializePrintMonitor2 error %u\n", GetLastError()); + ok(pm2->cbSize >= FIELD_OFFSET(MONITOR2, pfnSendRecvBidiDataFromPort), "wrong cbSize %u\n", pm2->cbSize); + } + + if (pm || pm2) { + if (pm) { + ok(pm->dwMonitorSize == sizeof(MONITOR), "wrong dwMonitorSize %u\n", pm->dwMonitorSize); + numentries = (pm->dwMonitorSize ) / sizeof(VOID *); + /* NT4: 14, since w2k: 17 */ + ok( numentries == 14 || numentries == 17, + "dwMonitorSize (%u) => %u Functions\n", pm->dwMonitorSize, numentries); + } + else if (pm2) { + numentries = (pm2->cbSize ) / sizeof(VOID *); + ok( numentries >= 20, + "cbSize (%u) => %u Functions\n", pm2->cbSize, numentries); + } + + GET_MONITOR_FUNC2(EnumPorts); + GET_MONITOR_FUNC2(OpenPort); + GET_MONITOR_FUNC2(OpenPortEx); GET_MONITOR_FUNC(StartDocPort); GET_MONITOR_FUNC(WritePort); GET_MONITOR_FUNC(ReadPort); GET_MONITOR_FUNC(EndDocPort); GET_MONITOR_FUNC(ClosePort); - GET_MONITOR_FUNC(AddPort); - GET_MONITOR_FUNC(AddPortEx); - GET_MONITOR_FUNC(ConfigurePort); - GET_MONITOR_FUNC(DeletePort); + GET_MONITOR_FUNC2(AddPort); + GET_MONITOR_FUNC2(AddPortEx); + GET_MONITOR_FUNC2(ConfigurePort); + GET_MONITOR_FUNC2(DeletePort); GET_MONITOR_FUNC(GetPrinterDataFromPort); GET_MONITOR_FUNC(SetPortTimeOuts); - GET_MONITOR_FUNC(XcvOpenPort); + GET_MONITOR_FUNC2(XcvOpenPort); GET_MONITOR_FUNC(XcvDataPort); GET_MONITOR_FUNC(XcvClosePort); @@ -1427,6 +1572,7 @@ START_TEST(localmon) } test_InitializePrintMonitor(); + test_InitializePrintMonitor2(); find_installed_ports();
5 years, 1 month
1
0
0
0
[reactos] 01/01: [UMPNPMGR] Add checks for the root device instance ID
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2a2dd8f7268201e656df1…
commit 2a2dd8f7268201e656df13753944ba901af40654 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Nov 9 21:14:52 2019 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sat Nov 9 21:14:52 2019 +0100 [UMPNPMGR] Add checks for the root device instance ID --- base/services/umpnpmgr/rpcserver.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/base/services/umpnpmgr/rpcserver.c b/base/services/umpnpmgr/rpcserver.c index e8a4890ffda..b12cbd19cdf 100644 --- a/base/services/umpnpmgr/rpcserver.c +++ b/base/services/umpnpmgr/rpcserver.c @@ -36,7 +36,7 @@ /* GLOBALS ******************************************************************/ -static WCHAR szRootDeviceId[] = L"HTREE\\ROOT\\0"; +static WCHAR szRootDeviceInstanceID[] = L"HTREE\\ROOT\\0"; /* FUNCTIONS *****************************************************************/ @@ -292,6 +292,18 @@ IsValidDeviceInstanceID( } +static +BOOL +IsRootDeviceInstanceID( + _In_ PWSTR pszDeviceInstanceID) +{ + if (_wcsicmp(pszDeviceInstanceID, szRootDeviceInstanceID) == 0) + return TRUE; + + return FALSE; +} + + /* PUBLIC FUNCTIONS **********************************************************/ /* Function 0 */ @@ -472,14 +484,14 @@ PNP_GetRootDeviceInstance( ret = CR_INVALID_POINTER; goto Done; } - if (ulLength < lstrlenW(szRootDeviceId) + 1) + if (ulLength < lstrlenW(szRootDeviceInstanceID) + 1) { ret = CR_BUFFER_SMALL; goto Done; } lstrcpyW(pDeviceID, - szRootDeviceId); + szRootDeviceInstanceID); Done: DPRINT("PNP_GetRootDeviceInstance() done (returns %lx)\n", ret); @@ -2626,7 +2638,18 @@ PNP_CreateDevInst( { CONFIGRET ret = CR_SUCCESS; - DPRINT("PNP_CreateDevInst: %S\n", pszDeviceID); + DPRINT("PNP_CreateDevInst(%p %S %S %lu 0x%08lx)\n", + hBinding, pszParentDeviceID, pszDeviceID, ulLength, ulFlags); + + if (ulFlags & ~CM_CREATE_DEVNODE_BITS) + return CR_INVALID_FLAG; + + if (pszDeviceID == NULL || pszParentDeviceID == NULL) + return CR_INVALID_POINTER; + + /* Fail, if the parent device is not the root device */ + if (!IsRootDeviceInstanceID(pszParentDeviceID)) + return CR_INVALID_DEVINST; if (ulFlags & CM_CREATE_DEVNODE_GENERATE_ID) { @@ -3056,7 +3079,8 @@ PNP_QueryRemove( if (ulFlags & ~CM_REMOVE_BITS) return CR_INVALID_FLAG; - if (!IsValidDeviceInstanceID(pszDeviceID)) + if (!IsValidDeviceInstanceID(pszDeviceID) || + IsRootDeviceInstanceID(pszDeviceID)) return CR_INVALID_DEVINST; if (pVetoType != NULL)
5 years, 1 month
1
0
0
0
[reactos] 01/01: [UMPNPMGR] Validate device instance IDs before use
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8bf3f3feb96697d5bee34…
commit 8bf3f3feb96697d5bee34ccc0fd4c4a4022ee387 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Nov 9 18:48:10 2019 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sat Nov 9 18:48:10 2019 +0100 [UMPNPMGR] Validate device instance IDs before use --- base/services/umpnpmgr/rpcserver.c | 109 ++++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/base/services/umpnpmgr/rpcserver.c b/base/services/umpnpmgr/rpcserver.c index 70f77600f9c..e8a4890ffda 100644 --- a/base/services/umpnpmgr/rpcserver.c +++ b/base/services/umpnpmgr/rpcserver.c @@ -226,6 +226,72 @@ GetDeviceStatus( } +static +BOOL +IsValidDeviceInstanceID( + _In_ PWSTR pszDeviceInstanceID) +{ + INT nPartLength[3] = {0, 0, 0}; + INT nLength = 0, nParts = 0; + PWCHAR p; + + DPRINT("IsValidDeviceInstanceID(%S)\n", + pszDeviceInstanceID); + + if (pszDeviceInstanceID == NULL) + { + DPRINT("Device instance ID is NULL!\n"); + return FALSE; + } + + p = pszDeviceInstanceID; + while (*p != UNICODE_NULL) + { + if (*p == L'\\') + { + nParts++; + if (nParts >= 3) + { + DPRINT("Too many separators: %d\n", nParts); + return FALSE; + } + } + else + { + nPartLength[nParts]++; + } + + nLength++; + if (nLength >= MAX_DEVICE_ID_LEN) + { + DPRINT("Too long: %d\n", nLength); + return FALSE; + } + + p++; + } + + if (nParts != 2) + { + DPRINT("Invalid number of separtors: %d\n", nParts); + return FALSE; + } + + if ((nPartLength[0] == 0) || + (nPartLength[1] == 0) || + (nPartLength[2] == 0)) + { + DPRINT("Invalid part lengths: %d %d %d\n", + nPartLength[0], nPartLength[1], nPartLength[2]); + return FALSE; + } + + DPRINT("Valid device instance ID!\n"); + + return TRUE; +} + + /* PUBLIC FUNCTIONS **********************************************************/ /* Function 0 */ @@ -361,6 +427,9 @@ PNP_ValidateDeviceInstance( DPRINT("PNP_ValidateDeviceInstance(%S %lx) called\n", pDeviceID, ulFlags); + if (!IsValidDeviceInstanceID(pDeviceID)) + return CR_INVALID_DEVINST; + if (RegOpenKeyExW(hEnumKey, pDeviceID, 0, @@ -441,6 +510,9 @@ PNP_GetRelatedDeviceInstance( DPRINT(" Relationship %ld\n", ulRelationship); DPRINT(" DeviceId %S\n", pDeviceID); + if (!IsValidDeviceInstanceID(pDeviceID)) + return CR_INVALID_DEVINST; + RtlInitUnicodeString(&PlugPlayData.TargetDeviceInstance, pDeviceID); @@ -1349,6 +1421,9 @@ PNP_GetDepth( DPRINT("PNP_GetDepth() called\n"); + if (!IsValidDeviceInstanceID(pszDeviceID)) + return CR_INVALID_DEVINST; + RtlInitUnicodeString(&PlugPlayData.DeviceInstance, pszDeviceID); @@ -1406,7 +1481,12 @@ PNP_GetDeviceRegProp( goto done; } - /* FIXME: Check pDeviceID */ + /* Check pDeviceID */ + if (!IsValidDeviceInstanceID(pDeviceID)) + { + ret = CR_INVALID_DEVINST; + goto done; + } if (*pulLength < *pulTransferLen) *pulLength = *pulTransferLen; @@ -1653,6 +1733,9 @@ PNP_SetDeviceRegProp( DPRINT("DataType: %lu\n", ulDataType); DPRINT("Length: %lu\n", ulLength); + if (!IsValidDeviceInstanceID(pDeviceId)) + return CR_INVALID_DEVINST; + switch (ulProperty) { case CM_DRP_DEVICEDESC: @@ -1790,6 +1873,9 @@ PNP_GetClassInstance( DPRINT("PNP_GetClassInstance(%p %S %p %lu)\n", hBinding, pDeviceId, pszClassInstance, ulLength); + if (!IsValidDeviceInstanceID(pDeviceId)) + return CR_INVALID_DEVINST; + ulTransferLength = ulLength; ret = PNP_GetDeviceRegProp(hBinding, pDeviceId, @@ -2091,6 +2177,9 @@ PNP_GetInterfaceDeviceList( UNREFERENCED_PARAMETER(hBinding); + if (!IsValidDeviceInstanceID(pszDeviceID)) + return CR_INVALID_DEVINST; + RtlInitUnicodeString(&PlugPlayData.DeviceInstance, pszDeviceID); @@ -2134,6 +2223,9 @@ PNP_GetInterfaceDeviceListSize( DPRINT("PNP_GetInterfaceDeviceListSize() called\n"); + if (!IsValidDeviceInstanceID(pszDeviceID)) + return CR_INVALID_DEVINST; + RtlInitUnicodeString(&PlugPlayData.DeviceInstance, pszDeviceID); @@ -2729,6 +2821,9 @@ PNP_GetDeviceStatus( DPRINT("PNP_GetDeviceStatus(%p %S %p %p)\n", hBinding, pDeviceID, pulStatus, pulProblem, ulFlags); + if (!IsValidDeviceInstanceID(pDeviceID)) + return CR_INVALID_DEVINST; + return GetDeviceStatus(pDeviceID, pulStatus, pulProblem); } @@ -2961,6 +3056,9 @@ PNP_QueryRemove( if (ulFlags & ~CM_REMOVE_BITS) return CR_INVALID_FLAG; + if (!IsValidDeviceInstanceID(pszDeviceID)) + return CR_INVALID_DEVINST; + if (pVetoType != NULL) *pVetoType = PNP_VetoTypeUnknown; @@ -3006,6 +3104,9 @@ PNP_RequestDeviceEject( if (ulFlags != 0) return CR_INVALID_FLAG; + if (!IsValidDeviceInstanceID(pszDeviceID)) + return CR_INVALID_DEVINST; + if (pVetoType != NULL) *pVetoType = PNP_VetoTypeUnknown; @@ -3140,6 +3241,9 @@ PNP_HwProfFlags( DPRINT("PNP_HwProfFlags() called\n"); + if (!IsValidDeviceInstanceID(pDeviceID)) + return CR_INVALID_DEVINST; + if (ulConfig == 0) { wcscpy(szKeyName, @@ -3748,6 +3852,9 @@ PNP_GetCustomDevProp( goto done; } + if (!IsValidDeviceInstanceID(pDeviceID)) + return CR_INVALID_DEVINST; + if (*pulLength < *pulTransferLen) *pulLength = *pulTransferLen;
5 years, 1 month
1
0
0
0
[reactos] 01/01: [WIN32SS] Prevent disabled scrollbars being clickable CORE-15557
by Joachim Henze
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=19fbdda95cb972f5d6f96…
commit 19fbdda95cb972f5d6f9652c238a2edc056538f3 Author: Joachim Henze <Joachim.Henze(a)reactos.org> AuthorDate: Sat Nov 9 15:50:10 2019 +0100 Commit: Joachim Henze <Joachim.Henze(a)reactos.org> CommitDate: Sat Nov 9 15:50:50 2019 +0100 [WIN32SS] Prevent disabled scrollbars being clickable CORE-15557 Thanks to JIRA user 'I_Kill_Bugs. VBox:
https://reactos.org/testman/compare.php?ids=69671,69747
KVM:
https://reactos.org/testman/compare.php?ids=69672,69748
--- win32ss/user/user32/controls/scrollbar.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/win32ss/user/user32/controls/scrollbar.c b/win32ss/user/user32/controls/scrollbar.c index 3eb02429610..1e1249e296c 100644 --- a/win32ss/user/user32/controls/scrollbar.c +++ b/win32ss/user/user32/controls/scrollbar.c @@ -831,9 +831,13 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt) PrevPt = Pt; if (SBType == SB_CTL && (GetWindowLongPtrW(Wnd, GWL_STYLE) & WS_TABSTOP)) SetFocus(Wnd); SetCapture(Wnd); - ScrollBarInfo.rgstate[ScrollTrackHitTest] |= STATE_SYSTEM_PRESSED; - NewInfo.rgstate[ScrollTrackHitTest] = ScrollBarInfo.rgstate[ScrollTrackHitTest]; - NtUserSetScrollBarInfo(Wnd, IntScrollGetObjectId(SBType), &NewInfo); + /* Don't update scrollbar if disabled. */ + if (ScrollBarInfo.rgstate[ScrollTrackHitTest] != STATE_SYSTEM_UNAVAILABLE) + { + ScrollBarInfo.rgstate[ScrollTrackHitTest] |= STATE_SYSTEM_PRESSED; + NewInfo.rgstate[ScrollTrackHitTest] = ScrollBarInfo.rgstate[ScrollTrackHitTest]; + NtUserSetScrollBarInfo(Wnd, IntScrollGetObjectId(SBType), &NewInfo); + } break; case WM_MOUSEMOVE: @@ -846,13 +850,16 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt) ReleaseCapture(); /* if scrollbar has focus, show back caret */ if (Wnd == GetFocus()) ShowCaret(Wnd); - ScrollBarInfo.rgstate[ScrollTrackHitTest] &= ~STATE_SYSTEM_PRESSED; - NewInfo.rgstate[ScrollTrackHitTest] = ScrollBarInfo.rgstate[ScrollTrackHitTest]; - NtUserSetScrollBarInfo(Wnd, IntScrollGetObjectId(SBType), &NewInfo); - - IntDrawScrollInterior(Wnd,Dc,SBType,Vertical,&ScrollBarInfo); - IntDrawScrollArrows(Dc, &ScrollBarInfo, Vertical); + /* Don't update scrollbar if disabled. */ + if (ScrollBarInfo.rgstate[ScrollTrackHitTest] != STATE_SYSTEM_UNAVAILABLE) + { + ScrollBarInfo.rgstate[ScrollTrackHitTest] &= ~STATE_SYSTEM_PRESSED; + NewInfo.rgstate[ScrollTrackHitTest] = ScrollBarInfo.rgstate[ScrollTrackHitTest]; + NtUserSetScrollBarInfo(Wnd, IntScrollGetObjectId(SBType), &NewInfo); + IntDrawScrollInterior(Wnd,Dc,SBType,Vertical,&ScrollBarInfo); + IntDrawScrollArrows(Dc, &ScrollBarInfo, Vertical); + } break; case WM_SYSTIMER:
5 years, 1 month
1
0
0
0
[reactos] 01/01: [UMPNPMGR] Implement PNP_RequestEjectPC()
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a743e33bd8154c4c1eabc…
commit a743e33bd8154c4c1eabcdd2242683f29c60c8f0 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Nov 9 12:32:34 2019 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sat Nov 9 12:32:34 2019 +0100 [UMPNPMGR] Implement PNP_RequestEjectPC() --- base/services/umpnpmgr/rpcserver.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/base/services/umpnpmgr/rpcserver.c b/base/services/umpnpmgr/rpcserver.c index 141026b7bd1..70f77600f9c 100644 --- a/base/services/umpnpmgr/rpcserver.c +++ b/base/services/umpnpmgr/rpcserver.c @@ -3090,8 +3090,29 @@ WINAPI PNP_RequestEjectPC( handle_t hBinding) { - UNIMPLEMENTED; - return CR_CALL_NOT_IMPLEMENTED; + WCHAR szDockDeviceInstance[MAX_DEVICE_ID_LEN]; + PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA DockData; + NTSTATUS Status; + + DPRINT("PNP_RequestEjectPC(%p)\n", hBinding); + + /* Retrieve the dock device */ + DockData.DeviceInstanceLength = ARRAYSIZE(szDockDeviceInstance); + DockData.DeviceInstance = szDockDeviceInstance; + + Status = NtPlugPlayControl(PlugPlayControlRetrieveDock, + &DockData, + sizeof(DockData)); + if (!NT_SUCCESS(Status)) + return NtStatusToCrError(Status); + + /* Eject the dock device */ + return PNP_RequestDeviceEject(hBinding, + szDockDeviceInstance, + NULL, + NULL, + 0, + 0); }
5 years, 1 month
1
0
0
0
[reactos] 01/01: [SHELL32] Update French translation
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=15a703503eb7d5076b42d…
commit 15a703503eb7d5076b42d2137f36171cde64452f Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Nov 9 10:19:10 2019 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Nov 9 10:19:10 2019 +0100 [SHELL32] Update French translation CORE-12562 --- dll/win32/shell32/lang/fr-FR.rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc index f93ce816bb6..b28d8770a58 100644 --- a/dll/win32/shell32/lang/fr-FR.rc +++ b/dll/win32/shell32/lang/fr-FR.rc @@ -814,8 +814,8 @@ BEGIN IDS_PERSONAL "Mes documents" IDS_FAVORITES "Favoris" IDS_STARTUP "Menu Démarrer\\Programmes\\Démarrage" - IDS_RECENT "Recent" - IDS_SENDTO "Se&nd To" + IDS_RECENT "Récent" + IDS_SENDTO "Envoyer vers" IDS_STARTMENU "Menu Démarrer" IDS_MYMUSIC "Ma musique" IDS_MYVIDEO "Mes vidéos" @@ -872,7 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Impossible d'éjecter le média (code d'erreur : %lu)." IDS_CANTSHOWPROPERTIES "Impossible de montrer les propriétés (code d'erreur : %lu)." IDS_CANTDISCONNECT "Impossible de déconnecter (code d'erreur : %lu)." - IDS_NONE "(None)" + IDS_NONE "(aucun)" /* Friendly File Type Names */ IDS_DIRECTORY "Dossier"
5 years, 1 month
1
0
0
0
[reactos] 01/01: [VGAFONTEDIT] Use static __inline instead of inline
by Katayma Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d12af4fb10c6e18e93db3…
commit d12af4fb10c6e18e93db3747487e9f437e431ce0 Author: Katayma Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Nov 9 09:16:15 2019 +0900 Commit: Katayma Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sat Nov 9 09:16:15 2019 +0900 [VGAFONTEDIT] Use static __inline instead of inline --- modules/rosapps/applications/devutils/vgafontedit/precomp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/rosapps/applications/devutils/vgafontedit/precomp.h b/modules/rosapps/applications/devutils/vgafontedit/precomp.h index 2e4ac775418..2186e01a340 100644 --- a/modules/rosapps/applications/devutils/vgafontedit/precomp.h +++ b/modules/rosapps/applications/devutils/vgafontedit/precomp.h @@ -138,7 +138,8 @@ VOID UnInitFontBoxesWndClass(VOID); VOID GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect); VOID EditCurrentGlyph(PFONT_WND_INFO FontWndInfo); -inline VOID GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn) +static __inline VOID +GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn) { *uFontRow = uCharacter / 16; *uFontColumn = uCharacter % 16;
5 years, 1 month
1
0
0
0
[reactos] 01/01: [SHELL32] Initial SendTo implementation (#2021)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5308a606dc79e429ea5be…
commit 5308a606dc79e429ea5be5e42a06526de2ec97f6 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Nov 9 08:08:40 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Nov 9 08:08:40 2019 +0900 [SHELL32] Initial SendTo implementation (#2021) This PR will realize SendTo feature. Initially, there is no file in SendTo folder (displayed as "(None)"). If you added some shortcut files, then SendTo shows some menu items. - Copy, Move, and Link are working. - Added icons. CORE-12562 --- dll/win32/shell32/CMakeLists.txt | 1 + dll/win32/shell32/CSendToMenu.cpp | 520 +++++++++++++++++++++++++++++++ dll/win32/shell32/CSendToMenu.h | 99 ++++++ dll/win32/shell32/lang/bg-BG.rc | 1 + dll/win32/shell32/lang/ca-ES.rc | 3 +- dll/win32/shell32/lang/cs-CZ.rc | 3 +- dll/win32/shell32/lang/da-DK.rc | 1 + dll/win32/shell32/lang/de-DE.rc | 1 + dll/win32/shell32/lang/el-GR.rc | 3 +- dll/win32/shell32/lang/en-GB.rc | 3 +- dll/win32/shell32/lang/en-US.rc | 3 +- dll/win32/shell32/lang/es-ES.rc | 1 + dll/win32/shell32/lang/et-EE.rc | 3 +- dll/win32/shell32/lang/fi-FI.rc | 1 + dll/win32/shell32/lang/fr-FR.rc | 3 +- dll/win32/shell32/lang/he-IL.rc | 1 + dll/win32/shell32/lang/hi-IN.rc | 1 + dll/win32/shell32/lang/hu-HU.rc | 3 +- dll/win32/shell32/lang/id-ID.rc | 1 + dll/win32/shell32/lang/it-IT.rc | 1 + dll/win32/shell32/lang/ja-JP.rc | 3 +- dll/win32/shell32/lang/ko-KR.rc | 3 +- dll/win32/shell32/lang/nl-NL.rc | 3 +- dll/win32/shell32/lang/no-NO.rc | 1 + dll/win32/shell32/lang/pl-PL.rc | 1 + dll/win32/shell32/lang/pt-BR.rc | 1 + dll/win32/shell32/lang/pt-PT.rc | 1 + dll/win32/shell32/lang/ro-RO.rc | 1 + dll/win32/shell32/lang/ru-RU.rc | 1 + dll/win32/shell32/lang/sk-SK.rc | 1 + dll/win32/shell32/lang/sl-SI.rc | 3 +- dll/win32/shell32/lang/sq-AL.rc | 1 + dll/win32/shell32/lang/sv-SE.rc | 3 +- dll/win32/shell32/lang/tr-TR.rc | 1 + dll/win32/shell32/lang/uk-UA.rc | 1 + dll/win32/shell32/lang/zh-CN.rc | 3 +- dll/win32/shell32/lang/zh-TW.rc | 3 +- dll/win32/shell32/precomp.h | 1 + dll/win32/shell32/res/rgs/sendtomenu.rgs | 26 ++ dll/win32/shell32/rgs_res.rc | 1 + dll/win32/shell32/shell32.cpp | 1 + dll/win32/shell32/shresdef.h | 2 + 42 files changed, 700 insertions(+), 15 deletions(-) diff --git a/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt index ea2fe80631d..fb850fceafa 100644 --- a/dll/win32/shell32/CMakeLists.txt +++ b/dll/win32/shell32/CMakeLists.txt @@ -81,6 +81,7 @@ list(APPEND SOURCE CDefaultContextMenu.cpp COpenWithMenu.cpp CNewMenu.cpp + CSendToMenu.cpp CShellDispatch.cpp CFolder.cpp CFolderItems.cpp diff --git a/dll/win32/shell32/CSendToMenu.cpp b/dll/win32/shell32/CSendToMenu.cpp new file mode 100644 index 00000000000..4b0dcab1348 --- /dev/null +++ b/dll/win32/shell32/CSendToMenu.cpp @@ -0,0 +1,520 @@ +/* + * provides SendTo shell item service + * + * Copyright 2019 Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "precomp.h" +#define INITGUID +#include <guiddef.h> + +#define MAX_ITEM_COUNT 64 + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +DEFINE_GUID(CLSID_SendToMenu, 0x7BA4C740, 0x9E81, 0x11CF, + 0x99, 0xD3, 0x00, 0xAA, 0x00, 0x4A, 0xE8, 0x37); + +CSendToMenu::CSendToMenu() + : m_hSubMenu(NULL) + , m_pItems(NULL) + , m_idCmdFirst(0) +{ + SHGetDesktopFolder(&m_pDesktop); + m_pSendTo = GetSpecialFolder(NULL, CSIDL_SENDTO); +} + +CSendToMenu::~CSendToMenu() +{ + UnloadAllItems(); + + if (m_hSubMenu) + { + DestroyMenu(m_hSubMenu); + m_hSubMenu = NULL; + } +} + +HRESULT CSendToMenu::DoDrop(IDataObject *pDataObject, IDropTarget *pDropTarget) +{ + DWORD dwEffect = DROPEFFECT_MOVE | DROPEFFECT_COPY | DROPEFFECT_LINK; + + BOOL bShift = (GetAsyncKeyState(VK_SHIFT) < 0); + BOOL bCtrl = (GetAsyncKeyState(VK_CONTROL) < 0); + + // THIS CODE IS NOT HUMAN-FRIENDLY. SORRY. + // (We have to translate a SendTo action to a Drop action) + DWORD dwKeyState = MK_LBUTTON; + if (bShift && bCtrl) + dwKeyState |= MK_SHIFT | MK_CONTROL; + else if (!bShift) + dwKeyState |= MK_CONTROL; + if (bCtrl) + dwKeyState |= MK_SHIFT; + + POINTL ptl = { 0, 0 }; + HRESULT hr = pDropTarget->DragEnter(pDataObject, dwKeyState, ptl, &dwEffect); + if (SUCCEEDED(hr) && dwEffect != DROPEFFECT_NONE) + { + // THIS CODE IS NOT HUMAN-FRIENDLY. SORRY. + // (We have to translate a SendTo action to a Drop action) + if (bShift && bCtrl) + dwEffect = DROPEFFECT_LINK; + else if (!bShift) + dwEffect = DROPEFFECT_MOVE; + else + dwEffect = DROPEFFECT_COPY; + + hr = pDropTarget->Drop(pDataObject, dwKeyState, ptl, &dwEffect); + } + else + { + ERR("DragEnter: %08lX\n", hr); + pDropTarget->DragLeave(); + } + + return hr; +} + +// get an IShellFolder from CSIDL +IShellFolder * +CSendToMenu::GetSpecialFolder(HWND hwnd, int csidl, LPITEMIDLIST *ppidl) +{ + if (ppidl) + *ppidl = NULL; + + if (!m_pDesktop) + { + SHGetDesktopFolder(&m_pDesktop); + if (!m_pDesktop) + { + ERR("SHGetDesktopFolder\n"); + return NULL; + } + } + + LPITEMIDLIST pidl = NULL; + HRESULT hr = SHGetSpecialFolderLocation(hwnd, csidl, &pidl); + if (FAILED(hr)) + { + ERR("SHGetSpecialFolderLocation: %08lX\n", hr); + return NULL; + } + + IShellFolder *pFolder = NULL; + hr = m_pDesktop->BindToObject(pidl, NULL, IID_PPV_ARG(IShellFolder, &pFolder)); + + if (ppidl) + *ppidl = pidl; + else + CoTaskMemFree(pidl); + + if (SUCCEEDED(hr)) + return pFolder; + + ERR("BindToObject: %08lX\n", hr); + return NULL; +} + +// get a UI object from PIDL +HRESULT CSendToMenu::GetUIObjectFromPidl(HWND hwnd, LPITEMIDLIST pidl, + REFIID riid, LPVOID *ppvOut) +{ + *ppvOut = NULL; + + LPCITEMIDLIST pidlLast; + CComPtr<IShellFolder> pFolder; + HRESULT hr = SHBindToParent(pidl, IID_PPV_ARG(IShellFolder, &pFolder), &pidlLast); + if (FAILED(hr)) + { + ERR("SHBindToParent: %08lX\n", hr); + return hr; + } + + hr = pFolder->GetUIObjectOf(hwnd, 1, &pidlLast, riid, NULL, ppvOut); + if (FAILED(hr)) + { + ERR("GetUIObjectOf: %08lX\n", hr); + } + return hr; +} + +void CSendToMenu::UnloadItem(SENDTO_ITEM *pItem) +{ + if (!pItem) + return; + + CoTaskMemFree(pItem->pidlChild); + CoTaskMemFree(pItem->pszText); + DestroyIcon(pItem->hIcon); + HeapFree(GetProcessHeap(), 0, pItem); +} + +void CSendToMenu::UnloadAllItems() +{ + SENDTO_ITEM *pItems = m_pItems; + m_pItems = NULL; + while (pItems) + { + SENDTO_ITEM *pCurItem = pItems; + pItems = pItems->pNext; + UnloadItem(pCurItem); + } +} + +BOOL CSendToMenu::LoadAllItems(HWND hwnd) +{ + UnloadAllItems(); + + LPITEMIDLIST pidlSendTo; + m_pSendTo = GetSpecialFolder(hwnd, CSIDL_SENDTO, &pidlSendTo); + if (!m_pSendTo) + { + ERR("GetSpecialFolder\n"); + return FALSE; + } + + HRESULT hr; + CComPtr<IEnumIDList> pEnumIDList; + hr = m_pSendTo->EnumObjects(hwnd, + SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, + &pEnumIDList); + if (FAILED(hr)) + { + ERR("EnumObjects: %08lX\n", hr); + ILFree(pidlSendTo); + return FALSE; + } + + BOOL bOK = TRUE; + LPITEMIDLIST pidlChild; + UINT nCount = 0; + while (pEnumIDList->Next(1, &pidlChild, NULL) == S_OK) + { + SENDTO_ITEM *pNewItem = (SENDTO_ITEM *)HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + sizeof(SENDTO_ITEM)); + if (!pNewItem) + { + ERR("HeapAlloc\n"); + bOK = FALSE; + CoTaskMemFree(pidlChild); + break; + } + + STRRET strret; + hr = m_pSendTo->GetDisplayNameOf(pidlChild, SHGDN_NORMAL, &strret); + if (SUCCEEDED(hr)) + { + LPWSTR pszText = NULL; + hr = StrRetToStrW(&strret, pidlChild, &pszText); + if (SUCCEEDED(hr)) + { + LPITEMIDLIST pidlAbsolute = ILCombine(pidlSendTo, pidlChild); + + SHFILEINFOW fi = { NULL }; + const UINT uFlags = SHGFI_PIDL | SHGFI_TYPENAME | + SHGFI_ICON | SHGFI_SMALLICON; + SHGetFileInfoW((LPCWSTR)pidlAbsolute, 0, &fi, sizeof(fi), uFlags); + + ILFree(pidlAbsolute); + + pNewItem->pidlChild = pidlChild; + pNewItem->pszText = pszText; + pNewItem->hIcon = fi.hIcon; + if (m_pItems) + { + pNewItem->pNext = m_pItems; + } + m_pItems = pNewItem; + + // successful + ++nCount; + if (nCount >= MAX_ITEM_COUNT) + { + break; + } + continue; + } + else + { + ERR("StrRetToStrW: %08lX\n", hr); + } + } + else + { + ERR("GetDisplayNameOf: %08lX\n", hr); + } + + UnloadItem(pNewItem); + CoTaskMemFree(pidlChild); + } + + ILFree(pidlSendTo); + + return bOK; +} + +UINT CSendToMenu::InsertSendToItems(HMENU hMenu, UINT idCmdFirst, UINT Pos) +{ + if (m_pItems == NULL) + { + if (!LoadAllItems(NULL)) + { + ERR("LoadAllItems\n"); + return 0; + } + } + + m_idCmdFirst = idCmdFirst; + + UINT idCmd = idCmdFirst; + UINT nCount = 0; + for (SENDTO_ITEM *pCurItem = m_pItems; pCurItem; pCurItem = pCurItem->pNext) + { + const UINT uFlags = MF_BYPOSITION | MF_STRING | MF_ENABLED; + if (InsertMenuW(hMenu, Pos, uFlags, idCmd, pCurItem->pszText)) + { + MENUITEMINFOW mii; + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_DATA | MIIM_BITMAP; + mii.dwItemData = (ULONG_PTR)pCurItem; + mii.hbmpItem = HBMMENU_CALLBACK; + SetMenuItemInfoW(hMenu, idCmd, FALSE, &mii); + ++idCmd; + + // successful + ++nCount; + if (nCount >= MAX_ITEM_COUNT) + { + break; + } + } + } + + if (idCmd == idCmdFirst) + { + WCHAR szNone[64] = L"(None)"; + LoadStringW(shell32_hInstance, IDS_NONE, szNone, _countof(szNone)); + + AppendMenuW(hMenu, MF_GRAYED | MF_DISABLED | MF_STRING, idCmd, szNone); + } + + return idCmd - idCmdFirst; +} + +CSendToMenu::SENDTO_ITEM *CSendToMenu::FindItemFromIdOffset(UINT IdOffset) +{ + UINT idCmd = m_idCmdFirst + IdOffset; + + MENUITEMINFOW mii = { sizeof(mii) }; + mii.fMask = MIIM_DATA; + if (GetMenuItemInfoW(m_hSubMenu, idCmd, FALSE, &mii)) + return (SENDTO_ITEM *)mii.dwItemData; + + ERR("GetMenuItemInfoW\n"); + return NULL; +} + +HRESULT CSendToMenu::DoSendToItem(SENDTO_ITEM *pItem, LPCMINVOKECOMMANDINFO lpici) +{ + if (!m_pDataObject) + { + ERR("!m_pDataObject\n"); + return E_FAIL; + } + + HRESULT hr; + CComPtr<IDropTarget> pDropTarget; + LPITEMIDLIST pidlChild = pItem->pidlChild; + hr = m_pSendTo->GetUIObjectOf(NULL, 1, &pidlChild, IID_IDropTarget, + NULL, (LPVOID *)&pDropTarget); + if (SUCCEEDED(hr)) + { + hr = DoDrop(m_pDataObject, pDropTarget); + } + else + { + ERR("GetUIObjectOf: %08lX\n", hr); + } + + return hr; +} + +STDMETHODIMP CSendToMenu::SetSite(IUnknown *pUnkSite) +{ + m_pSite = pUnkSite; + return S_OK; +} + +STDMETHODIMP CSendToMenu::GetSite(REFIID riid, void **ppvSite) +{ + if (!m_pSite) + return E_FAIL; + + return m_pSite->QueryInterface(riid, ppvSite); +} + +STDMETHODIMP +CSendToMenu::QueryContextMenu(HMENU hMenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + TRACE("%p %p %u %u %u %u\n", this, + hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); + + WCHAR wszSendTo[64]; + if (!LoadStringW(shell32_hInstance, IDS_SENDTO, + wszSendTo, _countof(wszSendTo))) + { + ERR("IDS_SENDTO\n"); + return E_FAIL; + } + + HMENU hSubMenu = CreateMenu(); + if (!hSubMenu) + { + ERR("CreateMenu\n"); + return E_FAIL; + } + + UINT cItems = InsertSendToItems(hSubMenu, idCmdFirst, 0); + + MENUITEMINFOW mii; + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE | MIIM_SUBMENU; + mii.fType = MFT_STRING; + mii.wID = -1; + mii.dwTypeData = wszSendTo; + mii.cch = wcslen(mii.dwTypeData); + mii.fState = MFS_ENABLED; + mii.hSubMenu = hSubMenu; + if (!InsertMenuItemW(hMenu, indexMenu, TRUE, &mii)) + { + ERR("InsertMenuItemW\n"); + return E_FAIL; + } + + HMENU hOldSubMenu = m_hSubMenu; + m_hSubMenu = hSubMenu; + DestroyMenu(hOldSubMenu); + + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, cItems); +} + +STDMETHODIMP +CSendToMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpici) +{ + HRESULT hr = E_FAIL; + + WORD idCmd = LOWORD(lpici->lpVerb); + TRACE("idCmd: %d\n", idCmd); + + SENDTO_ITEM *pItem = FindItemFromIdOffset(idCmd); + if (pItem) + { + hr = DoSendToItem(pItem, lpici); + } + else + { + ERR("FindItemFromIdOffset\n"); + } + + TRACE("CSendToMenu::InvokeCommand %x\n", hr); + return hr; +} + +STDMETHODIMP +CSendToMenu::GetCommandString(UINT_PTR idCmd, + UINT uType, + UINT *pwReserved, + LPSTR pszName, + UINT cchMax) +{ + FIXME("%p %lu %u %p %p %u\n", this, + idCmd, uType, pwReserved, pszName, cchMax); + + return E_NOTIMPL; +} + +STDMETHODIMP +CSendToMenu::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + return S_OK; +} + +STDMETHODIMP +CSendToMenu::HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, + LRESULT *plResult) +{ + UINT cxSmall = GetSystemMetrics(SM_CXSMICON); + UINT cySmall = GetSystemMetrics(SM_CYSMICON); + + switch (uMsg) + { + case WM_MEASUREITEM: + { + MEASUREITEMSTRUCT* lpmis = reinterpret_cast<MEASUREITEMSTRUCT*>(lParam); + if (!lpmis || lpmis->CtlType != ODT_MENU) + break; + + UINT cxMenuCheck = GetSystemMetrics(SM_CXMENUCHECK); + if (lpmis->itemWidth < cxMenuCheck) + lpmis->itemWidth = cxMenuCheck; + if (lpmis->itemHeight < cySmall) + lpmis->itemHeight = cySmall; + + if (plResult) + *plResult = TRUE; + break; + } + case WM_DRAWITEM: + { + DRAWITEMSTRUCT* lpdis = reinterpret_cast<DRAWITEMSTRUCT*>(lParam); + if (!lpdis || lpdis->CtlType != ODT_MENU) + break; + + SENDTO_ITEM *pItem = (SENDTO_ITEM *)lpdis->itemData; + HICON hIcon = NULL; + if (pItem) + hIcon = pItem->hIcon; + if (!hIcon) + break; + + RECT rcItem = lpdis->rcItem; + DrawIconEx(lpdis->hDC, 2, + lpdis->rcItem.top + (rcItem.bottom - rcItem.top - 16) / 2, + hIcon, cxSmall, cySmall, 0, NULL, DI_NORMAL); + + if (plResult) + *plResult = TRUE; + } + } + + return S_OK; +} + +STDMETHODIMP +CSendToMenu::Initialize(PCIDLIST_ABSOLUTE pidlFolder, + IDataObject *pdtobj, HKEY hkeyProgID) +{ + m_pDataObject = pdtobj; + return S_OK; +} diff --git a/dll/win32/shell32/CSendToMenu.h b/dll/win32/shell32/CSendToMenu.h new file mode 100644 index 00000000000..b8a455e6630 --- /dev/null +++ b/dll/win32/shell32/CSendToMenu.h @@ -0,0 +1,99 @@ +/* + * provides new shell item service + * + * Copyright 2019 Katayama Hirofumi MZ. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _SHV_ITEM_SENDTO_H_ +#define _SHV_ITEM_SENDTO_H_ + +extern "C" const GUID CLSID_SendToMenu; + +class CSendToMenu : + public CComCoClass<CSendToMenu, &CLSID_SendToMenu>, + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IObjectWithSite, + public IContextMenu3, + public IShellExtInit +{ +private: + struct SENDTO_ITEM + { + LPITEMIDLIST pidlChild; + LPWSTR pszText; + HICON hIcon; + SENDTO_ITEM *pNext; + }; + + HMENU m_hSubMenu; + SENDTO_ITEM *m_pItems; + UINT m_idCmdFirst; + + CComPtr<IUnknown> m_pSite; + CComPtr<IShellFolder> m_pDesktop; + CComPtr<IShellFolder> m_pSendTo; + CComPtr<IDataObject> m_pDataObject; + + BOOL LoadAllItems(HWND hwnd); + void UnloadItem(SENDTO_ITEM *pItem); + void UnloadAllItems(); + + UINT InsertSendToItems(HMENU hMenu, UINT idFirst, UINT idMenu); + + SENDTO_ITEM *FindItemFromIdOffset(UINT IdOffset); + HRESULT DoSendToItem(SENDTO_ITEM *pItem, LPCMINVOKECOMMANDINFO lpici); + + HRESULT DoDrop(IDataObject *pDataObject, IDropTarget *pDropTarget); + IShellFolder *GetSpecialFolder(HWND hwnd, int csidl, LPITEMIDLIST *ppidl = NULL); + HRESULT GetUIObjectFromPidl(HWND hwnd, LPITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut); + +public: + CSendToMenu(); + ~CSendToMenu(); + + // IObjectWithSite + STDMETHODIMP SetSite(IUnknown *pUnkSite); + STDMETHODIMP GetSite(REFIID riid, void **ppvSite); + + // IContextMenu + STDMETHODIMP QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); + STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); + STDMETHODIMP GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + + // IContextMenu3 + STDMETHODIMP HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult); + + // IContextMenu2 + STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + + // IShellExtInit + STDMETHODIMP Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + + DECLARE_REGISTRY_RESOURCEID(IDR_SENDTOMENU) + DECLARE_NOT_AGGREGATABLE(CSendToMenu) + DECLARE_PROTECT_FINAL_CONSTRUCT() + + BEGIN_COM_MAP(CSendToMenu) + COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu3, IContextMenu3) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit) + END_COM_MAP() +}; + +#endif /* _SHV_ITEM_SENDTO_H_ */ diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc index 66935c43133..ac083431deb 100644 --- a/dll/win32/shell32/lang/bg-BG.rc +++ b/dll/win32/shell32/lang/bg-BG.rc @@ -873,6 +873,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Папка" diff --git a/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc index a8df7f1d04c..1a4ba5be874 100644 --- a/dll/win32/shell32/lang/ca-ES.rc +++ b/dll/win32/shell32/lang/ca-ES.rc @@ -815,7 +815,7 @@ BEGIN IDS_FAVORITES "Favorites" IDS_STARTUP "Start Menu\\Programs\\StartUp" IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Start Menu" IDS_MYMUSIC "My Music" IDS_MYVIDEO "My Videos" @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Folder" diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc index 7df419e9e25..eb4da556af9 100644 --- a/dll/win32/shell32/lang/cs-CZ.rc +++ b/dll/win32/shell32/lang/cs-CZ.rc @@ -821,7 +821,7 @@ BEGIN IDS_FAVORITES "Oblíbené" IDS_STARTUP "Nabídka Start\\Programy\\Po spuštění" IDS_RECENT "Poslední dokumenty" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Nabídka Start" IDS_MYMUSIC "Hudba" IDS_MYVIDEO "Filmy" @@ -878,6 +878,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Složka" diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc index 58cb3d542cf..445c85a043e 100644 --- a/dll/win32/shell32/lang/da-DK.rc +++ b/dll/win32/shell32/lang/da-DK.rc @@ -878,6 +878,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Folder" diff --git a/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc index c27ddcc3605..0061ff76d81 100644 --- a/dll/win32/shell32/lang/de-DE.rc +++ b/dll/win32/shell32/lang/de-DE.rc @@ -873,6 +873,7 @@ BEGIN IDS_CANTEJECTMEDIA "Auswerfen des Mediums nicht möglich (Fehlercode: %lu)." IDS_CANTSHOWPROPERTIES "Anzeigen der Eigenschaften nicht möglich (Fehlercode: %lu)." IDS_CANTDISCONNECT "Trennen nicht möglich (Fehlercode: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Dateiordner" diff --git a/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc index 2f54284ad72..0240442978f 100644 --- a/dll/win32/shell32/lang/el-GR.rc +++ b/dll/win32/shell32/lang/el-GR.rc @@ -815,7 +815,7 @@ BEGIN IDS_FAVORITES "Favorites" IDS_STARTUP "Start Menu\\Programs\\StartUp" IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Start Menu" IDS_MYMUSIC "My Music" IDS_MYVIDEO "My Videos" @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Folder" diff --git a/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc index bd6f5bf13f0..80ae4fdfb72 100644 --- a/dll/win32/shell32/lang/en-GB.rc +++ b/dll/win32/shell32/lang/en-GB.rc @@ -815,7 +815,7 @@ BEGIN IDS_FAVORITES "Favorites" IDS_STARTUP "Start Menu\\Programs\\StartUp" IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Start Menu" IDS_MYMUSIC "My Music" IDS_MYVIDEO "My Videos" @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Folder" diff --git a/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc index ab0e99822f0..3e049ea5877 100644 --- a/dll/win32/shell32/lang/en-US.rc +++ b/dll/win32/shell32/lang/en-US.rc @@ -815,7 +815,7 @@ BEGIN IDS_FAVORITES "Favorites" IDS_STARTUP "Start Menu\\Programs\\StartUp" IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Start Menu" IDS_MYMUSIC "My Music" IDS_MYVIDEO "My Videos" @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Folder" diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc index 99a3f9fe8fc..95c57999784 100644 --- a/dll/win32/shell32/lang/es-ES.rc +++ b/dll/win32/shell32/lang/es-ES.rc @@ -880,6 +880,7 @@ BEGIN IDS_CANTEJECTMEDIA "No se pudo extraer la unidad (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "No se puede mostrar las propiedades (Error Code: %lu)." IDS_CANTDISCONNECT "No se pudo desconectar (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Directorio" diff --git a/dll/win32/shell32/lang/et-EE.rc b/dll/win32/shell32/lang/et-EE.rc index e3f70243acc..295b6f3a4a8 100644 --- a/dll/win32/shell32/lang/et-EE.rc +++ b/dll/win32/shell32/lang/et-EE.rc @@ -822,7 +822,7 @@ BEGIN IDS_FAVORITES "Lemmikud" IDS_STARTUP "Start Menu\\Programs\\StartUp" IDS_RECENT "Hiljutised" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Start Menüü" IDS_MYMUSIC "Minu muusika" IDS_MYVIDEO "Minu videod" @@ -879,6 +879,7 @@ BEGIN IDS_CANTEJECTMEDIA "Ei saa meediumit väljutada (Veateade: %lu)." IDS_CANTSHOWPROPERTIES "Ei saa atribuute näidata (Veateade: %lu)." IDS_CANTDISCONNECT "Ei saa lahti ühendada (Veateade: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Kaust" diff --git a/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc index d45b70b30b4..c3d16d96d90 100644 --- a/dll/win32/shell32/lang/fi-FI.rc +++ b/dll/win32/shell32/lang/fi-FI.rc @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Folder" diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc index 50cbedfd9a0..f93ce816bb6 100644 --- a/dll/win32/shell32/lang/fr-FR.rc +++ b/dll/win32/shell32/lang/fr-FR.rc @@ -815,7 +815,7 @@ BEGIN IDS_FAVORITES "Favoris" IDS_STARTUP "Menu Démarrer\\Programmes\\Démarrage" IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Menu Démarrer" IDS_MYMUSIC "Ma musique" IDS_MYVIDEO "Mes vidéos" @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Impossible d'éjecter le média (code d'erreur : %lu)." IDS_CANTSHOWPROPERTIES "Impossible de montrer les propriétés (code d'erreur : %lu)." IDS_CANTDISCONNECT "Impossible de déconnecter (code d'erreur : %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Dossier" diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc index 648e2870851..ff7da470c61 100644 --- a/dll/win32/shell32/lang/he-IL.rc +++ b/dll/win32/shell32/lang/he-IL.rc @@ -874,6 +874,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "תיקיה" diff --git a/dll/win32/shell32/lang/hi-IN.rc b/dll/win32/shell32/lang/hi-IN.rc index 10d651995c6..76e7cc2a6d0 100644 --- a/dll/win32/shell32/lang/hi-IN.rc +++ b/dll/win32/shell32/lang/hi-IN.rc @@ -867,6 +867,7 @@ BEGIN IDS_CANTEJECTMEDIA "मीडिया को इजेक्ट करने में असमर्थ (एरर कोड: %lu)." IDS_CANTSHOWPROPERTIES "गुण दिखाने में असमर्थ (एरर कोड: %lu)." IDS_CANTDISCONNECT "डिस्कनेक्ट करने में असमर्थ (एरर कोड: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "फोल्डर" diff --git a/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc index c53607bca99..d840240b990 100644 --- a/dll/win32/shell32/lang/hu-HU.rc +++ b/dll/win32/shell32/lang/hu-HU.rc @@ -815,7 +815,7 @@ BEGIN IDS_FAVORITES "Kedvencek" IDS_STARTUP "Start Menu\\Programs\\Automatikus indítás" /* MS style: Indítópult */ IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Start Menu" IDS_MYMUSIC "Zenék" IDS_MYVIDEO "Videók" @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Folder" diff --git a/dll/win32/shell32/lang/id-ID.rc b/dll/win32/shell32/lang/id-ID.rc index 342e66f1053..4e9a7c654e2 100644 --- a/dll/win32/shell32/lang/id-ID.rc +++ b/dll/win32/shell32/lang/id-ID.rc @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Tidak bisa mengeluarkan media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Tidak bisa menampilkan properti (Error Code: %lu)." IDS_CANTDISCONNECT "Tidak bisa memutuskan (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Folder" diff --git a/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc index 8816f1b0d4d..a109c0d74fc 100644 --- a/dll/win32/shell32/lang/it-IT.rc +++ b/dll/win32/shell32/lang/it-IT.rc @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Cartella" diff --git a/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc index c6e8f3fb974..957ba56388a 100644 --- a/dll/win32/shell32/lang/ja-JP.rc +++ b/dll/win32/shell32/lang/ja-JP.rc @@ -812,7 +812,7 @@ BEGIN IDS_FAVORITES "Favorites" IDS_STARTUP "スタート メニュー\\プログラム\\スタートアップ" IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "送る(&N)" IDS_STARTMENU "スタート メニュー" IDS_MYMUSIC "My Music" IDS_MYVIDEO "My Videos" @@ -869,6 +869,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "フォルダ" diff --git a/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc index 1f959484194..3647553a1f0 100644 --- a/dll/win32/shell32/lang/ko-KR.rc +++ b/dll/win32/shell32/lang/ko-KR.rc @@ -815,7 +815,7 @@ BEGIN IDS_FAVORITES "Favorites" IDS_STARTUP "Start Menu\\Programs\\StartUp" IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Start Menu" IDS_MYMUSIC "My Music" IDS_MYVIDEO "My Videos" @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Folder" diff --git a/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc index 2253aa474c7..db458b1b9e1 100644 --- a/dll/win32/shell32/lang/nl-NL.rc +++ b/dll/win32/shell32/lang/nl-NL.rc @@ -815,7 +815,7 @@ BEGIN IDS_FAVORITES "Favorites" IDS_STARTUP "Start Menu\\Programs\\StartUp" IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Start Menu" IDS_MYMUSIC "My Music" IDS_MYVIDEO "My Videos" @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Folder" diff --git a/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc index befbb8ec170..8dfeb901bba 100644 --- a/dll/win32/shell32/lang/no-NO.rc +++ b/dll/win32/shell32/lang/no-NO.rc @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Mappe" diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc index a97ee367e23..66461af8b7b 100644 --- a/dll/win32/shell32/lang/pl-PL.rc +++ b/dll/win32/shell32/lang/pl-PL.rc @@ -877,6 +877,7 @@ BEGIN IDS_CANTEJECTMEDIA "Nie można wysunąć nośnika (kod błędu: %lu)." IDS_CANTSHOWPROPERTIES "Nie można pokazać właściwości (kod błędu: %lu)." IDS_CANTDISCONNECT "Nie można odłączyć (kod błędu: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Katalog" diff --git a/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc index 75de4889eae..2e9abdc3702 100644 --- a/dll/win32/shell32/lang/pt-BR.rc +++ b/dll/win32/shell32/lang/pt-BR.rc @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Pasta" diff --git a/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc index 7bd2cf27e61..26e26d915cf 100644 --- a/dll/win32/shell32/lang/pt-PT.rc +++ b/dll/win32/shell32/lang/pt-PT.rc @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Pasta" diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc index b38c1cdb31e..a53281668b8 100644 --- a/dll/win32/shell32/lang/ro-RO.rc +++ b/dll/win32/shell32/lang/ro-RO.rc @@ -874,6 +874,7 @@ BEGIN IDS_CANTEJECTMEDIA "Eșec la scoaterea mediului de stocare (Cod de eroare: %lu)." IDS_CANTSHOWPROPERTIES "Eșec la inspecția proprietăților (Cod de eroare: %lu)." IDS_CANTDISCONNECT "Eșec la deconectare (Cod de eroare: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Dosar" diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc index cb72c7e7da1..2072afb9558 100644 --- a/dll/win32/shell32/lang/ru-RU.rc +++ b/dll/win32/shell32/lang/ru-RU.rc @@ -879,6 +879,7 @@ BEGIN IDS_CANTEJECTMEDIA "Не удалось извлечь носитель (код ошибки: %lu)." IDS_CANTSHOWPROPERTIES "Не удалось вывести свойства (код ошибки: %lu)." IDS_CANTDISCONNECT "Не удалось отсоединить сетевой диск (код ошибки: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Папка с файлами" diff --git a/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc index 4801c057129..96f9637d067 100644 --- a/dll/win32/shell32/lang/sk-SK.rc +++ b/dll/win32/shell32/lang/sk-SK.rc @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Priečinok" diff --git a/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc index 8865ff95873..01c5658256d 100644 --- a/dll/win32/shell32/lang/sl-SI.rc +++ b/dll/win32/shell32/lang/sl-SI.rc @@ -815,7 +815,7 @@ BEGIN IDS_FAVORITES "Favorites" IDS_STARTUP "Start Menu\\Programs\\StartUp" IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Start Menu" IDS_MYMUSIC "My Music" IDS_MYVIDEO "My Videos" @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Folder" diff --git a/dll/win32/shell32/lang/sq-AL.rc b/dll/win32/shell32/lang/sq-AL.rc index 6bd6e06a641..a7718e6dab9 100644 --- a/dll/win32/shell32/lang/sq-AL.rc +++ b/dll/win32/shell32/lang/sq-AL.rc @@ -876,6 +876,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Dosje" diff --git a/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc index 21d140c3078..029468c5ea6 100644 --- a/dll/win32/shell32/lang/sv-SE.rc +++ b/dll/win32/shell32/lang/sv-SE.rc @@ -815,7 +815,7 @@ BEGIN IDS_FAVORITES "Favoriter" IDS_STARTUP "Start-meny\\Program\\Autostart" IDS_RECENT "Tidigare" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "Start-meny" IDS_MYMUSIC "Min musik" IDS_MYVIDEO "Mina videoklipp" @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Mapp" diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc index 672d522488d..6b491372bf9 100644 --- a/dll/win32/shell32/lang/tr-TR.rc +++ b/dll/win32/shell32/lang/tr-TR.rc @@ -874,6 +874,7 @@ BEGIN IDS_CANTEJECTMEDIA "Unable to eject media (Error Code: %lu)." IDS_CANTSHOWPROPERTIES "Unable to show properties (Error Code: %lu)." IDS_CANTDISCONNECT "Unable to disconnect (Error Code: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Dizin" diff --git a/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc index 7c1de4f9dcd..96b20ade200 100644 --- a/dll/win32/shell32/lang/uk-UA.rc +++ b/dll/win32/shell32/lang/uk-UA.rc @@ -872,6 +872,7 @@ BEGIN IDS_CANTEJECTMEDIA "Не вдалось відключити носій (код помилки: %lu)." IDS_CANTSHOWPROPERTIES "Не вдалось відкрити властивості (код помилки: %lu)." IDS_CANTDISCONNECT "Не вдалось відключити (код помилки: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "Папка" diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc index c8422233f31..b8881df8db0 100644 --- a/dll/win32/shell32/lang/zh-CN.rc +++ b/dll/win32/shell32/lang/zh-CN.rc @@ -825,7 +825,7 @@ BEGIN IDS_FAVORITES "收藏夹" IDS_STARTUP "「开始」菜单\\程序\\启动" IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "「开始」菜单" IDS_MYMUSIC "我的音乐" IDS_MYVIDEO "我的视频" @@ -882,6 +882,7 @@ BEGIN IDS_CANTEJECTMEDIA "无法弹出媒体 (错误代码: %lu)." IDS_CANTSHOWPROPERTIES "无法显示属性 (错误代码: %lu)." IDS_CANTDISCONNECT "无法断开连接 (错误代码: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "文件夹" diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc index 23d31c02a43..f3d35038a32 100644 --- a/dll/win32/shell32/lang/zh-TW.rc +++ b/dll/win32/shell32/lang/zh-TW.rc @@ -826,7 +826,7 @@ BEGIN IDS_FAVORITES "我的最愛" IDS_STARTUP "「開始」功能表\\程式\\啟動" IDS_RECENT "Recent" - IDS_SENDTO "SendTo" + IDS_SENDTO "Se&nd To" IDS_STARTMENU "「開始」功能表" IDS_MYMUSIC "我的音樂" IDS_MYVIDEO "我的影片" @@ -883,6 +883,7 @@ BEGIN IDS_CANTEJECTMEDIA "無法退出媒體 (錯誤碼: %lu)." IDS_CANTSHOWPROPERTIES "無法顯示內容 (錯誤碼: %lu)." IDS_CANTDISCONNECT "無法中斷 (錯誤碼: %lu)." + IDS_NONE "(None)" /* Friendly File Type Names */ IDS_DIRECTORY "資料夾" diff --git a/dll/win32/shell32/precomp.h b/dll/win32/shell32/precomp.h index 62aad907b1d..c58886e49ef 100644 --- a/dll/win32/shell32/precomp.h +++ b/dll/win32/shell32/precomp.h @@ -80,6 +80,7 @@ #include "droptargets/CFSDropTarget.h" #include "COpenWithMenu.h" #include "CNewMenu.h" +#include "CSendToMenu.h" #include "dialogs/filedefext.h" #include "dialogs/drvdefext.h" #include "CQueryAssociations.h" diff --git a/dll/win32/shell32/res/rgs/sendtomenu.rgs b/dll/win32/shell32/res/rgs/sendtomenu.rgs new file mode 100644 index 00000000000..7b577b738c2 --- /dev/null +++ b/dll/win32/shell32/res/rgs/sendtomenu.rgs @@ -0,0 +1,26 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {7BA4C740-9E81-11CF-99D3-00AA004AE837} = s 'ReactOS SendTo Object Service' + { + val flags = d '1' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } + NoRemove AllFilesystemObjects + { + NoRemove shellex + { + NoRemove ContextMenuHandlers + { + ForceRemove SendTo = s '{7BA4C740-9E81-11CF-99D3-00AA004AE837}' + { + } + } + } + } +} diff --git a/dll/win32/shell32/rgs_res.rc b/dll/win32/shell32/rgs_res.rc index c50480d3fd1..d46053ddd99 100644 --- a/dll/win32/shell32/rgs_res.rc +++ b/dll/win32/shell32/rgs_res.rc @@ -29,3 +29,4 @@ IDR_REBARBANDSITE REGISTRY "res/rgs/rebarbandsite.rgs" IDR_USERNOTIFICATION REGISTRY "res/rgs/usernotification.rgs" IDR_SHELL REGISTRY "res/rgs/shell.rgs" IDR_ACTIVEDESKTOP REGISTRY "res/rgs/activedesktop.rgs" +IDR_SENDTOMENU REGISTRY "res/rgs/sendtomenu.rgs" diff --git a/dll/win32/shell32/shell32.cpp b/dll/win32/shell32/shell32.cpp index d75dccd5968..c244477cf6b 100644 --- a/dll/win32/shell32/shell32.cpp +++ b/dll/win32/shell32/shell32.cpp @@ -289,6 +289,7 @@ BEGIN_OBJECT_MAP(ObjectMap) OBJECT_ENTRY(CLSID_RecycleBin, CRecycleBin) OBJECT_ENTRY(CLSID_OpenWithMenu, COpenWithMenu) OBJECT_ENTRY(CLSID_NewMenu, CNewMenu) + OBJECT_ENTRY(CLSID_SendToMenu, CSendToMenu) OBJECT_ENTRY(CLSID_StartMenu, CStartMenuDummy) OBJECT_ENTRY(CLSID_MenuBandSite, CMenuSite) OBJECT_ENTRY(CLSID_MenuBand, CMenuBand) diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h index 9f7d6747cfb..766f32f07dc 100644 --- a/dll/win32/shell32/shresdef.h +++ b/dll/win32/shell32/shresdef.h @@ -140,6 +140,7 @@ #define IDS_CANTEJECTMEDIA 158 #define IDS_CANTSHOWPROPERTIES 159 #define IDS_CANTDISCONNECT 160 +#define IDS_NONE 161 /* Friendly File Type Names */ #define IDS_DIRECTORY 200 @@ -811,3 +812,4 @@ #define IDR_USERNOTIFICATION 155 #define IDR_SHELL 156 #define IDR_ACTIVEDESKTOP 157 +#define IDR_SENDTOMENU 158
5 years, 1 month
1
0
0
0
[reactos] 02/02: [ROSAPPS] Fix GCC8 warnings
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=97d937add160da97bca50…
commit 97d937add160da97bca5060f10df4b3f10ce5f2e Author: Victor Perevertkin <victor(a)perevertkin.ru> AuthorDate: Wed Nov 6 11:54:24 2019 +0300 Commit: Victor Perevertkin <victor(a)perevertkin.ru> CommitDate: Thu Nov 7 22:32:15 2019 +0300 [ROSAPPS] Fix GCC8 warnings --- .../applications/devutils/createspec/CMakeLists.txt | 4 ++++ .../applications/devutils/vgafontedit/fontboxeswnd.c | 7 ------- .../applications/devutils/vgafontedit/precomp.h | 7 ++++++- .../applications/explorer-old/utility/dragdropimpl.h | 18 +++++++++--------- .../rosapps/applications/net/ncftp/ncftp/progress.c | 2 +- modules/rosapps/applications/net/roshttpd/config.cpp | 2 +- modules/rosapps/applications/net/roshttpd/httpd.cpp | 10 +++++----- .../rosapps/applications/net/roshttpd/roshttpd.cpp | 2 +- modules/rosapps/applications/sysutils/man/man.c | 19 +++++++++++-------- .../applications/sysutils/regexpl/Console.cpp | 4 +++- .../applications/sysutils/screenshot/screenshot.c | 20 ++++++++++++-------- 11 files changed, 53 insertions(+), 42 deletions(-) diff --git a/modules/rosapps/applications/devutils/createspec/CMakeLists.txt b/modules/rosapps/applications/devutils/createspec/CMakeLists.txt index a517326f4fc..670c1d749b2 100644 --- a/modules/rosapps/applications/devutils/createspec/CMakeLists.txt +++ b/modules/rosapps/applications/devutils/createspec/CMakeLists.txt @@ -1,4 +1,8 @@ +if(GCC AND GCC_VERSION VERSION_GREATER 7) + add_compile_flags("-Wno-stringop-overflow") +endif() + add_executable(createspec createspec.c) set_module_type(createspec win32cui) target_link_libraries(createspec wine) diff --git a/modules/rosapps/applications/devutils/vgafontedit/fontboxeswnd.c b/modules/rosapps/applications/devutils/vgafontedit/fontboxeswnd.c index ec5f57fd62c..60bc7bdf187 100644 --- a/modules/rosapps/applications/devutils/vgafontedit/fontboxeswnd.c +++ b/modules/rosapps/applications/devutils/vgafontedit/fontboxeswnd.c @@ -30,13 +30,6 @@ GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect CharacterRect->bottom = CharacterRect->top + CHARACTER_BOX_HEIGHT; } -__inline VOID -GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn) -{ - *uFontRow = uCharacter / 16; - *uFontColumn = uCharacter % 16; -} - static INT FontBoxesHitTest(IN UINT xPos, IN UINT yPos, OUT LPRECT CharacterRect) { diff --git a/modules/rosapps/applications/devutils/vgafontedit/precomp.h b/modules/rosapps/applications/devutils/vgafontedit/precomp.h index 94ac9ddfbfa..2e4ac775418 100644 --- a/modules/rosapps/applications/devutils/vgafontedit/precomp.h +++ b/modules/rosapps/applications/devutils/vgafontedit/precomp.h @@ -136,9 +136,14 @@ VOID CreateFontBoxesWindow(PFONT_WND_INFO FontWndInfo); BOOL InitFontBoxesWndClass(VOID); VOID UnInitFontBoxesWndClass(VOID); VOID GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect); -__inline VOID GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn); VOID EditCurrentGlyph(PFONT_WND_INFO FontWndInfo); +inline VOID GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn) +{ + *uFontRow = uCharacter / 16; + *uFontColumn = uCharacter % 16; +} + // fontwnd.c BOOL CreateFontWindow(PMAIN_WND_INFO MainWndInfo, PFONT_OPEN_INFO OpenInfo); BOOL InitFontWndClass(VOID); diff --git a/modules/rosapps/applications/explorer-old/utility/dragdropimpl.h b/modules/rosapps/applications/explorer-old/utility/dragdropimpl.h index 6a59c67a078..6ba857f225f 100644 --- a/modules/rosapps/applications/explorer-old/utility/dragdropimpl.h +++ b/modules/rosapps/applications/explorer-old/utility/dragdropimpl.h @@ -246,15 +246,15 @@ public: if (pDragSourceHelper == NULL) return E_FAIL; - SHDRAGIMAGE di; - BITMAP bm; - GetObject(hBitmap, sizeof(bm), &bm); - di.sizeDragImage.cx = bm.bmWidth; - di.sizeDragImage.cy = bm.bmHeight; - di.hbmpDragImage = hBitmap; - di.crColorKey = crColorKey; - di.ptOffset.x = pt.x - rc.left; - di.ptOffset.y = pt.y - rc.top; + SHDRAGIMAGE di; + BITMAP bm; + GetObject(hBitmap, sizeof(bm), &bm); + di.sizeDragImage.cx = bm.bmWidth; + di.sizeDragImage.cy = bm.bmHeight; + di.hbmpDragImage = hBitmap; + di.crColorKey = crColorKey; + di.ptOffset.x = pt.x - rc.left; + di.ptOffset.y = pt.y - rc.top; return pDragSourceHelper->InitializeFromBitmap(&di, pDataObject); } diff --git a/modules/rosapps/applications/net/ncftp/ncftp/progress.c b/modules/rosapps/applications/net/ncftp/ncftp/progress.c index 0559f2f8d32..ef9f9ce0b0f 100644 --- a/modules/rosapps/applications/net/ncftp/ncftp/progress.c +++ b/modules/rosapps/applications/net/ncftp/ncftp/progress.c @@ -209,7 +209,7 @@ PrStatBar(const FTPCIPtr cip, int mode) static double uTotal, uMult; const char *stall; char localName[80]; - char line[128]; + char line[134]; int i; switch (mode) { diff --git a/modules/rosapps/applications/net/roshttpd/config.cpp b/modules/rosapps/applications/net/roshttpd/config.cpp index b689e1674b2..c64b8b76bbd 100644 --- a/modules/rosapps/applications/net/roshttpd/config.cpp +++ b/modules/rosapps/applications/net/roshttpd/config.cpp @@ -49,7 +49,7 @@ void CConfig::Default() try { lpsStr = _strdup(dcfgDefaultResource); DefaultResources.Insert(lpsStr); - } catch (bad_alloc e) { + } catch (bad_alloc&) { free((void *)lpsStr); Clear(); throw; diff --git a/modules/rosapps/applications/net/roshttpd/httpd.cpp b/modules/rosapps/applications/net/roshttpd/httpd.cpp index d4bb9e3a6c6..4604d8ef2e5 100644 --- a/modules/rosapps/applications/net/roshttpd/httpd.cpp +++ b/modules/rosapps/applications/net/roshttpd/httpd.cpp @@ -461,22 +461,22 @@ VOID CHttpDaemonThread::Execute() case HTTPD_START: { if (Daemon->GetState() == hsStopped) Daemon->Start(); - break; + break; } case HTTPD_STOP: { if (Daemon->GetState() == hsRunning) Daemon->Stop(); - break; + break; } case HTTPD_SUSPEND: { if (Daemon->GetState() == hsRunning){} // FIXME: Suspend service - break; + break; } case HTTPD_RESUME: { if (Daemon->GetState() != hsSuspended){} // FIXME: Resume service - break; + break; } default: DispatchMessage(&Msg); @@ -486,7 +486,7 @@ VOID CHttpDaemonThread::Execute() delete Daemon; } catch (ESocket e) { ReportErrorStr(e.what()); - } catch (bad_alloc e) { + } catch (bad_alloc&) { ReportErrorStr(TS("Insufficient resources.")); } } diff --git a/modules/rosapps/applications/net/roshttpd/roshttpd.cpp b/modules/rosapps/applications/net/roshttpd/roshttpd.cpp index 89af9bf5290..c4a911448b3 100644 --- a/modules/rosapps/applications/net/roshttpd/roshttpd.cpp +++ b/modules/rosapps/applications/net/roshttpd/roshttpd.cpp @@ -45,7 +45,7 @@ VOID Run() if (pConfiguration != NULL) delete pConfiguration; - } catch (bad_alloc e) { + } catch (bad_alloc&) { if (pConfiguration != NULL) delete pConfiguration; ReportErrorStr(TS("Insufficient resources.")); diff --git a/modules/rosapps/applications/sysutils/man/man.c b/modules/rosapps/applications/sysutils/man/man.c index 3c54eb346a5..e382972b08d 100644 --- a/modules/rosapps/applications/sysutils/man/man.c +++ b/modules/rosapps/applications/sysutils/man/man.c @@ -155,10 +155,10 @@ void text_outp(char *cur_string) while(cur_string[symbol]!=' ') symbol++; - for(;cur_string[symbol]!='\n'; symbol++) putchar(cur_string[symbol]); - putchar(' '); + + putchar(' '); } int @@ -214,13 +214,16 @@ AnalyzeFile() putchar(' '); } - else text_outp(cur_string); // print plane text - th_outp(cur_string, THtag); -/* END of TAGs processing */ - free(cur_string); - free(THtag); + else + { + text_outp(cur_string); // print plane text + } + th_outp(cur_string, THtag); + /* END of TAGs processing */ - return 0; + free(cur_string); + free(THtag); + return 0; } diff --git a/modules/rosapps/applications/sysutils/regexpl/Console.cpp b/modules/rosapps/applications/sysutils/regexpl/Console.cpp index 0f61aa0d50d..98219a349e6 100644 --- a/modules/rosapps/applications/sysutils/regexpl/Console.cpp +++ b/modules/rosapps/applications/sysutils/regexpl/Console.cpp @@ -716,7 +716,9 @@ Paste: ASSERT(dwCompletionOffset <= dwCurrentCharOffset); // Save not changing part (context) of completion in m_pchBuffer1 - _tcsncpy(m_pchBuffer1,m_pchBuffer,dwCompletionOffset); + + // FIXME: dwCompletionOffset is always 0 here + // _tcsncpy(m_pchBuffer1,m_pchBuffer,dwCompletionOffset); m_pchBuffer1[dwCompletionOffset] = 0; // Size of changing part diff --git a/modules/rosapps/applications/sysutils/screenshot/screenshot.c b/modules/rosapps/applications/sysutils/screenshot/screenshot.c index d71d7f4aebf..233010145f1 100644 --- a/modules/rosapps/applications/sysutils/screenshot/screenshot.c +++ b/modules/rosapps/applications/sysutils/screenshot/screenshot.c @@ -272,14 +272,18 @@ ConvertDDBtoDIB(PSCREENSHOT pScrSht) cClrBits = 24; else cClrBits = 32; - if (cClrBits != 24) - pScrSht->lpbi = (PBITMAPINFO) HeapAlloc(GetProcessHeap(), - 0, - sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * (1 << cClrBits)); - else - pScrSht->lpbi = (PBITMAPINFO) HeapAlloc(GetProcessHeap(), - 0, - sizeof(BITMAPINFOHEADER)); + if (cClrBits != 24) + { + pScrSht->lpbi = (PBITMAPINFO) HeapAlloc(GetProcessHeap(), + 0, + sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * (1 << cClrBits)); + } + else + { + pScrSht->lpbi = (PBITMAPINFO) HeapAlloc(GetProcessHeap(), + 0, + sizeof(BITMAPINFOHEADER)); + } if (!pScrSht->lpbi) {
5 years, 1 month
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
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