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 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
18 participants
225 discussions
Start a n
N
ew thread
[reactos] 01/01: [PSDK] Add some missing definitions. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=87801a65f7228446d4ea8…
commit 87801a65f7228446d4ea8b9b84ec5c500afcea15 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 1 19:40:17 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Dec 1 19:40:17 2019 +0100 [PSDK] Add some missing definitions. CORE-16441 --- sdk/include/psdk/windef.h | 15 ++++++++++ sdk/include/psdk/wingdi.h | 4 +++ sdk/include/psdk/winuser.h | 74 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) diff --git a/sdk/include/psdk/windef.h b/sdk/include/psdk/windef.h index bd0278a2181..a1f5581e3be 100644 --- a/sdk/include/psdk/windef.h +++ b/sdk/include/psdk/windef.h @@ -280,6 +280,21 @@ DECLARE_HANDLE(HMONITOR); DECLARE_HANDLE(HWINEVENTHOOK); DECLARE_HANDLE(HUMPD); +DECLARE_HANDLE(DPI_AWARENESS_CONTEXT); + +typedef enum DPI_AWARENESS { + DPI_AWARENESS_INVALID = -1, + DPI_AWARENESS_UNAWARE = 0, + DPI_AWARENESS_SYSTEM_AWARE, + DPI_AWARENESS_PER_MONITOR_AWARE +} DPI_AWARENESS; + +#define DPI_AWARENESS_CONTEXT_UNAWARE ((DPI_AWARENESS_CONTEXT)-1) +#define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ((DPI_AWARENESS_CONTEXT)-2) +#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ((DPI_AWARENESS_CONTEXT)-3) +#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((DPI_AWARENESS_CONTEXT)-4) +#define DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ((DPI_AWARENESS_CONTEXT)-5) + typedef int HFILE; typedef HICON HCURSOR; typedef DWORD COLORREF; diff --git a/sdk/include/psdk/wingdi.h b/sdk/include/psdk/wingdi.h index 5cb03cce58e..3cbfb75069d 100644 --- a/sdk/include/psdk/wingdi.h +++ b/sdk/include/psdk/wingdi.h @@ -1401,6 +1401,10 @@ typedef struct _DRAWPATRECT { #define DISPLAY_DEVICE_DISCONNECT 0x02000000 #define DISPLAY_DEVICE_REMOTE 0x04000000 #define DISPLAY_DEVICE_MODESPRUNED 0x08000000 + +#define DISPLAY_DEVICE_ACTIVE 0x00000001 +#define DISPLAY_DEVICE_ATTACHED 0x00000002 + #ifndef RC_INVOKED typedef struct _ABC { int abcA; diff --git a/sdk/include/psdk/winuser.h b/sdk/include/psdk/winuser.h index 3ec3858e12c..7e1a9ff2eb3 100644 --- a/sdk/include/psdk/winuser.h +++ b/sdk/include/psdk/winuser.h @@ -2768,6 +2768,7 @@ extern "C" { #define MONITOR_DEFAULTTOPRIMARY 1 #define MONITOR_DEFAULTTONEAREST 2 #define MONITORINFOF_PRIMARY 1 +#define EDD_GET_DEVICE_INTERFACE_NAME 0x00000001 #define EDS_RAWMODE 0x00000002 #define EDS_ROTATEDMODE 0x00000004 #define ISMEX_NOSEND 0x00000000 @@ -3932,6 +3933,41 @@ typedef struct tagRAWINPUTDEVICELIST { HANDLE hDevice; DWORD dwType; } RAWINPUTDEVICELIST,*PRAWINPUTDEVICELIST; + +typedef struct tagRID_DEVICE_INFO_MOUSE { + DWORD dwId; + DWORD dwNumberOfButtons; + DWORD dwSampleRate; + BOOL fHasHorizontalWheel; +} RID_DEVICE_INFO_MOUSE, *PRID_DEVICE_INFO_MOUSE; + +typedef struct tagRID_DEVICE_INFO_KEYBOARD { + DWORD dwType; + DWORD dwSubType; + DWORD dwKeyboardMode; + DWORD dwNumberOfFunctionKeys; + DWORD dwNumberOfIndicators; + DWORD dwNumberOfKeysTotal; +} RID_DEVICE_INFO_KEYBOARD, *PRID_DEVICE_INFO_KEYBOARD; + +typedef struct tagRID_DEVICE_INFO_HID { + DWORD dwVendorId; + DWORD dwProductId; + DWORD dwVersionNumber; + USHORT usUsagePage; + USHORT usUsage; +} RID_DEVICE_INFO_HID, *PRID_DEVICE_INFO_HID; + +typedef struct tagRID_DEVICE_INFO { + DWORD cbSize; + DWORD dwType; + union { + RID_DEVICE_INFO_MOUSE mouse; + RID_DEVICE_INFO_KEYBOARD keyboard; + RID_DEVICE_INFO_HID hid; + } DUMMYUNIONNAME; +} RID_DEVICE_INFO, *PRID_DEVICE_INFO, *LPRID_DEVICE_INFO; + #endif /* (_WIN32_WINNT >= 0x0501) */ #define AnsiToOem CharToOemA @@ -3953,6 +3989,44 @@ typedef struct tagRAWINPUTDEVICELIST { } #define POINTTOPOINTS(p) ((POINTS)MAKELONG((p).x,(p).y)) +#if (WINVER >= 0x0601) + +typedef enum tagINPUT_MESSAGE_DEVICE_TYPE { + IMDT_UNAVAILABLE = 0x00, + IMDT_KEYBOARD = 0x01, + IMDT_MOUSE = 0x02, + IMDT_TOUCH = 0x04, + IMDT_PEN = 0x08, + IMDT_TOUCHPAD = 0x10 +} INPUT_MESSAGE_DEVICE_TYPE; + +typedef enum tagINPUT_MESSAGE_ORIGIN_ID { + IMO_UNAVAILABLE = 0x00, + IMO_HARDWARE = 0x01, + IMO_INJECTED = 0x02, + IMO_SYSTEM = 0x04 +} INPUT_MESSAGE_ORIGIN_ID; + +typedef struct tagINPUT_MESSAGE_SOURCE { + INPUT_MESSAGE_DEVICE_TYPE deviceType; + INPUT_MESSAGE_ORIGIN_ID originId; +} INPUT_MESSAGE_SOURCE; + +#endif /* WINVER >= 0x0601 */ + +#if(WINVER >= 0x0602) + +enum tagPOINTER_INPUT_TYPE { + PT_POINTER = 1, + PT_TOUCH, + PT_PEN, + PT_MOUSE, + PT_TOUCHPAD +}; +typedef DWORD POINTER_INPUT_TYPE; + +#endif /* WINVER >= 0x0602 */ + HKL WINAPI ActivateKeyboardLayout(_In_ HKL, _In_ UINT); BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL); BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD);
5 years
1
0
0
0
[reactos] 01/01: [URLMON_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=98e4a3ece11813b318692…
commit 98e4a3ece11813b3186928f900bc76a9f8b0f748 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 1 19:39:54 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Dec 1 19:39:54 2019 +0100 [URLMON_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/urlmon/CMakeLists.txt | 2 +- modules/rostests/winetests/urlmon/misc.c | 56 +++++++-- modules/rostests/winetests/urlmon/protocol.c | 153 ++++++++++++++++++----- modules/rostests/winetests/urlmon/url.c | 10 +- 4 files changed, 178 insertions(+), 43 deletions(-) diff --git a/modules/rostests/winetests/urlmon/CMakeLists.txt b/modules/rostests/winetests/urlmon/CMakeLists.txt index a7595f51c4d..e0f2e49d4c2 100644 --- a/modules/rostests/winetests/urlmon/CMakeLists.txt +++ b/modules/rostests/winetests/urlmon/CMakeLists.txt @@ -14,5 +14,5 @@ list(APPEND SOURCE add_executable(urlmon_winetest ${SOURCE}) target_link_libraries(urlmon_winetest uuid) set_module_type(urlmon_winetest win32cui) -add_importlibs(urlmon_winetest urlmon wininet ole32 oleaut32 user32 advapi32 msvcrt kernel32) +add_importlibs(urlmon_winetest urlmon wininet ole32 oleaut32 shlwapi user32 advapi32 msvcrt kernel32) add_rostests_file(TARGET urlmon_winetest) diff --git a/modules/rostests/winetests/urlmon/misc.c b/modules/rostests/winetests/urlmon/misc.c index ff0f24ed764..6f4da47e6e8 100644 --- a/modules/rostests/winetests/urlmon/misc.c +++ b/modules/rostests/winetests/urlmon/misc.c @@ -61,6 +61,8 @@ DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xA }while(0) DEFINE_EXPECT(ParseUrl); +DEFINE_EXPECT(ParseUrl_ENCODE); +DEFINE_EXPECT(ParseUrl_UNESCAPE); DEFINE_EXPECT(QI_IInternetProtocolInfo); DEFINE_EXPECT(CreateInstance); DEFINE_EXPECT(unk_Release); @@ -381,6 +383,13 @@ static void test_CoInternetParseUrl(void) ok(size == lstrlenW(parse_tests[i].encoded_url), "[%d] wrong size\n", i); ok(!lstrcmpW(parse_tests[i].encoded_url, buf), "[%d] wrong encoded url\n", i); + memset(buf, 0xf0, sizeof(buf)); + hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_UNESCAPE, 0, buf, + ARRAY_SIZE(buf), &size, 0); + ok(hres == S_OK, "[%d] encoding failed: %08x\n", i, hres); + ok(size == lstrlenW(parse_tests[i].encoded_url), "[%d] wrong size\n", i); + ok(!lstrcmpW(parse_tests[i].encoded_url, buf), "[%d] wrong encoded url\n", i); + memset(buf, 0xf0, sizeof(buf)); hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_PATH_FROM_URL, 0, buf, ARRAY_SIZE(buf), &size, 0); @@ -875,9 +884,9 @@ static HRESULT WINAPI InternetProtocolInfo_ParseUrl(IInternetProtocolInfo *iface PARSEACTION ParseAction, DWORD dwParseFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved) { - CHECK_EXPECT2(ParseUrl); - - if(ParseAction == PARSE_SECURITY_URL) { + switch(ParseAction) { + case PARSE_SECURITY_URL: + CHECK_EXPECT2(ParseUrl); if(pcchResult) *pcchResult = ARRAY_SIZE(url1); @@ -886,6 +895,17 @@ static HRESULT WINAPI InternetProtocolInfo_ParseUrl(IInternetProtocolInfo *iface memcpy(pwzResult, url1, sizeof(url1)); return S_OK; + case PARSE_ENCODE: + CHECK_EXPECT2(ParseUrl_ENCODE); + break; + + case PARSE_UNESCAPE: + CHECK_EXPECT2(ParseUrl_UNESCAPE); + break; + + default: + CHECK_EXPECT2(ParseUrl); + break; } return E_NOTIMPL; @@ -1030,24 +1050,34 @@ static void test_NameSpace(void) expect_cf = &test_protocol_cf; SET_EXPECT(QI_IInternetProtocolInfo); SET_EXPECT(CreateInstance); - SET_EXPECT(ParseUrl); + SET_EXPECT(ParseUrl_ENCODE); hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); CHECK_CALLED(QI_IInternetProtocolInfo); CHECK_CALLED(CreateInstance); - CHECK_CALLED(ParseUrl); + CHECK_CALLED(ParseUrl_ENCODE); qiret = S_OK; SET_EXPECT(QI_IInternetProtocolInfo); - SET_EXPECT(ParseUrl); + SET_EXPECT(ParseUrl_ENCODE); hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); CHECK_CALLED(QI_IInternetProtocolInfo); - CHECK_CALLED(ParseUrl); + CHECK_CALLED(ParseUrl_ENCODE); + + qiret = S_OK; + SET_EXPECT(QI_IInternetProtocolInfo); + SET_EXPECT(ParseUrl_UNESCAPE); + + hres = pCoInternetParseUrl(url8, PARSE_UNESCAPE, 0, buf, ARRAY_SIZE(buf), &size, 0); + ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); + + CHECK_CALLED(QI_IInternetProtocolInfo); + CHECK_CALLED(ParseUrl_UNESCAPE); SET_EXPECT(QI_IInternetProtocolInfo); SET_EXPECT(ParseUrl); @@ -1097,38 +1127,38 @@ static void test_NameSpace(void) ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); SET_EXPECT(QI_IInternetProtocolInfo); - SET_EXPECT(ParseUrl); + SET_EXPECT(ParseUrl_ENCODE); hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); CHECK_CALLED(QI_IInternetProtocolInfo); - CHECK_CALLED(ParseUrl); + CHECK_CALLED(ParseUrl_ENCODE); hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); SET_EXPECT(QI_IInternetProtocolInfo); - SET_EXPECT(ParseUrl); + SET_EXPECT(ParseUrl_ENCODE); hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); CHECK_CALLED(QI_IInternetProtocolInfo); - CHECK_CALLED(ParseUrl); + CHECK_CALLED(ParseUrl_ENCODE); hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); expect_cf = &test_protocol_cf2; SET_EXPECT(QI_IInternetProtocolInfo); - SET_EXPECT(ParseUrl); + SET_EXPECT(ParseUrl_ENCODE); hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, ARRAY_SIZE(buf), &size, 0); ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); CHECK_CALLED(QI_IInternetProtocolInfo); - CHECK_CALLED(ParseUrl); + CHECK_CALLED(ParseUrl_ENCODE); hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); diff --git a/modules/rostests/winetests/urlmon/protocol.c b/modules/rostests/winetests/urlmon/protocol.c index 6162a94fc8e..3f8a99967f2 100644 --- a/modules/rostests/winetests/urlmon/protocol.c +++ b/modules/rostests/winetests/urlmon/protocol.c @@ -104,6 +104,7 @@ DEFINE_EXPECT(OnResponse); DEFINE_EXPECT(Switch); DEFINE_EXPECT(Continue); DEFINE_EXPECT(CreateInstance); +DEFINE_EXPECT(CreateInstance_no_aggregation); DEFINE_EXPECT(Start); DEFINE_EXPECT(StartEx); DEFINE_EXPECT(Terminate); @@ -159,6 +160,7 @@ static DWORD prot_read, filter_state, http_post_test, thread_id; static BOOL security_problem, test_async_req, impl_protex; static BOOL async_read_pending, mimefilter_test, direct_read, wait_for_switch, emulate_prot, short_read, test_abort; static BOOL empty_file, no_mime, bind_from_cache, file_with_hash, reuse_protocol_thread; +static BOOL no_aggregation; enum { STATE_CONNECTING, @@ -214,6 +216,12 @@ static const WCHAR binding_urls[][130] = { static const CHAR post_data[] = "mode=Test"; +static LONG obj_refcount(void *obj) +{ + IUnknown_AddRef((IUnknown *)obj); + return IUnknown_Release((IUnknown *)obj); +} + static int strcmp_wa(LPCWSTR strw, const char *stra) { CHAR buf[512]; @@ -1538,15 +1546,23 @@ static HRESULT WINAPI InternetPriority_QueryInterface(IInternetPriority *iface, static ULONG WINAPI InternetPriority_AddRef(IInternetPriority *iface) { Protocol *This = impl_from_IInternetPriority(iface); - This->outer_ref++; - return IUnknown_AddRef(This->outer); + if (This->outer) + { + This->outer_ref++; + return IUnknown_AddRef(This->outer); + } + return IUnknown_AddRef(&This->IUnknown_inner); } static ULONG WINAPI InternetPriority_Release(IInternetPriority *iface) { Protocol *This = impl_from_IInternetPriority(iface); - This->outer_ref--; - return IUnknown_Release(This->outer); + if (This->outer) + { + This->outer_ref--; + return IUnknown_Release(This->outer); + } + return IUnknown_Release(&This->IUnknown_inner); } static HRESULT WINAPI InternetPriority_SetPriority(IInternetPriority *iface, LONG nPriority) @@ -1627,6 +1643,12 @@ static HRESULT WINAPI ProtocolEmul_QueryInterface(IInternetProtocolEx *iface, RE static const IID unknown_iid = {0x7daf9908,0x8415,0x4005,{0x95,0xae, 0xbd,0x27,0xf6,0xe3,0xdc,0x00}}; static const IID unknown_iid2 = {0x5b7ebc0c,0xf630,0x4cea,{0x89,0xd3,0x5a,0xf0,0x38,0xed,0x05,0x5c}}; + if(IsEqualGUID(riid, &IID_IInternetProtocolEx)) { + *ppv = &This->IInternetProtocolEx_iface; + IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface); + return S_OK; + } + /* FIXME: Why is it calling here instead of outer IUnknown? */ if(IsEqualGUID(riid, &IID_IInternetPriority)) { *ppv = &This->IInternetPriority_iface; @@ -1642,15 +1664,23 @@ static HRESULT WINAPI ProtocolEmul_QueryInterface(IInternetProtocolEx *iface, RE static ULONG WINAPI ProtocolEmul_AddRef(IInternetProtocolEx *iface) { Protocol *This = impl_from_IInternetProtocolEx(iface); - This->outer_ref++; - return IUnknown_AddRef(This->outer); + if (This->outer) + { + This->outer_ref++; + return IUnknown_AddRef(This->outer); + } + return IUnknown_AddRef(&This->IUnknown_inner); } static ULONG WINAPI ProtocolEmul_Release(IInternetProtocolEx *iface) { Protocol *This = impl_from_IInternetProtocolEx(iface); - This->outer_ref--; - return IUnknown_Release(This->outer); + if (This->outer) + { + This->outer_ref--; + return IUnknown_Release(This->outer); + } + return IUnknown_Release(&This->IUnknown_inner); } static DWORD WINAPI thread_proc(PVOID arg) @@ -2221,6 +2251,7 @@ static Protocol *impl_from_IUnknown(IUnknown *iface) static HRESULT WINAPI ProtocolUnk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) { + static const IID IID_undocumentedIE10 = {0x7daf9908,0x8415,0x4005,{0x95,0xae,0xbd,0x27,0xf6,0xe3,0xdc,0x00}}; Protocol *This = impl_from_IUnknown(iface); if(IsEqualGUID(&IID_IUnknown, riid)) { @@ -2249,6 +2280,10 @@ static HRESULT WINAPI ProtocolUnk_QueryInterface(IUnknown *iface, REFIID riid, v CHECK_EXPECT(QueryInterface_IWinInetHttpInfo); *ppv = NULL; return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_undocumentedIE10, riid)) { + trace("QI(%s)\n", wine_dbgstr_guid(riid)); + *ppv = NULL; + return E_NOINTERFACE; }else { ok(0, "unexpected call %s\n", wine_dbgstr_guid(riid)); *ppv = NULL; @@ -2575,12 +2610,21 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown { Protocol *ret; - CHECK_EXPECT(CreateInstance); - - ok(pOuter == (IUnknown*)prot_bind_info, "pOuter != protocol_unk\n"); - ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid)); ok(ppv != NULL, "ppv == NULL\n"); + if(!pOuter) { + CHECK_EXPECT(CreateInstance_no_aggregation); + ok(IsEqualGUID(&IID_IInternetProtocol, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid)); + }else { + CHECK_EXPECT(CreateInstance); + ok(pOuter == (IUnknown*)prot_bind_info, "pOuter != protocol_unk\n"); + ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid)); + if (no_aggregation) { + *ppv = NULL; + return CLASS_E_NOAGGREGATION; + } + } + ret = heap_alloc(sizeof(*ret)); ret->IUnknown_inner.lpVtbl = &ProtocolUnkVtbl; ret->IInternetProtocolEx_iface.lpVtbl = &ProtocolVtbl; @@ -2590,7 +2634,10 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown ret->outer_ref = 0; protocol_emul = ret; - *ppv = &ret->IUnknown_inner; + if (!pOuter) + *ppv = &ret->IInternetProtocolEx_iface; + else + *ppv = &ret->IUnknown_inner; return S_OK; } @@ -3769,7 +3816,7 @@ static void test_CreateBinding(void) {'t','e','s','t',':','/','/','f','i','l','e','.','h','t','m','l',0}; static const WCHAR wsz_test[] = {'t','e','s','t',0}; - trace("Testing CreateBinding...\n"); + trace("Testing CreateBinding%s...\n", no_aggregation ? "(no aggregation)" : ""); init_test(BIND_TEST, TEST_BINDING); hres = pCoInternetGetSession(0, &session, 0); @@ -3817,10 +3864,19 @@ static void test_CreateBinding(void) ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); SET_EXPECT(QueryService_InternetProtocol); + SET_EXPECT(CreateInstance); + if(no_aggregation) { + SET_EXPECT(CreateInstance_no_aggregation); + SET_EXPECT(StartEx); + }else { + SET_EXPECT(Start); + } + SET_EXPECT(ReportProgress_PROTOCOLCLASSID); SET_EXPECT(SetPriority); - SET_EXPECT(Start); + + ok(obj_refcount(protocol) == 4, "wrong protocol refcount %d\n", obj_refcount(protocol)); trace("Start >\n"); expect_hrResult = S_OK; @@ -3829,25 +3885,46 @@ static void test_CreateBinding(void) trace("Start <\n"); CHECK_CALLED(QueryService_InternetProtocol); + CHECK_CALLED(CreateInstance); + if(no_aggregation) { + CHECK_CALLED(CreateInstance_no_aggregation); + ok(obj_refcount(protocol) == 4, "wrong protocol refcount %d\n", obj_refcount(protocol)); + ok(protocol_emul->outer_ref == 0, "protocol_outer_ref = %u\n", protocol_emul->outer_ref); + }else { + ok(obj_refcount(protocol) == 5 || broken(obj_refcount(protocol) == 4) /* before win7 */, "wrong protocol refcount %d\n", + obj_refcount(protocol)); + ok(protocol_emul->outer_ref == 1 || broken(protocol_emul->outer_ref == 0) /* before win7 */, "protocol_outer_ref = %u\n", + protocol_emul->outer_ref); + } + CHECK_CALLED(ReportProgress_PROTOCOLCLASSID); CHECK_CALLED(SetPriority); - CHECK_CALLED(Start); + if(no_aggregation) + CHECK_CALLED(StartEx); + else + CHECK_CALLED(Start); - SET_EXPECT(QueryInterface_IWinInetInfo); + if(!no_aggregation) + SET_EXPECT(QueryInterface_IWinInetInfo); hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&inet_info); ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); - CHECK_CALLED(QueryInterface_IWinInetInfo); + if(!no_aggregation) + CHECK_CALLED(QueryInterface_IWinInetInfo); - SET_EXPECT(QueryInterface_IWinInetInfo); + if(!no_aggregation) + SET_EXPECT(QueryInterface_IWinInetInfo); hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&inet_info); ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); - CHECK_CALLED(QueryInterface_IWinInetInfo); + if(!no_aggregation) + CHECK_CALLED(QueryInterface_IWinInetInfo); - SET_EXPECT(QueryInterface_IWinInetHttpInfo); + if(!no_aggregation) + SET_EXPECT(QueryInterface_IWinInetHttpInfo); hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetHttpInfo, (void**)&http_info); ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); - CHECK_CALLED(QueryInterface_IWinInetHttpInfo); + if(!no_aggregation) + CHECK_CALLED(QueryInterface_IWinInetHttpInfo); SET_EXPECT(Read); read = 0xdeadbeef; @@ -3871,11 +3948,20 @@ static void test_CreateBinding(void) hres = IInternetPriority_SetPriority(priority, 101); ok(hres == S_OK, "SetPriority failed: %08x\n", hres); + if(no_aggregation) { + ok(obj_refcount(protocol) == 4, "wrong protocol refcount %d\n", obj_refcount(protocol)); + ok(protocol_emul->outer_ref == 0, "protocol_outer_ref = %u\n", protocol_emul->outer_ref); + }else { + ok(obj_refcount(protocol) == 5 || broken(obj_refcount(protocol) == 4) /* before win7 */, "wrong protocol refcount %d\n", obj_refcount(protocol)); + ok(protocol_emul->outer_ref == 1 || broken(protocol_emul->outer_ref == 0) /* before win7 */, "protocol_outer_ref = %u\n", protocol_emul->outer_ref); + } + SET_EXPECT(Terminate); hres = IInternetProtocol_Terminate(protocol, 0xdeadbeef); ok(hres == S_OK, "Terminate failed: %08x\n", hres); CHECK_CALLED(Terminate); + ok(obj_refcount(protocol) == 4, "wrong protocol refcount %d\n", obj_refcount(protocol)); ok(protocol_emul->outer_ref == 0, "protocol_outer_ref = %u\n", protocol_emul->outer_ref); SET_EXPECT(Continue); @@ -3886,12 +3972,18 @@ static void test_CreateBinding(void) SET_EXPECT(Read); read = 0xdeadbeef; hres = IInternetProtocol_Read(protocol, expect_pv = buf, sizeof(buf), &read); - todo_wine - ok(hres == E_ABORT, "Read failed: %08x\n", hres); - todo_wine - ok(read == 0, "read = %d\n", read); - todo_wine - CHECK_NOT_CALLED(Read); + if(no_aggregation) { + ok(hres == S_OK, "Read failed: %08x\n", hres); + ok(read == 100, "read = %d\n", read); + CHECK_CALLED(Read); + }else { + todo_wine + ok(hres == E_ABORT, "Read failed: %08x\n", hres); + todo_wine + ok(read == 0, "read = %d\n", read); + todo_wine + CHECK_NOT_CALLED(Read); + } hres = IInternetProtocolSink_ReportProgress(binding_sink, BINDSTATUS_CACHEFILENAMEAVAILABLE, expect_wsz = emptyW); @@ -3907,6 +3999,8 @@ static void test_CreateBinding(void) IInternetPriority_Release(priority); IInternetBindInfo_Release(prot_bind_info); + ok(obj_refcount(protocol) == 1, "wrong protocol refcount %d\n", obj_refcount(protocol)); + SET_EXPECT(Protocol_destructor); IInternetProtocol_Release(protocol); CHECK_CALLED(Protocol_destructor); @@ -4192,6 +4286,9 @@ START_TEST(protocol) test_gopher_protocol(); test_mk_protocol(); test_CreateBinding(); + no_aggregation = TRUE; + test_CreateBinding(); + no_aggregation = FALSE; bindf &= ~BINDF_FROMURLMON; trace("Testing file binding (mime verification, emulate prot)...\n"); diff --git a/modules/rostests/winetests/urlmon/url.c b/modules/rostests/winetests/urlmon/url.c index ada78c930b9..1aef981b830 100644 --- a/modules/rostests/winetests/urlmon/url.c +++ b/modules/rostests/winetests/urlmon/url.c @@ -32,6 +32,7 @@ #include "urlmon.h" #include "wininet.h" #include "mshtml.h" +#include "shlwapi.h" #include "wine/test.h" @@ -2905,7 +2906,7 @@ static void init_bind_test(int protocol, DWORD flags, DWORD t) url_a = (flags & BINDTEST_INVALID_CN) ? "
https://4.15.184.77/favicon.ico
" : "
https://test.winehq.org/tests/hello.html
"; break; case FTP_TEST: - url_a = "
ftp://ftp.winehq.org/welcome.msg
"; + url_a = "
ftp://ftp.winehq.org/welcome%2emsg
"; break; default: url_a = "winetest:test"; @@ -2969,6 +2970,13 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t) if(FAILED(hres)) return; + if(protocol == FTP_TEST) + { + /* FTP urls don't have any escape characters so convert the url to what is expected */ + DWORD size = 0; + UrlUnescapeW(current_url, NULL, &size, URL_UNESCAPE_INPLACE); + } + hres = IMoniker_QueryInterface(mon, &IID_IBinding, (void**)&bind); ok(hres == E_NOINTERFACE, "IMoniker should not have IBinding interface\n"); if(SUCCEEDED(hres))
5 years
1
0
0
0
[reactos] 01/01: [URLMON] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6c3c2e33f63b9e6214978…
commit 6c3c2e33f63b9e621497807591555304ecdd37ec Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 1 19:39:31 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Dec 1 19:39:31 2019 +0100 [URLMON] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/urlmon/axinstall.c | 34 ++++++++-------- dll/win32/urlmon/bindctx.c | 2 +- dll/win32/urlmon/binding.c | 4 +- dll/win32/urlmon/bindprot.c | 23 +++++++---- dll/win32/urlmon/file.c | 16 ++++---- dll/win32/urlmon/ftp.c | 33 +++++++++------- dll/win32/urlmon/http.c | 20 +++++----- dll/win32/urlmon/internet.c | 11 +++--- dll/win32/urlmon/mimefilter.c | 16 ++++---- dll/win32/urlmon/mk.c | 16 ++++---- dll/win32/urlmon/protocol.c | 2 +- dll/win32/urlmon/sec_mgr.c | 42 +++++++++----------- dll/win32/urlmon/session.c | 12 +++--- dll/win32/urlmon/umon.c | 4 +- dll/win32/urlmon/uri.c | 90 ++++++++++++++++++++---------------------- dll/win32/urlmon/urlmon_main.c | 38 ++++++++++++++++-- dll/win32/urlmon/urlmon_main.h | 13 +++--- media/doc/README.WINE | 2 +- 18 files changed, 206 insertions(+), 172 deletions(-) diff --git a/dll/win32/urlmon/axinstall.c b/dll/win32/urlmon/axinstall.c index 86beb09e568..5632550e86c 100644 --- a/dll/win32/urlmon/axinstall.c +++ b/dll/win32/urlmon/axinstall.c @@ -213,8 +213,8 @@ static HRESULT extract_cab_file(install_ctx_t *ctx) return hres; } - path_len = strlenW(ctx->tmp_dir); - file_len = strlenW(ctx->file_name); + path_len = lstrlenW(ctx->tmp_dir); + file_len = lstrlenW(ctx->file_name); ctx->install_file = heap_alloc((path_len+file_len+2)*sizeof(WCHAR)); if(!ctx->install_file) return E_OUTOFMEMORY; @@ -278,13 +278,13 @@ static void expand_command(install_ctx_t *ctx, const WCHAR *cmd, WCHAR *buf, siz static const WCHAR expand_dirW[] = {'%','E','X','T','R','A','C','T','_','D','I','R','%'}; - while((ptr = strchrW(ptr, '%'))) { + while((ptr = wcschr(ptr, '%'))) { if(buf) memcpy(buf+len, prev_ptr, ptr-prev_ptr); len += ptr-prev_ptr; - if(!strncmpiW(ptr, expand_dirW, ARRAY_SIZE(expand_dirW))) { - len2 = strlenW(ctx->tmp_dir); + if(!_wcsnicmp(ptr, expand_dirW, ARRAY_SIZE(expand_dirW))) { + len2 = lstrlenW(ctx->tmp_dir); if(buf) memcpy(buf+len, ctx->tmp_dir, len2*sizeof(WCHAR)); len += len2; @@ -301,8 +301,8 @@ static void expand_command(install_ctx_t *ctx, const WCHAR *cmd, WCHAR *buf, siz } if(buf) - strcpyW(buf+len, prev_ptr); - *size = len + strlenW(prev_ptr) + 1; + lstrcpyW(buf+len, prev_ptr); + *size = len + lstrlenW(prev_ptr) + 1; } static HRESULT process_hook_section(install_ctx_t *ctx, const WCHAR *sect_name) @@ -318,8 +318,8 @@ static HRESULT process_hook_section(install_ctx_t *ctx, const WCHAR *sect_name) if(!len) return S_OK; - for(key = buf; *key; key += strlenW(key)+1) { - if(!strcmpiW(key, runW)) { + for(key = buf; *key; key += lstrlenW(key)+1) { + if(!wcsicmp(key, runW)) { WCHAR *cmd; size_t size; @@ -362,7 +362,7 @@ static HRESULT install_inf_file(install_ctx_t *ctx) if(len) { default_install = FALSE; - for(key = buf; *key; key += strlenW(key)+1) { + for(key = buf; *key; key += lstrlenW(key)+1) { TRACE("[Setup Hooks] key: %s\n", debugstr_w(key)); len = GetPrivateProfileStringW(setup_hooksW, key, NULL, sect_name, ARRAY_SIZE(sect_name), @@ -382,7 +382,7 @@ static HRESULT install_inf_file(install_ctx_t *ctx) if(len) { default_install = FALSE; - for(key = buf; *key; key += strlenW(key)+1) { + for(key = buf; *key; key += lstrlenW(key)+1) { TRACE("[Add.Code] key: %s\n", debugstr_w(key)); len = GetPrivateProfileStringW(add_codeW, key, NULL, sect_name, ARRAY_SIZE(sect_name), @@ -472,7 +472,7 @@ static void update_counter(install_ctx_t *ctx, HWND hwnd) }else { WCHAR buf[100]; LoadStringW(urlmon_instance, IDS_AXINSTALL_INSTALLN, buf, ARRAY_SIZE(buf)); - sprintfW(text, buf, ctx->counter); + swprintf(text, buf, ctx->counter); } SetDlgItemTextW(hwnd, ID_AXINSTALL_INSTALL_BTN, text); @@ -574,22 +574,22 @@ static HRESULT install_file(install_ctx_t *ctx, const WCHAR *cache_file) if(SUCCEEDED(hres)) { const WCHAR *ptr, *ptr2, *ext; - ptr = strrchrW(path, '/'); + ptr = wcsrchr(path, '/'); if(!ptr) ptr = path; else ptr++; - ptr2 = strrchrW(ptr, '\\'); + ptr2 = wcsrchr(ptr, '\\'); if(ptr2) ptr = ptr2+1; ctx->file_name = ptr; - ext = strrchrW(ptr, '.'); + ext = wcsrchr(ptr, '.'); if(!ext) ext = ptr; - if(!strcmpiW(ext, cab_extW)) { + if(!wcsicmp(ext, cab_extW)) { hres = install_cab_file(ctx); }else { FIXME("Unsupported extension %s\n", debugstr_w(ext)); @@ -606,7 +606,7 @@ static void failure_msgbox(install_ctx_t *ctx, HRESULT hres) WCHAR buf[1024], fmt[1024]; LoadStringW(urlmon_instance, IDS_AXINSTALL_FAILURE, fmt, ARRAY_SIZE(fmt)); - sprintfW(buf, fmt, hres); + swprintf(buf, fmt, hres); MessageBoxW(ctx->hwnd, buf, NULL, MB_OK); } diff --git a/dll/win32/urlmon/bindctx.c b/dll/win32/urlmon/bindctx.c index 2759f3d226b..61917518c09 100644 --- a/dll/win32/urlmon/bindctx.c +++ b/dll/win32/urlmon/bindctx.c @@ -45,7 +45,7 @@ static void *get_callback_iface(BindStatusCallback *This, REFIID riid) void *ret; HRESULT hres; - hres = IBindStatusCallback_QueryInterface(This->callback, riid, (void**)&ret); + hres = IBindStatusCallback_QueryInterface(This->callback, riid, &ret); if(FAILED(hres) && This->serv_prov) hres = IServiceProvider_QueryService(This->serv_prov, riid, riid, &ret); diff --git a/dll/win32/urlmon/binding.c b/dll/win32/urlmon/binding.c index fdabdfcc81d..e90d4daf346 100644 --- a/dll/win32/urlmon/binding.c +++ b/dll/win32/urlmon/binding.c @@ -199,10 +199,10 @@ static LPWSTR get_mime_clsid(LPCWSTR mime, CLSID *clsid) 'C','o','n','t','e','n','t',' ','T','y','p','e','\\'}; static const WCHAR clsidW[] = {'C','L','S','I','D',0}; - len = strlenW(mime)+1; + len = lstrlenW(mime)+1; key_name = heap_alloc(sizeof(mime_keyW) + len*sizeof(WCHAR)); memcpy(key_name, mime_keyW, sizeof(mime_keyW)); - strcpyW(key_name + ARRAY_SIZE(mime_keyW), mime); + lstrcpyW(key_name + ARRAY_SIZE(mime_keyW), mime); res = RegOpenKeyW(HKEY_CLASSES_ROOT, key_name, &hkey); heap_free(key_name); diff --git a/dll/win32/urlmon/bindprot.c b/dll/win32/urlmon/bindprot.c index 42d3d219252..e9c97e8a9db 100644 --- a/dll/win32/urlmon/bindprot.c +++ b/dll/win32/urlmon/bindprot.c @@ -509,15 +509,19 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr hres = IClassFactory_CreateInstance(cf, (IUnknown*)&This->IInternetBindInfo_iface, &IID_IUnknown, (void**)&protocol_unk); + if(SUCCEEDED(hres)) { + hres = IUnknown_QueryInterface(protocol_unk, &IID_IInternetProtocol, (void**)&protocol); + if(SUCCEEDED(hres)) + This->protocol_unk = protocol_unk; + else + IUnknown_Release(protocol_unk); + } + else if(hres == CLASS_E_NOAGGREGATION) + hres = IClassFactory_CreateInstance(cf, NULL, &IID_IInternetProtocol, (void**)&protocol); + IClassFactory_Release(cf); if(FAILED(hres)) return hres; - - hres = IUnknown_QueryInterface(protocol_unk, &IID_IInternetProtocol, (void**)&protocol); - if(FAILED(hres)) { - IUnknown_Release(protocol_unk); - return hres; - } } StringFromCLSID(&clsid, &clsid_str); @@ -703,8 +707,11 @@ static HRESULT WINAPI ProtocolHandler_Terminate(IInternetProtocol *iface, DWORD if(This->protocol) { IInternetProtocol_Terminate(This->protocol, 0); - IInternetProtocol_Release(This->protocol); - This->protocol = NULL; + + if (This->protocol_unk) { + IInternetProtocol_Release(This->protocol); + This->protocol = NULL; + } } set_binding_sink(This, NULL, NULL); diff --git a/dll/win32/urlmon/file.c b/dll/win32/urlmon/file.c index 11e6ecee903..d634085b766 100644 --- a/dll/win32/urlmon/file.c +++ b/dll/win32/urlmon/file.c @@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { - IUnknown IUnknown_outer; + IUnknown IUnknown_inner; IInternetProtocolEx IInternetProtocolEx_iface; IInternetPriority IInternetPriority_iface; @@ -40,7 +40,7 @@ typedef struct { static inline FileProtocol *impl_from_IUnknown(IUnknown *iface) { - return CONTAINING_RECORD(iface, FileProtocol, IUnknown_outer); + return CONTAINING_RECORD(iface, FileProtocol, IUnknown_inner); } static inline FileProtocol *impl_from_IInternetProtocolEx(IInternetProtocolEx *iface) @@ -60,7 +60,7 @@ static HRESULT WINAPI FileProtocolUnk_QueryInterface(IUnknown *iface, REFIID rii *ppv = NULL; if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = &This->IUnknown_outer; + *ppv = &This->IUnknown_inner; }else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) { TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv); *ppv = &This->IInternetProtocolEx_iface; @@ -312,7 +312,7 @@ static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr file_handle = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if(file_handle == INVALID_HANDLE_VALUE && (ptr = strrchrW(path, '#'))) { + if(file_handle == INVALID_HANDLE_VALUE && (ptr = wcsrchr(path, '#'))) { /* If path contains fragment part, try without it. */ *ptr = 0; file_handle = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL, @@ -333,7 +333,7 @@ static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr hres = IUri_GetExtension(pUri, &ext); if(SUCCEEDED(hres)) { if(hres == S_OK && *ext) { - if((ptr = strchrW(ext, '#'))) + if((ptr = wcschr(ext, '#'))) *ptr = 0; hres = find_mime_from_ext(ext, &mime); if(SUCCEEDED(hres)) { @@ -428,14 +428,14 @@ HRESULT FileProtocol_Construct(IUnknown *outer, LPVOID *ppobj) ret = heap_alloc(sizeof(FileProtocol)); - ret->IUnknown_outer.lpVtbl = &FileProtocolUnkVtbl; + ret->IUnknown_inner.lpVtbl = &FileProtocolUnkVtbl; ret->IInternetProtocolEx_iface.lpVtbl = &FileProtocolExVtbl; ret->IInternetPriority_iface.lpVtbl = &FilePriorityVtbl; ret->file = INVALID_HANDLE_VALUE; ret->priority = 0; ret->ref = 1; - ret->outer = outer ? outer : (IUnknown*)&ret->IUnknown_outer; + ret->outer = outer ? outer : &ret->IUnknown_inner; - *ppobj = &ret->IUnknown_outer; + *ppobj = &ret->IUnknown_inner; return S_OK; } diff --git a/dll/win32/urlmon/ftp.c b/dll/win32/urlmon/ftp.c index aef4a6cf16c..8e6ec4eaf89 100644 --- a/dll/win32/urlmon/ftp.c +++ b/dll/win32/urlmon/ftp.c @@ -28,7 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { Protocol base; - IUnknown IUnknown_outer; + IUnknown IUnknown_inner; IInternetProtocolEx IInternetProtocolEx_iface; IInternetPriority IInternetPriority_iface; IWinInetHttpInfo IWinInetHttpInfo_iface; @@ -39,7 +39,7 @@ typedef struct { static inline FtpProtocol *impl_from_IUnknown(IUnknown *iface) { - return CONTAINING_RECORD(iface, FtpProtocol, IUnknown_outer); + return CONTAINING_RECORD(iface, FtpProtocol, IUnknown_inner); } static inline FtpProtocol *impl_from_IInternetProtocolEx(IInternetProtocolEx *iface) @@ -66,6 +66,7 @@ static HRESULT FtpProtocol_open_request(Protocol *prot, IUri *uri, DWORD request HINTERNET internet_session, IInternetBindInfo *bind_info) { FtpProtocol *This = impl_from_Protocol(prot); + DWORD path_size = 0; BSTR url; HRESULT hres; @@ -73,16 +74,18 @@ static HRESULT FtpProtocol_open_request(Protocol *prot, IUri *uri, DWORD request if(FAILED(hres)) return hres; - This->base.request = InternetOpenUrlW(internet_session, url, NULL, 0, - request_flags|INTERNET_FLAG_EXISTING_CONNECT|INTERNET_FLAG_PASSIVE, - (DWORD_PTR)&This->base); - SysFreeString(url); - if (!This->base.request && GetLastError() != ERROR_IO_PENDING) { - WARN("InternetOpenUrl failed: %d\n", GetLastError()); - return INET_E_RESOURCE_NOT_FOUND; + hres = UrlUnescapeW(url, NULL, &path_size, URL_UNESCAPE_INPLACE); + if(SUCCEEDED(hres)) { + This->base.request = InternetOpenUrlW(internet_session, url, NULL, 0, + request_flags|INTERNET_FLAG_EXISTING_CONNECT|INTERNET_FLAG_PASSIVE, + (DWORD_PTR)&This->base); + if (!This->base.request && GetLastError() != ERROR_IO_PENDING) { + WARN("InternetOpenUrl failed: %d\n", GetLastError()); + hres = INET_E_RESOURCE_NOT_FOUND; + } } - - return S_OK; + SysFreeString(url); + return hres; } static HRESULT FtpProtocol_end_request(Protocol *prot) @@ -128,7 +131,7 @@ static HRESULT WINAPI FtpProtocolUnk_QueryInterface(IUnknown *iface, REFIID riid if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = &This->IUnknown_outer; + *ppv = &This->IUnknown_inner; }else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) { TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv); *ppv = &This->IInternetProtocolEx_iface; @@ -459,13 +462,13 @@ HRESULT FtpProtocol_Construct(IUnknown *outer, void **ppv) ret = heap_alloc_zero(sizeof(FtpProtocol)); ret->base.vtbl = &AsyncProtocolVtbl; - ret->IUnknown_outer.lpVtbl = &FtpProtocolUnkVtbl; + ret->IUnknown_inner.lpVtbl = &FtpProtocolUnkVtbl; ret->IInternetProtocolEx_iface.lpVtbl = &FtpProtocolVtbl; ret->IInternetPriority_iface.lpVtbl = &FtpPriorityVtbl; ret->IWinInetHttpInfo_iface.lpVtbl = &WinInetHttpInfoVtbl; ret->ref = 1; - ret->outer = outer ? outer : &ret->IUnknown_outer; + ret->outer = outer ? outer : &ret->IUnknown_inner; - *ppv = &ret->IUnknown_outer; + *ppv = &ret->IUnknown_inner; return S_OK; } diff --git a/dll/win32/urlmon/http.c b/dll/win32/urlmon/http.c index 1762787d097..3663443a0a4 100644 --- a/dll/win32/urlmon/http.c +++ b/dll/win32/urlmon/http.c @@ -32,7 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { Protocol base; - IUnknown IUnknown_outer; + IUnknown IUnknown_inner; IInternetProtocolEx IInternetProtocolEx_iface; IInternetPriority IInternetPriority_iface; IWinInetHttpInfo IWinInetHttpInfo_iface; @@ -47,7 +47,7 @@ typedef struct { static inline HttpProtocol *impl_from_IUnknown(IUnknown *iface) { - return CONTAINING_RECORD(iface, HttpProtocol, IUnknown_outer); + return CONTAINING_RECORD(iface, HttpProtocol, IUnknown_inner); } static inline HttpProtocol *impl_from_IInternetProtocolEx(IInternetProtocolEx *iface) @@ -246,7 +246,7 @@ static ULONG send_http_request(HttpProtocol *This) BOOL res; send_buffer.lpcszHeader = This->full_header; - send_buffer.dwHeadersLength = send_buffer.dwHeadersTotal = strlenW(This->full_header); + send_buffer.dwHeadersLength = send_buffer.dwHeadersTotal = lstrlenW(This->full_header); if(This->base.bind_info.dwBindVerb != BINDVERB_GET) { switch(This->base.bind_info.stgmedData.tymed) { @@ -408,7 +408,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques return hres; } - len = addl_header ? strlenW(addl_header) : 0; + len = addl_header ? lstrlenW(addl_header) : 0; This->full_header = heap_alloc(len*sizeof(WCHAR)+sizeof(default_headersW)); if(!This->full_header) { @@ -561,7 +561,7 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot) content_type = query_http_info(This, HTTP_QUERY_CONTENT_TYPE); if(content_type) { /* remove the charset, if present */ - LPWSTR p = strchrW(content_type, ';'); + LPWSTR p = wcschr(content_type, ';'); if (p) *p = '\0'; IInternetProtocolSink_ReportProgress(This->base.protocol_sink, @@ -579,7 +579,7 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot) content_length = query_http_info(This, HTTP_QUERY_CONTENT_LENGTH); if(content_length) { - This->base.content_length = atoiW(content_length); + This->base.content_length = wcstol(content_length, NULL, 10); heap_free(content_length); } @@ -637,7 +637,7 @@ static HRESULT WINAPI HttpProtocolUnk_QueryInterface(IUnknown *iface, REFIID rii if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = &This->IUnknown_outer; + *ppv = &This->IUnknown_inner; }else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) { TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv); *ppv = &This->IInternetProtocolEx_iface; @@ -967,16 +967,16 @@ static HRESULT create_http_protocol(BOOL https, IUnknown *outer, void **ppobj) return E_OUTOFMEMORY; ret->base.vtbl = &AsyncProtocolVtbl; - ret->IUnknown_outer.lpVtbl = &HttpProtocolUnkVtbl; + ret->IUnknown_inner.lpVtbl = &HttpProtocolUnkVtbl; ret->IInternetProtocolEx_iface.lpVtbl = &HttpProtocolVtbl; ret->IInternetPriority_iface.lpVtbl = &HttpPriorityVtbl; ret->IWinInetHttpInfo_iface.lpVtbl = &WinInetHttpInfoVtbl; ret->https = https; ret->ref = 1; - ret->outer = outer ? outer : &ret->IUnknown_outer; + ret->outer = outer ? outer : &ret->IUnknown_inner; - *ppobj = &ret->IUnknown_outer; + *ppobj = &ret->IUnknown_inner; URLMON_LockModule(); return S_OK; diff --git a/dll/win32/urlmon/internet.c b/dll/win32/urlmon/internet.c index 7c997a03b01..7356fc8978d 100644 --- a/dll/win32/urlmon/internet.c +++ b/dll/win32/urlmon/internet.c @@ -156,7 +156,7 @@ static HRESULT parse_schema(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, if(flags) ERR("wrong flags\n"); - ptr = strchrW(url, ':'); + ptr = wcschr(url, ':'); if(ptr) len = ptr-url; @@ -218,7 +218,7 @@ static HRESULT parse_security_url(LPCWSTR url, DWORD flags, LPWSTR result, DWORD return E_FAIL; } -static HRESULT parse_encode(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize) +static HRESULT parse_encode(LPCWSTR url, PARSEACTION action, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize) { IInternetProtocolInfo *protocol_info; DWORD prsize; @@ -229,7 +229,7 @@ static HRESULT parse_encode(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, protocol_info = get_protocol_info(url); if(protocol_info) { - hres = IInternetProtocolInfo_ParseUrl(protocol_info, url, PARSE_ENCODE, + hres = IInternetProtocolInfo_ParseUrl(protocol_info, url, action, flags, result, size, rsize, 0); IInternetProtocolInfo_Release(protocol_info); if(SUCCEEDED(hres)) @@ -401,7 +401,8 @@ HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD case PARSE_SECURITY_URL: return parse_security_url(pwzUrl, dwFlags, pszResult, cchResult, pcchResult); case PARSE_ENCODE: - return parse_encode(pwzUrl, dwFlags, pszResult, cchResult, pcchResult); + case PARSE_UNESCAPE: + return parse_encode(pwzUrl, ParseAction, dwFlags, pszResult, cchResult, pcchResult); case PARSE_PATH_FROM_URL: return parse_path_from_url(pwzUrl, dwFlags, pszResult, cchResult, pcchResult); case PARSE_SCHEMA: @@ -593,7 +594,7 @@ static HRESULT load_process_feature(INTERNETFEATURELIST feature) return E_UNEXPECTED; } - process_name = strrchrW(module_name, '\\'); + process_name = wcsrchr(module_name, '\\'); if(!process_name) { ERR("Invalid module file name: %s\n", debugstr_w(module_name)); return E_UNEXPECTED; diff --git a/dll/win32/urlmon/mimefilter.c b/dll/win32/urlmon/mimefilter.c index 7904bf90f47..ebaed6b77d4 100644 --- a/dll/win32/urlmon/mimefilter.c +++ b/dll/win32/urlmon/mimefilter.c @@ -548,12 +548,12 @@ static BOOL is_known_mime_type(const WCHAR *mime) unsigned i; for(i=0; i < ARRAY_SIZE(mime_filters_any_pos); i++) { - if(!strcmpW(mime, mime_filters_any_pos[i].mime)) + if(!wcscmp(mime, mime_filters_any_pos[i].mime)) return TRUE; } for(i=0; i < ARRAY_SIZE(mime_filters); i++) { - if(!strcmpW(mime, mime_filters[i].mime)) + if(!wcscmp(mime, mime_filters[i].mime)) return TRUE; } @@ -569,7 +569,7 @@ static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *p if(!proposed_mime) return E_FAIL; - len = strlenW(proposed_mime)+1; + len = lstrlenW(proposed_mime)+1; *ret_mime = CoTaskMemAlloc(len*sizeof(WCHAR)); if(!*ret_mime) return E_OUTOFMEMORY; @@ -578,15 +578,15 @@ static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *p return S_OK; } - if(proposed_mime && (!strcmpW(proposed_mime, app_octetstreamW) - || !strcmpW(proposed_mime, text_plainW))) + if(proposed_mime && (!wcscmp(proposed_mime, app_octetstreamW) + || !wcscmp(proposed_mime, text_plainW))) proposed_mime = NULL; if(proposed_mime) { ret = proposed_mime; for(i=0; i < ARRAY_SIZE(mime_filters_any_pos); i++) { - if(!strcmpW(proposed_mime, mime_filters_any_pos[i].mime)) { + if(!wcscmp(proposed_mime, mime_filters_any_pos[i].mime)) { any_pos_mime = i; for(len=size; len>0; len--) { if(mime_filters_any_pos[i].filter(buf+size-len, len)) @@ -600,7 +600,7 @@ static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *p if(i == ARRAY_SIZE(mime_filters_any_pos)) { for(i=0; i < ARRAY_SIZE(mime_filters); i++) { - if(!strcmpW(proposed_mime, mime_filters[i].mime)) { + if(!wcscmp(proposed_mime, mime_filters[i].mime)) { if(!mime_filters[i].filter(buf, size)) ret = NULL; break; @@ -663,7 +663,7 @@ static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *p TRACE("found %s for %s\n", debugstr_w(ret), debugstr_an((const char*)buf, min(32, size))); - len = strlenW(ret)+1; + len = lstrlenW(ret)+1; *ret_mime = CoTaskMemAlloc(len*sizeof(WCHAR)); if(!*ret_mime) return E_OUTOFMEMORY; diff --git a/dll/win32/urlmon/mk.c b/dll/win32/urlmon/mk.c index d73a00c7716..697b5f2bf8b 100644 --- a/dll/win32/urlmon/mk.c +++ b/dll/win32/urlmon/mk.c @@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { - IUnknown IUnknown_outer; + IUnknown IUnknown_inner; IInternetProtocolEx IInternetProtocolEx_iface; LONG ref; @@ -36,7 +36,7 @@ typedef struct { static inline MkProtocol *impl_from_IUnknown(IUnknown *iface) { - return CONTAINING_RECORD(iface, MkProtocol, IUnknown_outer); + return CONTAINING_RECORD(iface, MkProtocol, IUnknown_inner); } static inline MkProtocol *impl_from_IInternetProtocolEx(IInternetProtocolEx *iface) @@ -50,7 +50,7 @@ static HRESULT WINAPI MkProtocolUnk_QueryInterface(IUnknown *iface, REFIID riid, if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = &This->IUnknown_outer; + *ppv = &This->IUnknown_inner; }else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) { TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv); *ppv = &This->IInternetProtocolEx_iface; @@ -286,13 +286,13 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri, } progid = path+1; /* skip '@' symbol */ - colon_ptr = strchrW(path, ':'); + colon_ptr = wcschr(path, ':'); if(!colon_ptr) { SysFreeString(path); return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER); } - len = strlenW(path); + len = lstrlenW(path); display_name = heap_alloc((len+1)*sizeof(WCHAR)); memcpy(display_name, path, (len+1)*sizeof(WCHAR)); @@ -372,15 +372,15 @@ HRESULT MkProtocol_Construct(IUnknown *outer, void **ppv) ret = heap_alloc(sizeof(MkProtocol)); - ret->IUnknown_outer.lpVtbl = &MkProtocolUnkVtbl; + ret->IUnknown_inner.lpVtbl = &MkProtocolUnkVtbl; ret->IInternetProtocolEx_iface.lpVtbl = &MkProtocolVtbl; ret->ref = 1; - ret->outer = outer ? outer : &ret->IUnknown_outer; + ret->outer = outer ? outer : &ret->IUnknown_inner; ret->stream = NULL; /* NOTE: * Native returns NULL ppobj and S_OK in CreateInstance if called with IID_IUnknown riid and no outer. */ - *ppv = &ret->IUnknown_outer; + *ppv = &ret->IUnknown_inner; return S_OK; } diff --git a/dll/win32/urlmon/protocol.c b/dll/win32/urlmon/protocol.c index a6ccf83484e..e6ffd366693 100644 --- a/dll/win32/urlmon/protocol.c +++ b/dll/win32/urlmon/protocol.c @@ -307,7 +307,7 @@ HINTERNET get_internet_session(IInternetBindInfo *bind_info) void update_user_agent(WCHAR *user_agent) { if(internet_session) - InternetSetOptionW(internet_session, INTERNET_OPTION_USER_AGENT, user_agent, strlenW(user_agent)); + InternetSetOptionW(internet_session, INTERNET_OPTION_USER_AGENT, user_agent, lstrlenW(user_agent)); } HRESULT protocol_start(Protocol *protocol, IInternetProtocol *prot, IUri *uri, diff --git a/dll/win32/urlmon/sec_mgr.c b/dll/win32/urlmon/sec_mgr.c index 5f62068127b..af6cf212bd4 100644 --- a/dll/win32/urlmon/sec_mgr.c +++ b/dll/win32/urlmon/sec_mgr.c @@ -65,7 +65,7 @@ static const WCHAR wszZoneMapDomainsKey[] = {'S','o','f','t','w','a','r','e','\\ static inline BOOL is_drive_path(const WCHAR *path) { - return isalphaW(*path) && *(path+1) == ':'; + return iswalpha(*path) && *(path+1) == ':'; } /* List of schemes types Windows seems to expect to be hierarchical. */ @@ -184,8 +184,8 @@ static HRESULT get_zone_from_reg(LPCWSTR schema, DWORD *zone) static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_wildcard, LPCWSTR *matched) { BOOL matches = FALSE; - DWORD pattern_len = strlenW(pattern); - DWORD str_len = strlenW(str); + DWORD pattern_len = lstrlenW(pattern); + DWORD str_len = lstrlenW(str); TRACE("(%d) Checking if %s matches %s\n", implicit_wildcard, debugstr_w(str), debugstr_w(pattern)); @@ -201,7 +201,7 @@ static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_w * So in this case 'str' would have to end with ".google.com" in order * to map to this pattern. */ - if(str_len >= pattern_len+1 && !strcmpiW(str+(str_len-pattern_len+1), pattern+1)) { + if(str_len >= pattern_len+1 && !wcsicmp(str+(str_len-pattern_len+1), pattern+1)) { /* Check if there's another '.' inside of the "unmatched" portion * of 'str'. * @@ -215,14 +215,10 @@ static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_w * a match. */ const WCHAR *ptr; - if(str_len > pattern_len+1 && (ptr = memrchrW(str, '.', str_len-pattern_len-2))) { - if(implicit_wildcard) { - matches = TRUE; - *matched = ptr+1; - } - } else { + for (ptr = str + str_len - pattern_len; ptr > str; ptr--) if (ptr[-1] == '.') break; + if (ptr == str || implicit_wildcard) { matches = TRUE; - *matched = str; + *matched = ptr; } } } else if(implicit_wildcard && str_len > pattern_len) { @@ -241,7 +237,7 @@ static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_w * * Doesn't match the pattern. */ - if(str[str_len-pattern_len-1] == '.' && !strcmpiW(str+(str_len-pattern_len), pattern)) { + if(str[str_len-pattern_len-1] == '.' && !wcsicmp(str+(str_len-pattern_len), pattern)) { matches = TRUE; *matched = str+(str_len-pattern_len); } @@ -249,7 +245,7 @@ static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_w /* The pattern doesn't have an implicit wildcard, or an explicit wildcard, * so 'str' has to be an exact match to the 'pattern'. */ - if(!strcmpiW(str, pattern)) { + if(!wcsicmp(str, pattern)) { matches = TRUE; *matched = str; } @@ -409,7 +405,7 @@ static HRESULT search_domain_for_zone(HKEY domains, LPCWSTR domain, DWORD domain * The mapping would only happen if the "org" key had an explicit subkey * called "www". */ - if(check_domain && !domain_offset && !strchrW(host, matched-host-1)) + if(check_domain && !domain_offset && !wcschr(host, matched-host-1)) found = get_zone_for_scheme(domain_key, schema, zone); } RegCloseKey(domain_key); @@ -532,7 +528,7 @@ static HRESULT map_security_uri_to_zone(IUri *uri, DWORD *zone) if(FAILED(hres)) return hres; - if(!strcmpiW(scheme, fileW)) { + if(!wcsicmp(scheme, fileW)) { BSTR path; WCHAR *ptr, *path_start, root[20]; @@ -547,7 +543,7 @@ static HRESULT map_security_uri_to_zone(IUri *uri, DWORD *zone) else path_start = path; - if((ptr = strchrW(path_start, ':')) && ptr-path_start+1 < ARRAY_SIZE(root)) { + if((ptr = wcschr(path_start, ':')) && ptr-path_start+1 < ARRAY_SIZE(root)) { UINT type; memcpy(root, path_start, (ptr-path_start+1)*sizeof(WCHAR)); @@ -597,7 +593,7 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url) hres = CoInternetGetSecurityUrl(url, &secur_url, PSU_SECURITY_URL_ONLY, 0); if(hres != S_OK) { - DWORD size = strlenW(url)*sizeof(WCHAR); + DWORD size = lstrlenW(url)*sizeof(WCHAR); secur_url = CoTaskMemAlloc(size); if(!secur_url) @@ -1322,7 +1318,7 @@ static LPDWORD build_zonemap_from_reg(void) data = new_data; } - data[used] = atoiW(name); + data[used] = wcstol(name, NULL, 10); } } if (used) { @@ -1875,7 +1871,7 @@ static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **re if(!protocol_info) break; - size = strlenW(url)+1; + size = lstrlenW(url)+1; new_url = CoTaskMemAlloc(size*sizeof(WCHAR)); if(!new_url) { hres = E_OUTOFMEMORY; @@ -1904,7 +1900,7 @@ static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **re } } - if(parse_hres != S_OK || !strcmpW(url, new_url)) + if(parse_hres != S_OK || !wcscmp(url, new_url)) break; CoTaskMemFree(alloc_url); @@ -1921,7 +1917,7 @@ static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **re } if(action == PSU_DEFAULT && (protocol_info = get_protocol_info(url))) { - size = strlenW(url)+1; + size = lstrlenW(url)+1; new_url = CoTaskMemAlloc(size * sizeof(WCHAR)); if(new_url) { new_size = 0; @@ -1964,7 +1960,7 @@ static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **re } if(!alloc_url) { - size = strlenW(url)+1; + size = lstrlenW(url)+1; alloc_url = CoTaskMemAlloc(size * sizeof(WCHAR)); if(!alloc_url) return E_OUTOFMEMORY; @@ -2001,7 +1997,7 @@ HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR pwzUrl, LPWSTR *ppwzSecUrl, PSUA case URL_SCHEME_FTP: case URL_SCHEME_HTTP: case URL_SCHEME_HTTPS: - size = strlenW(secure_url)+1; + size = lstrlenW(secure_url)+1; new_url = CoTaskMemAlloc(size * sizeof(WCHAR)); if(new_url) hres = UrlGetPartW(secure_url, new_url, &size, URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME); diff --git a/dll/win32/urlmon/session.c b/dll/win32/urlmon/session.c index 34ff5448fb4..edde1ece492 100644 --- a/dll/win32/urlmon/session.c +++ b/dll/win32/urlmon/session.c @@ -64,7 +64,7 @@ static name_space *find_name_space(LPCWSTR protocol) name_space *iter; LIST_FOR_EACH_ENTRY(iter, &name_space_list, name_space, entry) { - if(!strcmpiW(iter->protocol, protocol)) + if(!wcsicmp(iter->protocol, protocol)) return iter; } @@ -148,7 +148,7 @@ static HRESULT unregister_namespace(IClassFactory *cf, LPCWSTR protocol) EnterCriticalSection(&session_cs); LIST_FOR_EACH_ENTRY(iter, &name_space_list, name_space, entry) { - if(iter->cf == cf && !strcmpiW(iter->protocol, protocol)) { + if(iter->cf == cf && !wcsicmp(iter->protocol, protocol)) { list_remove(&iter->entry); LeaveCriticalSection(&session_cs); @@ -265,7 +265,7 @@ IInternetProtocol *get_mime_filter(LPCWSTR mime) EnterCriticalSection(&session_cs); LIST_FOR_EACH_ENTRY(iter, &mime_filter_list, mime_filter, entry) { - if(!strcmpW(iter->mime, mime)) { + if(!wcscmp(iter->mime, mime)) { cf = iter->cf; break; } @@ -408,7 +408,7 @@ static HRESULT WINAPI InternetSession_UnregisterMimeFilter(IInternetSession *ifa EnterCriticalSection(&session_cs); LIST_FOR_EACH_ENTRY(iter, &mime_filter_list, mime_filter, entry) { - if(iter->cf == pCF && !strcmpW(iter->mime, pwzType)) { + if(iter->cf == pCF && !wcscmp(iter->mime, pwzType)) { list_remove(&iter->entry); LeaveCriticalSection(&session_cs); @@ -561,8 +561,8 @@ static void ensure_useragent(void) else os_type = emptyW; - sprintfW(buf, formatW, is_nt, info.dwMajorVersion, info.dwMinorVersion, os_type); - len = strlenW(buf); + swprintf(buf, formatW, is_nt, info.dwMajorVersion, info.dwMinorVersion, os_type); + len = lstrlenW(buf); size = len+40; ret = heap_alloc(size * sizeof(WCHAR)); diff --git a/dll/win32/urlmon/umon.c b/dll/win32/urlmon/umon.c index 116f593348f..14273efee99 100644 --- a/dll/win32/urlmon/umon.c +++ b/dll/win32/urlmon/umon.c @@ -804,7 +804,7 @@ HRESULT WINAPI MkParseDisplayNameEx(IBindCtx *pbc, LPCWSTR szDisplayName, ULONG hres = CreateURLMoniker(NULL, szDisplayName, ppmk); if(SUCCEEDED(hres)) { - *pchEaten = strlenW(szDisplayName); + *pchEaten = lstrlenW(szDisplayName); return hres; } } @@ -887,7 +887,7 @@ HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPW header, sizeof(header), NULL, NULL)) return E_FAIL; - if (strlenW(cache_path) > dwBufLength) + if (lstrlenW(cache_path) > dwBufLength) return E_OUTOFMEMORY; lstrcpyW(szFileName, cache_path); diff --git a/dll/win32/urlmon/uri.c b/dll/win32/urlmon/uri.c index 92978dc53f9..733671cf74f 100644 --- a/dll/win32/urlmon/uri.c +++ b/dll/win32/urlmon/uri.c @@ -18,6 +18,7 @@ */ #include <limits.h> +#include <wchar.h> #include "urlmon_main.h" #include "wine/debug.h" @@ -518,7 +519,7 @@ static inline void pct_encode_val(WCHAR val, WCHAR *dest) { */ void find_domain_name(const WCHAR *host, DWORD host_len, INT *domain_start) { - const WCHAR *last_tld, *sec_last_tld, *end; + const WCHAR *last_tld, *sec_last_tld, *end, *p; end = host+host_len-1; @@ -530,12 +531,18 @@ void find_domain_name(const WCHAR *host, DWORD host_len, if(host_len < 4) return; - last_tld = memrchrW(host, '.', host_len); + for (last_tld = sec_last_tld = NULL, p = host; p <= end; p++) + { + if (*p == '.') + { + sec_last_tld = last_tld; + last_tld = p; + } + } if(!last_tld) /*
http://hostname
-> has no domain name. */ return; - sec_last_tld = memrchrW(host, '.', last_tld-host); if(!sec_last_tld) { /* If the '.' is at the beginning of the host there * has to be at least 3 characters in the TLD for it @@ -586,12 +593,8 @@ void find_domain_name(const WCHAR *host, DWORD host_len, if(last_tld - (sec_last_tld+1) == 3) { for(i = 0; i < ARRAY_SIZE(recognized_tlds); ++i) { if(!StrCmpNIW(sec_last_tld+1, recognized_tlds[i].tld_name, 3)) { - const WCHAR *domain = memrchrW(host, '.', sec_last_tld-host); - - if(!domain) - *domain_start = 0; - else - *domain_start = (domain+1) - host; + for (p = sec_last_tld; p > host; p--) if (p[-1] == '.') break; + *domain_start = p - host; TRACE("Found domain name %s\n", debugstr_wn(host+*domain_start, (host+host_len)-(host+*domain_start))); return; @@ -604,12 +607,8 @@ void find_domain_name(const WCHAR *host, DWORD host_len, * part of the TLD. * Ex:
www.google.fo.uk
-> google.fo.uk as the domain name. */ - const WCHAR *domain = memrchrW(host, '.', sec_last_tld-host); - - if(!domain) - *domain_start = 0; - else - *domain_start = (domain+1) - host; + for (p = sec_last_tld; p > host; p--) if (p[-1] == '.') break; + *domain_start = p - host; } } else { /* The second to last TLD has more than 3 characters making it @@ -773,18 +772,18 @@ static BSTR pre_process_uri(LPCWSTR uri) { start = uri; /* Skip leading controls and whitespace. */ - while(*start && (iscntrlW(*start) || isspaceW(*start))) ++start; + while(*start && (iswcntrl(*start) || iswspace(*start))) ++start; /* URI consisted only of control/whitespace. */ if(!*start) return SysAllocStringLen(NULL, 0); - end = start + strlenW(start); - while(--end > start && (iscntrlW(*end) || isspaceW(*end))); + end = start + lstrlenW(start); + while(--end > start && (iswcntrl(*end) || iswspace(*end))); len = ++end - start; for(ptr = start; ptr < end; ptr++) { - if(iscntrlW(*ptr)) + if(iswcntrl(*ptr)) len--; } @@ -793,7 +792,7 @@ static BSTR pre_process_uri(LPCWSTR uri) { return NULL; for(ptr = start, ptr2=ret; ptr < end; ptr++) { - if(!iscntrlW(*ptr)) + if(!iswcntrl(*ptr)) *ptr2++ = *ptr; } @@ -845,9 +844,9 @@ static DWORD ui2ipv4(WCHAR *dest, UINT address) { if(!dest) { WCHAR tmp[16]; - ret = sprintfW(tmp, formatW, digits[0], digits[1], digits[2], digits[3]); + ret = swprintf(tmp, formatW, digits[0], digits[1], digits[2], digits[3]); } else - ret = sprintfW(dest, formatW, digits[0], digits[1], digits[2], digits[3]); + ret = swprintf(dest, formatW, digits[0], digits[1], digits[2], digits[3]); return ret; } @@ -858,9 +857,9 @@ static DWORD ui2str(WCHAR *dest, UINT value) { if(!dest) { WCHAR tmp[11]; - ret = sprintfW(tmp, formatW, value); + ret = swprintf(tmp, formatW, value); } else - ret = sprintfW(dest, formatW, value); + ret = swprintf(dest, formatW, value); return ret; } @@ -1987,7 +1986,7 @@ static BOOL parse_hierpart(const WCHAR **ptr, parse_data *data, DWORD flags) { /* For javascript: URIs, simply set everything as a path */ if(data->scheme_type == URL_SCHEME_JAVASCRIPT) { data->path = *ptr; - data->path_len = strlenW(*ptr); + data->path_len = lstrlenW(*ptr); data->is_opaque = TRUE; *ptr += data->path_len; return TRUE; @@ -2339,9 +2338,9 @@ static BOOL canonicalize_reg_name(const parse_data *data, Uri *uri, /* If NO_CANONICALIZE is not set, then windows lower cases the * decoded value. */ - if(!(flags & Uri_CREATE_NO_CANONICALIZE) && isupperW(val)) { + if(!(flags & Uri_CREATE_NO_CANONICALIZE) && iswupper(val)) { if(!computeOnly) - uri->canon_uri[uri->canon_len] = tolowerW(val); + uri->canon_uri[uri->canon_len] = towlower(val); } else { if(!computeOnly) uri->canon_uri[uri->canon_len] = val; @@ -2369,8 +2368,8 @@ static BOOL canonicalize_reg_name(const parse_data *data, Uri *uri, /* The percent encoded value gets lower cased also. */ if(!(flags & Uri_CREATE_NO_CANONICALIZE)) { - uri->canon_uri[uri->canon_len+1] = tolowerW(uri->canon_uri[uri->canon_len+1]); - uri->canon_uri[uri->canon_len+2] = tolowerW(uri->canon_uri[uri->canon_len+2]); + uri->canon_uri[uri->canon_len+1] = towlower(uri->canon_uri[uri->canon_len+1]); + uri->canon_uri[uri->canon_len+2] = towlower(uri->canon_uri[uri->canon_len+2]); } } @@ -2378,7 +2377,7 @@ static BOOL canonicalize_reg_name(const parse_data *data, Uri *uri, } else { if(!computeOnly) { if(!(flags & Uri_CREATE_NO_CANONICALIZE) && known_scheme) - uri->canon_uri[uri->canon_len] = tolowerW(*ptr); + uri->canon_uri[uri->canon_len] = towlower(*ptr); else uri->canon_uri[uri->canon_len] = *ptr; } @@ -2645,11 +2644,11 @@ static BOOL canonicalize_ipv6address(const parse_data *data, Uri *uri, static const WCHAR formatW[] = {'%','x',0}; if(!computeOnly) - uri->canon_len += sprintfW(uri->canon_uri+uri->canon_len, + uri->canon_len += swprintf(uri->canon_uri+uri->canon_len, formatW, values[i]); else { WCHAR tmp[5]; - uri->canon_len += sprintfW(tmp, formatW, values[i]); + uri->canon_len += swprintf(tmp, formatW, values[i]); } } } @@ -3307,7 +3306,7 @@ static BOOL canonicalize_scheme(const parse_data *data, Uri *uri, DWORD flags, B for(i = 0; i < data->scheme_len; ++i) { /* Scheme name must be lower case after canonicalization. */ - uri->canon_uri[i + pos] = tolowerW(data->scheme[i]); + uri->canon_uri[i + pos] = towlower(data->scheme[i]); } uri->canon_uri[i + pos] = ':'; @@ -3889,7 +3888,7 @@ static HRESULT compare_file_paths(const Uri *a, const Uri *b, BOOL *ret) } /* Fast path */ - if(a->path_len == b->path_len && !memicmpW(a->canon_uri+a->path_start, b->canon_uri+b->path_start, a->path_len)) { + if(a->path_len == b->path_len && !_wcsnicmp(a->canon_uri+a->path_start, b->canon_uri+b->path_start, a->path_len)) { *ret = TRUE; return S_OK; } @@ -3909,7 +3908,7 @@ static HRESULT compare_file_paths(const Uri *a, const Uri *b, BOOL *ret) len_a = canonicalize_path_hierarchical(a->canon_uri+a->path_start, a->path_len, a->scheme_type, FALSE, 0, FALSE, canon_path_a); len_b = canonicalize_path_hierarchical(b->canon_uri+b->path_start, b->path_len, b->scheme_type, FALSE, 0, FALSE, canon_path_b); - *ret = len_a == len_b && !memicmpW(canon_path_a, canon_path_b, len_a); + *ret = len_a == len_b && !_wcsnicmp(canon_path_a, canon_path_b, len_a); heap_free(canon_path_a); heap_free(canon_path_b); @@ -6417,21 +6416,18 @@ static HRESULT merge_paths(parse_data *data, const WCHAR *base, DWORD base_len, /* If not found, try finding the end of @xxx: */ if(end == base+base_len-1) - end = *base == '@' ? memchr(base, ':', base_len) : NULL; + end = *base == '@' ? wmemchr(base, ':', base_len) : NULL; }else { /* Find the characters that will be copied over from the base path. */ - end = memrchrW(base, '/', base_len); - if(!end && data->scheme_type == URL_SCHEME_FILE) + for (end = base + base_len - 1; end >= base; end--) if (*end == '/') break; + if(end < base && data->scheme_type == URL_SCHEME_FILE) /* Try looking for a '\\'. */ - end = memrchrW(base, '\\', base_len); + for (end = base + base_len - 1; end >= base; end--) if (*end == '\\') break; } } - if(end) { - base_copy_len = (end+1)-base; - *result = heap_alloc((base_copy_len+relative_len+1)*sizeof(WCHAR)); - } else - *result = heap_alloc((relative_len+1)*sizeof(WCHAR)); + if (end) base_copy_len = (end+1)-base; + *result = heap_alloc((base_copy_len+relative_len+1)*sizeof(WCHAR)); if(!(*result)) { *result_len = 0; @@ -6439,10 +6435,8 @@ static HRESULT merge_paths(parse_data *data, const WCHAR *base, DWORD base_len, } ptr = *result; - if(end) { - memcpy(ptr, base, base_copy_len*sizeof(WCHAR)); - ptr += base_copy_len; - } + memcpy(ptr, base, base_copy_len*sizeof(WCHAR)); + ptr += base_copy_len; memcpy(ptr, relative, relative_len*sizeof(WCHAR)); ptr += relative_len; diff --git a/dll/win32/urlmon/urlmon_main.c b/dll/win32/urlmon/urlmon_main.c index 06f0698efa4..0e98b9e3fc9 100644 --- a/dll/win32/urlmon/urlmon_main.c +++ b/dll/win32/urlmon/urlmon_main.c @@ -608,7 +608,7 @@ HRESULT WINAPI CopyStgMedium(const STGMEDIUM *src, STGMEDIUM *dst) break; case TYMED_FILE: if(src->u.lpszFileName && !src->pUnkForRelease) { - DWORD size = (strlenW(src->u.lpszFileName)+1)*sizeof(WCHAR); + DWORD size = (lstrlenW(src->u.lpszFileName)+1)*sizeof(WCHAR); dst->u.lpszFileName = CoTaskMemAlloc(size); if(!dst->u.lpszFileName) return E_OUTOFMEMORY; @@ -674,7 +674,7 @@ HRESULT WINAPI CopyBindInfo(const BINDINFO *pcbiSrc, BINDINFO *pcbiDest) size = FIELD_OFFSET(BINDINFO, szExtraInfo)+sizeof(void*); if(pcbiSrc->cbSize>=size && pcbiDest->cbSize>=size && pcbiSrc->szExtraInfo) { - size = (strlenW(pcbiSrc->szExtraInfo)+1)*sizeof(WCHAR); + size = (lstrlenW(pcbiSrc->szExtraInfo)+1)*sizeof(WCHAR); pcbiDest->szExtraInfo = CoTaskMemAlloc(size); if(!pcbiDest->szExtraInfo) return E_OUTOFMEMORY; @@ -692,7 +692,7 @@ HRESULT WINAPI CopyBindInfo(const BINDINFO *pcbiSrc, BINDINFO *pcbiDest) size = FIELD_OFFSET(BINDINFO, szCustomVerb)+sizeof(void*); if(pcbiSrc->cbSize>=size && pcbiDest->cbSize>=size && pcbiSrc->szCustomVerb) { - size = (strlenW(pcbiSrc->szCustomVerb)+1)*sizeof(WCHAR); + size = (lstrlenW(pcbiSrc->szCustomVerb)+1)*sizeof(WCHAR); pcbiDest->szCustomVerb = CoTaskMemAlloc(size); if(!pcbiDest->szCustomVerb) { CoTaskMemFree(pcbiDest->szExtraInfo); @@ -810,6 +810,16 @@ int WINAPI MapBrowserEmulationModeToUserAgent(DWORD unk1, DWORD unk2) return 0; } +/*********************************************************************** + * CoInternetGetBrowserProfile (URLMON.446) + * Undocumented, added in IE8 + */ +HRESULT WINAPI CoInternetGetBrowserProfile(DWORD unk) +{ + FIXME("%x: stub\n", unk); + return E_NOTIMPL; +} + /*********************************************************************** * FlushUrlmonZonesCache (URLMON.455) * Undocumented, added in IE8 @@ -828,3 +838,25 @@ HRESULT WINAPI RegisterMediaTypes(UINT types, LPCSTR *szTypes, CLIPFORMAT *cfTyp FIXME("stub: %u %p %p\n", types, szTypes, cfTypes); return E_INVALIDARG; } + +/*********************************************************************** + * ShouldShowIntranetWarningSecband + * Undocumented, added in IE7 + */ +BOOL WINAPI ShouldShowIntranetWarningSecband(DWORD unk) +{ + FIXME("%x: stub\n", unk); + return FALSE; +} + +/*********************************************************************** + * GetIUriPriv (urlmon.@) + * + * Not documented. + */ +HRESULT WINAPI GetIUriPriv(IUri *uri, void **p) +{ + FIXME("(%p,%p): stub\n", uri, p); + *p = NULL; + return E_NOTIMPL; +} diff --git a/dll/win32/urlmon/urlmon_main.h b/dll/win32/urlmon/urlmon_main.h index e28b351cb3b..6eca2e0061e 100644 --- a/dll/win32/urlmon/urlmon_main.h +++ b/dll/win32/urlmon/urlmon_main.h @@ -21,21 +21,22 @@ #define __WINE_URLMON_MAIN_H #include <stdarg.h> - -#define COBJMACROS - #ifdef __REACTOS__ -#define PROXY_CLSID_IS {0x79EAC9F1,0xBAF9,0x11CE,{0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B}} +#include <wchar.h> #endif +#define COBJMACROS + #include "windef.h" #include "winbase.h" #include "winuser.h" +#ifdef __REACTOS__ +#include "winnls.h" +#endif #include "ole2.h" #include "urlmon.h" #include "wininet.h" -#include "wine/unicode.h" #include "wine/heap.h" #include "wine/list.h" @@ -248,7 +249,7 @@ static inline LPWSTR heap_strdupW(LPCWSTR str) if(str) { DWORD size; - size = (strlenW(str)+1)*sizeof(WCHAR); + size = (lstrlenW(str)+1)*sizeof(WCHAR); ret = heap_alloc(size); if(ret) memcpy(ret, str, size); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index e906511a5ed..ba7afbefd41 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -189,7 +189,7 @@ dll/win32/traffic # Synced to WineStaging-3.3 dll/win32/twain_32 # Synced to WineStaging-4.18 dll/win32/updspapi # Synced to WineStaging-4.18 dll/win32/url # Synced to WineStaging-3.3 -dll/win32/urlmon # Synced to WineStaging-4.0 +dll/win32/urlmon # Synced to WineStaging-4.18 dll/win32/usp10 # Synced to WineStaging-4.0 dll/win32/uxtheme # Forked dll/win32/vbscript # Synced to WineStaging-4.0
5 years
1
0
0
0
[reactos] 01/01: [UPDSPAPI] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7cddbe34e20521f959a63…
commit 7cddbe34e20521f959a630a894008d8267523bdf Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 1 19:39:04 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Dec 1 19:39:04 2019 +0100 [UPDSPAPI] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/updspapi/main.c | 2 -- media/doc/README.WINE | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dll/win32/updspapi/main.c b/dll/win32/updspapi/main.c index 73af32fe983..61c8ea52627 100644 --- a/dll/win32/updspapi/main.c +++ b/dll/win32/updspapi/main.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include <stdarg.h> #include "windef.h" diff --git a/media/doc/README.WINE b/media/doc/README.WINE index a0ebb653019..e906511a5ed 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -187,7 +187,7 @@ dll/win32/t2embed # Synced to WineStaging-4.18 dll/win32/tapi32 # Synced to WineStaging-4.18 dll/win32/traffic # Synced to WineStaging-3.3 dll/win32/twain_32 # Synced to WineStaging-4.18 -dll/win32/updspapi # Synced to WineStaging-3.3 +dll/win32/updspapi # Synced to WineStaging-4.18 dll/win32/url # Synced to WineStaging-3.3 dll/win32/urlmon # Synced to WineStaging-4.0 dll/win32/usp10 # Synced to WineStaging-4.0
5 years
1
0
0
0
[reactos] 01/01: [TWAIN_32] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=174271931a228fec60f93…
commit 174271931a228fec60f9363f4f4f8b49e151426e Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 1 19:38:39 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Dec 1 19:38:39 2019 +0100 [TWAIN_32] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/twain_32/dsm_ctrl.c | 8 +++----- dll/win32/twain_32/precomp.h | 2 -- dll/win32/twain_32/twain32_main.c | 2 -- dll/win32/twain_32/twain_i.h | 4 ---- media/doc/README.WINE | 2 +- 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/dll/win32/twain_32/dsm_ctrl.c b/dll/win32/twain_32/dsm_ctrl.c index 0b2098654f8..45f227e180b 100644 --- a/dll/win32/twain_32/dsm_ctrl.c +++ b/dll/win32/twain_32/dsm_ctrl.c @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include <stdlib.h> #include <stdarg.h> #include <stdio.h> @@ -59,12 +57,12 @@ twain_add_onedriver(const char *dsname) { hmod = LoadLibraryA(dsname); if (!hmod) { - ERR("Failed to load TWAIN Source %s\n", dsname); + ERR("Failed to load TWAIN Source %s\n", debugstr_a(dsname)); return; } dsEntry = (DSENTRYPROC)GetProcAddress(hmod, "DS_Entry"); if (!dsEntry) { - ERR("Failed to find DS_Entry() in TWAIN DS %s\n", dsname); + ERR("Failed to find DS_Entry() in TWAIN DS %s\n", debugstr_a(dsname)); return; } /* Loop to do multiple detects, mostly for sane.ds and gphoto2.ds */ @@ -319,7 +317,7 @@ TW_UINT16 TWAIN_OpenDS (pTW_IDENTITY pOrigin, TW_MEMREF pData) } hmod = LoadLibraryA(devices[i].modname); if (!hmod) { - ERR("Failed to load TWAIN Source %s\n", modname); + ERR("Failed to load TWAIN Source %s\n", debugstr_a(modname)); DSM_twCC = TWCC_OPERATIONERROR; HeapFree(GetProcessHeap(), 0, newSource); return TWRC_FAILURE; diff --git a/dll/win32/twain_32/precomp.h b/dll/win32/twain_32/precomp.h index ac103c96449..724a83b24e6 100644 --- a/dll/win32/twain_32/precomp.h +++ b/dll/win32/twain_32/precomp.h @@ -2,8 +2,6 @@ #ifndef _TWAIN32_PRECOMP_H #define _TWAIN32_PRECOMP_H -#include <wine/config.h> - #define NONAMELESSUNION #define NONAMELESSSTRUCT diff --git a/dll/win32/twain_32/twain32_main.c b/dll/win32/twain_32/twain32_main.c index 016680b96eb..b1beb969580 100644 --- a/dll/win32/twain_32/twain32_main.c +++ b/dll/win32/twain_32/twain32_main.c @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include <stdarg.h> #include "windef.h" diff --git a/dll/win32/twain_32/twain_i.h b/dll/win32/twain_32/twain_i.h index 4d33135344e..7939d233bb0 100644 --- a/dll/win32/twain_32/twain_i.h +++ b/dll/win32/twain_32/twain_i.h @@ -20,10 +20,6 @@ #ifndef _TWAIN32_H #define _TWAIN32_H -#ifndef __WINE_CONFIG_H -# error You must include config.h first -#endif - #include <stdarg.h> #include "windef.h" diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 4d6dd61c7b3..a0ebb653019 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -186,7 +186,7 @@ dll/win32/sxs # Synced to WineStaging-4.18 dll/win32/t2embed # Synced to WineStaging-4.18 dll/win32/tapi32 # Synced to WineStaging-4.18 dll/win32/traffic # Synced to WineStaging-3.3 -dll/win32/twain_32 # Synced to WineStaging-3.3 +dll/win32/twain_32 # Synced to WineStaging-4.18 dll/win32/updspapi # Synced to WineStaging-3.3 dll/win32/url # Synced to WineStaging-3.3 dll/win32/urlmon # Synced to WineStaging-4.0
5 years
1
0
0
0
[reactos] 01/01: [TAPI32] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3edf37e269749ca6fb55f…
commit 3edf37e269749ca6fb55f3e6b037c42bf7a09d20 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 1 19:38:13 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Dec 1 19:38:13 2019 +0100 [TAPI32] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/tapi32/assisted.c | 8 ++------ dll/win32/tapi32/line.c | 14 +++++++------- dll/win32/tapi32/precomp.h | 4 +--- media/doc/README.WINE | 2 +- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/dll/win32/tapi32/assisted.c b/dll/win32/tapi32/assisted.c index 57c24e81874..3ae4c7cac8c 100644 --- a/dll/win32/tapi32/assisted.c +++ b/dll/win32/tapi32/assisted.c @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include <stdarg.h> #include <stdio.h> #include "windef.h" @@ -30,7 +27,6 @@ #include "winreg.h" #include "objbase.h" #include "tapi.h" -#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(tapi); @@ -65,7 +61,7 @@ DWORD WINAPI tapiGetLocationInfoW(LPWSTR countrycode, LPWSTR citycode) if(!RegQueryValueExW(hkey, currentidW, 0, &type, (LPBYTE) &currid, &valsize) && type == REG_DWORD) { /* find a subkey called Location1, Location2... */ - sprintfW( szlockey, locationW, currid); + swprintf( szlockey, locationW, currid); if( !RegOpenKeyW( hkey, szlockey, &hsubkey)) { if( citycode) { bufsize=sizeof(buf); @@ -79,7 +75,7 @@ DWORD WINAPI tapiGetLocationInfoW(LPWSTR countrycode, LPWSTR citycode) bufsize=sizeof(buf); if( !RegQueryValueExW( hsubkey, countryW, 0, &type, buf, &bufsize) && type == REG_DWORD) - snprintfW( countrycode, 8, fmtW, *(LPDWORD) buf ); + swprintf( countrycode, fmtW, *(LPDWORD) buf ); else countrycode[0] = '\0'; } diff --git a/dll/win32/tapi32/line.c b/dll/win32/tapi32/line.c index c0e25ba4d8a..17fecf36242 100644 --- a/dll/win32/tapi32/line.c +++ b/dll/win32/tapi32/line.c @@ -24,6 +24,7 @@ #include <stdio.h> #include "windef.h" #include "winbase.h" +#include "wine/winternl.h" #include "wingdi.h" #include "winreg.h" #include "winnls.h" @@ -31,7 +32,6 @@ #include "objbase.h" #include "tapi.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(tapi); @@ -538,7 +538,7 @@ DWORD WINAPI lineGetCountryW(DWORD id, DWORD version, LPLINECOUNTRYLIST list) HKEY hsubkey; if (RegEnumKeyW(hkey, i, subkey_name, max_subkey_len) != ERROR_SUCCESS) continue; - if (id && (atoiW(subkey_name) != id)) continue; + if (id && (wcstol(subkey_name, NULL, 10) != id)) continue; if (RegOpenKeyW(hkey, subkey_name, &hsubkey) != ERROR_SUCCESS) continue; RegQueryValueExW(hsubkey, international_ruleW, NULL, NULL, NULL, &size_int); @@ -565,7 +565,7 @@ DWORD WINAPI lineGetCountryW(DWORD id, DWORD version, LPLINECOUNTRYLIST list) list->dwUsedSize += len + sizeof(LINECOUNTRYENTRY); if (id) i = 0; - entry[i].dwCountryID = atoiW(subkey_name); + entry[i].dwCountryID = wcstol(subkey_name, NULL, 10); size = sizeof(DWORD); RegQueryValueExW(hsubkey, country_codeW, NULL, NULL, (BYTE *)&entry[i].dwCountryCode, &size); entry[i].dwNextCountryID = 0; @@ -845,7 +845,7 @@ DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD dwAPIVersion, == ERROR_SUCCESS){ DWORD size_val; i++; - if( strncasecmp(loc_key_name, "location", 8) || + if( _strnicmp(loc_key_name, "location", 8) || (RegOpenKeyA(hkLocations, loc_key_name, &hsubkey) != ERROR_SUCCESS)) continue; @@ -907,7 +907,7 @@ DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD dwAPIVersion, ERROR_SUCCESS){ DWORD size_val; i++; - if( strncasecmp(card_key_name, "card", 4) || ERROR_SUCCESS != + if( _strnicmp(card_key_name, "card", 4) || ERROR_SUCCESS != (RegOpenKeyA(hkCards, card_key_name, &hsubkey) )) continue; numcards++; @@ -984,7 +984,7 @@ DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD dwAPIVersion, == ERROR_SUCCESS){ DWORD size_val; i++; - if( strncasecmp(loc_key_name, "location", 8) || + if( _strnicmp(loc_key_name, "location", 8) || (RegOpenKeyA(hkLocations, loc_key_name, &hsubkey) != ERROR_SUCCESS)) continue; @@ -1077,7 +1077,7 @@ DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD dwAPIVersion, ERROR_SUCCESS){ DWORD size_val; i++; - if( strncasecmp(card_key_name, "card", 4) || + if( _strnicmp(card_key_name, "card", 4) || (RegOpenKeyA(hkCards, card_key_name, &hsubkey) != ERROR_SUCCESS)) continue; size_val=sizeof(DWORD); diff --git a/dll/win32/tapi32/precomp.h b/dll/win32/tapi32/precomp.h index e51c67ba010..d057ccd4343 100644 --- a/dll/win32/tapi32/precomp.h +++ b/dll/win32/tapi32/precomp.h @@ -2,8 +2,6 @@ #ifndef _TAPI32_PCH_ #define _TAPI32_PCH_ -#include <wine/config.h> - #include <stdarg.h> #define WIN32_NO_STATUS @@ -13,10 +11,10 @@ #include <windef.h> #include <winbase.h> #include <winreg.h> +#include <winnls.h> #include <objbase.h> #include <tapi.h> -#include <wine/unicode.h> #include <wine/debug.h> #endif /* !_TAPI32_PCH_ */ diff --git a/media/doc/README.WINE b/media/doc/README.WINE index f74f8825b21..4d6dd61c7b3 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -184,7 +184,7 @@ dll/win32/stdole32.tlb # Synced to WineStaging-3.3 dll/win32/sti # Synced to WineStaging-4.18 dll/win32/sxs # Synced to WineStaging-4.18 dll/win32/t2embed # Synced to WineStaging-4.18 -dll/win32/tapi32 # Synced to WineStaging-3.3 +dll/win32/tapi32 # Synced to WineStaging-4.18 dll/win32/traffic # Synced to WineStaging-3.3 dll/win32/twain_32 # Synced to WineStaging-3.3 dll/win32/updspapi # Synced to WineStaging-3.3
5 years
1
0
0
0
[reactos] 01/01: [T2EMBED] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5a267e6b9eebcd4a73067…
commit 5a267e6b9eebcd4a73067975500d8c8188045511 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 1 19:37:45 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Dec 1 19:37:45 2019 +0100 [T2EMBED] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/t2embed/main.c | 3 --- media/doc/README.WINE | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dll/win32/t2embed/main.c b/dll/win32/t2embed/main.c index 288c19bee17..e47884611ce 100644 --- a/dll/win32/t2embed/main.c +++ b/dll/win32/t2embed/main.c @@ -17,9 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ - -#include "config.h" - #include <stdarg.h> #include "windef.h" diff --git a/media/doc/README.WINE b/media/doc/README.WINE index a5878eb06ef..f74f8825b21 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -183,7 +183,7 @@ dll/win32/stdole2.tlb # Synced to WineStaging-3.3 dll/win32/stdole32.tlb # Synced to WineStaging-3.3 dll/win32/sti # Synced to WineStaging-4.18 dll/win32/sxs # Synced to WineStaging-4.18 -dll/win32/t2embed # Synced to WineStaging-4.0 +dll/win32/t2embed # Synced to WineStaging-4.18 dll/win32/tapi32 # Synced to WineStaging-3.3 dll/win32/traffic # Synced to WineStaging-3.3 dll/win32/twain_32 # Synced to WineStaging-3.3
5 years
1
0
0
0
[reactos] 01/01: [RICHED32_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d9010a8166a009b0fe21d…
commit d9010a8166a009b0fe21d0390944163c08382880 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Dec 1 19:37:14 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Dec 1 19:37:14 2019 +0100 [RICHED32_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/riched32/editor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/rostests/winetests/riched32/editor.c b/modules/rostests/winetests/riched32/editor.c index dd9773c3f69..0d55b7cd6ed 100644 --- a/modules/rostests/winetests/riched32/editor.c +++ b/modules/rostests/winetests/riched32/editor.c @@ -1263,8 +1263,8 @@ static void test_enter(void) SendMessageW(hwndRichEdit, WM_CHAR, 'T', 0); SendMessageW(hwndRichEdit, WM_CHAR, '\r', 0); - SendMessageA(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM)buf); - ok(result == 1, "Got %d\n", (int)result); + result = SendMessageA(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM)buf); + ok(result == 3, "Got %ld\n", result); format_test_result(resultbuf, buf); format_test_result(expectedbuf, "T\r\n"); result = strcmp(resultbuf, expectedbuf); @@ -1358,7 +1358,7 @@ static void test_EM_EXSETSEL(void) /* Test with multibyte character */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"abcdef\x8e\xf0ghijk"); /* 012345 6 7 8901 */ - cr.cpMin = 4, cr.cpMax = 8; + cr.cpMin = 4; cr.cpMax = 8; result = SendMessageA(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&cr); todo_wine ok(result == 7, "EM_EXSETSEL return %ld expected 7\n", result); result = SendMessageA(hwndRichEdit, EM_GETSELTEXT, sizeof(bufA), (LPARAM)bufA);
5 years
1
0
0
0
[reactos] 01/01: [TRANSLATION] Some Hebrew Translation for Shell32 (#2121)
by Shy Zedaka
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b6743016f7ee121182700…
commit b6743016f7ee121182700e021f8ac91dc167d1b7 Author: Shy Zedaka <shaytzedaka(a)outlook.com> AuthorDate: Sun Dec 1 20:30:48 2019 +0200 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Dec 1 19:30:48 2019 +0100 [TRANSLATION] Some Hebrew Translation for Shell32 (#2121) --- dll/win32/shell32/lang/he-IL.rc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc index bcd51f00d61..a4ecdec500e 100644 --- a/dll/win32/shell32/lang/he-IL.rc +++ b/dll/win32/shell32/lang/he-IL.rc @@ -771,9 +771,9 @@ BEGIN IDS_PASTE "הכנס" IDS_EJECT "הוצא" IDS_DISCONNECT "נתק" - IDS_OPENFILELOCATION "Open f&ile location" - IDS_DESKLINK "Desktop (Create shortcut)" - IDS_SENDTO_MENU "Se&nd To" + IDS_OPENFILELOCATION "&פתח מיקום קובץ" + IDS_DESKLINK "שולחן העבודה (צור קיצור דרך)" + IDS_SENDTO_MENU "&שלח אל" IDS_MOVEERRORTITLE "Error Moving File or Folder" IDS_COPYERRORTITLE "Error Copying File or Folder" IDS_MOVEERRORSAME "Cannot move '%s': The destination folder is the same as the source folder." @@ -826,7 +826,7 @@ BEGIN IDS_FAVORITES "מועדפים" IDS_STARTUP "תפריט ההתחלה\\תכניות\\הפעלה" IDS_RECENT "אחרונים" - IDS_SENDTO "שאל אל" + IDS_SENDTO "שלח אל" IDS_STARTMENU "תפריט התחל" IDS_MYMUSIC "המוסיקה שלי" IDS_MYVIDEO "הוידאו שלי" @@ -905,7 +905,7 @@ BEGIN IDS_OTF_FILE "קובץ גופן OpenType" IDS_HLP_FILE "קובץ עזרה" IDS_ICO_FILE "סמל" - IDS_INI_FILE "Configuration Settings" + IDS_INI_FILE "קובץ הגדרות תצורה" IDS_LNK_FILE "קיצור דרך" IDS_NT__FILE "NT DOS32 Configuration File" IDS_PIF_FILE "NT VDM Program Information File" @@ -920,7 +920,7 @@ BEGIN IDS_EDIT_VERB "ערוך" IDS_FIND_VERB "מצא" IDS_PRINT_VERB "הדפס" - IDS_CMD_VERB "Command Prompt here" + IDS_CMD_VERB "פתח בשורת הפקודה" IDS_FILE_FOLDER "%u קבצים, %u תיקיות" IDS_PRINTERS "מדפסות"
5 years
1
0
0
0
[reactos] 01/01: [SHELL32][ZIPFLDR] Implement SendTo ZIP folder (#2118)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f1bc04d7e604d069ef456…
commit f1bc04d7e604d069ef45657325ad0a731cbf3775 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Dec 2 02:26:34 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Dec 2 02:26:34 2019 +0900 [SHELL32][ZIPFLDR] Implement SendTo ZIP folder (#2118) Follow-up of #2114. - s/Creater/Creator/ - Add an empty file in the SendTo folder. - Trick. CORE-16495 --- dll/shellext/zipfldr/CMakeLists.txt | 2 +- dll/shellext/zipfldr/CSendToZip.cpp | 12 +++++------- dll/shellext/zipfldr/CSendToZip.hpp | 9 +++++---- .../zipfldr/{CZipCreater.cpp => CZipCreator.cpp} | 10 +++++----- .../zipfldr/{CZipCreater.hpp => CZipCreator.hpp} | 6 +++--- dll/shellext/zipfldr/precomp.h | 2 +- dll/win32/shell32/wine/shellpath.c | 20 +++++++++++++++++++- 7 files changed, 39 insertions(+), 22 deletions(-) diff --git a/dll/shellext/zipfldr/CMakeLists.txt b/dll/shellext/zipfldr/CMakeLists.txt index a0244d642aa..f0339f9a6ff 100644 --- a/dll/shellext/zipfldr/CMakeLists.txt +++ b/dll/shellext/zipfldr/CMakeLists.txt @@ -29,7 +29,7 @@ list(APPEND SOURCE CEnumZipContents.cpp CFolderViewCB.cpp CSendToZip.cpp - CZipCreater.cpp + CZipCreator.cpp CZipEnumerator.hpp CZipExtract.cpp CZipFolder.hpp diff --git a/dll/shellext/zipfldr/CSendToZip.cpp b/dll/shellext/zipfldr/CSendToZip.cpp index 9ec9bd5dc7a..67f774c141d 100644 --- a/dll/shellext/zipfldr/CSendToZip.cpp +++ b/dll/shellext/zipfldr/CSendToZip.cpp @@ -47,12 +47,10 @@ CSendToZip::Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) { m_pDataObject = pDataObj; - *pdwEffect &= DROPEFFECT_COPY; - if (!pDataObj || !m_fCanDragDrop || !*pdwEffect) + if (!pDataObj || !m_fCanDragDrop) { - DPRINT1("Drop failed: %d %d %d\n", - !pDataObj, !m_fCanDragDrop, !*pdwEffect); + DPRINT1("Drop failed: %d %d\n", !pDataObj, !m_fCanDragDrop); *pdwEffect = 0; DragLeave(); return E_FAIL; @@ -71,19 +69,19 @@ CSendToZip::Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, HDROP hDrop = reinterpret_cast<HDROP>(stg.hGlobal); UINT cItems = ::DragQueryFileW(hDrop, -1, NULL, 0); - CZipCreator *pCreater = CZipCreator::DoCreate(); + CZipCreator *pCreator = CZipCreator::DoCreate(); for (UINT iItem = 0; iItem < cItems; ++iItem) { WCHAR szPath[MAX_PATH]; DragQueryFileW(hDrop, iItem, szPath, _countof(szPath)); - pCreater->DoAddItem(szPath); + pCreator->DoAddItem(szPath); } ::ReleaseStgMedium(&stg); - CZipCreator::runThread(pCreater); // pCreater is deleted in runThread + CZipCreator::runThread(pCreator); // pCreator is deleted in runThread DragLeave(); return hr; diff --git a/dll/shellext/zipfldr/CSendToZip.hpp b/dll/shellext/zipfldr/CSendToZip.hpp index 1f3eb248a13..b4e8fca325c 100644 --- a/dll/shellext/zipfldr/CSendToZip.hpp +++ b/dll/shellext/zipfldr/CSendToZip.hpp @@ -46,21 +46,22 @@ public: } STDMETHODIMP Save(LPCOLESTR pszFileName, BOOL fRemember) { - return E_FAIL; + return E_NOTIMPL; } STDMETHODIMP SaveCompleted(LPCOLESTR pszFileName) { - return E_FAIL; + return E_NOTIMPL; } STDMETHODIMP GetCurFile(LPOLESTR *ppszFileName) { - return E_FAIL; + return E_NOTIMPL; } // *** IPersist methods *** STDMETHODIMP GetClassID(CLSID *pclsid) { - return E_FAIL; + *pclsid = CLSID_ZipFolderSendTo; + return S_OK; } public: diff --git a/dll/shellext/zipfldr/CZipCreater.cpp b/dll/shellext/zipfldr/CZipCreator.cpp similarity index 97% rename from dll/shellext/zipfldr/CZipCreater.cpp rename to dll/shellext/zipfldr/CZipCreator.cpp index 694128b6bcb..c0ba8da0b68 100644 --- a/dll/shellext/zipfldr/CZipCreater.cpp +++ b/dll/shellext/zipfldr/CZipCreator.cpp @@ -182,15 +182,15 @@ CZipCreator::~CZipCreator() static unsigned __stdcall create_zip_function(void *arg) { - CZipCreator *pCreater = reinterpret_cast<CZipCreator *>(arg); - return pCreater->m_pimpl->JustDoIt(); + CZipCreator *pCreator = reinterpret_cast<CZipCreator *>(arg); + return pCreator->m_pimpl->JustDoIt(); } -BOOL CZipCreator::runThread(CZipCreator *pCreater) +BOOL CZipCreator::runThread(CZipCreator *pCreator) { unsigned tid = 0; HANDLE hThread = reinterpret_cast<HANDLE>( - _beginthreadex(NULL, 0, create_zip_function, pCreater, 0, &tid)); + _beginthreadex(NULL, 0, create_zip_function, pCreator, 0, &tid)); if (hThread) { @@ -204,7 +204,7 @@ BOOL CZipCreator::runThread(CZipCreator *pCreater) CStringW strText(MAKEINTRESOURCEW(IDS_CANTSTARTTHREAD)); MessageBoxW(NULL, strText, strTitle, MB_ICONERROR); - delete pCreater; + delete pCreator; return FALSE; } diff --git a/dll/shellext/zipfldr/CZipCreater.hpp b/dll/shellext/zipfldr/CZipCreator.hpp similarity index 85% rename from dll/shellext/zipfldr/CZipCreater.hpp rename to dll/shellext/zipfldr/CZipCreator.hpp index 52fb14f9ead..1a77451ea8f 100644 --- a/dll/shellext/zipfldr/CZipCreater.hpp +++ b/dll/shellext/zipfldr/CZipCreator.hpp @@ -5,8 +5,8 @@ * COPYRIGHT: Copyright 2019 Mark Jansen (mark.jansen(a)reactos.org) * Copyright 2019 Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com) */ -#ifndef CZIPCREATER_HPP_ -#define CZIPCREATER_HPP_ +#ifndef CZIPCREATOR_HPP_ +#define CZIPCREATOR_HPP_ struct CZipCreatorImpl; @@ -23,7 +23,7 @@ public: } virtual void DoAddItem(LPCWSTR pszFile); - static BOOL runThread(CZipCreator* pCreater); + static BOOL runThread(CZipCreator* pCreator); protected: CZipCreator(); diff --git a/dll/shellext/zipfldr/precomp.h b/dll/shellext/zipfldr/precomp.h index ed61dc75dcc..b228624b8dc 100644 --- a/dll/shellext/zipfldr/precomp.h +++ b/dll/shellext/zipfldr/precomp.h @@ -78,7 +78,7 @@ eZipConfirmResponse _CZipAskReplace(HWND hDlg, const char* FullPath); #include "CZipEnumerator.hpp" #include "CZipFolder.hpp" -#include "CZipCreater.hpp" +#include "CZipCreator.hpp" #include "CSendToZip.hpp" #endif /* ZIPFLDR_PRECOMP_H */ diff --git a/dll/win32/shell32/wine/shellpath.c b/dll/win32/shell32/wine/shellpath.c index 3c1906375fe..984116f8a38 100644 --- a/dll/win32/shell32/wine/shellpath.c +++ b/dll/win32/shell32/wine/shellpath.c @@ -2224,6 +2224,7 @@ HRESULT DoCreateSendToFiles(LPCWSTR pszSendTo) WCHAR szShell32[MAX_PATH]; HRESULT hr; HANDLE hFile; + HINSTANCE hZipFldr; /* create my documents */ SHGetSpecialFolderPathW(NULL, szTarget, CSIDL_MYDOCUMENTS, TRUE); @@ -2248,7 +2249,24 @@ HRESULT DoCreateSendToFiles(LPCWSTR pszSendTo) CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); CloseHandle(hFile); - return hr; + /* create zipped compressed folder */ + hZipFldr = LoadLibraryW(L"zipfldr.dll"); + if (hZipFldr) + { +#define IDS_FRIENDLYNAME 10195 + LoadStringW(hZipFldr, IDS_FRIENDLYNAME, szTarget, _countof(szTarget)); +#undef IDS_FRIENDLYNAME + FreeLibrary(hZipFldr); + + StringCbCopyW(szSendToFile, sizeof(szSendToFile), pszSendTo); + PathAppendW(szSendToFile, szTarget); + StringCbCatW(szSendToFile, sizeof(szSendToFile), L".ZFSendToTarget"); + hFile = CreateFileW(szSendToFile, GENERIC_WRITE, FILE_SHARE_READ, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + CloseHandle(hFile); + } + + return S_OK; } /*************************************************************************
5 years
1
0
0
0
← Newer
1
...
19
20
21
22
23
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
Results per page:
10
25
50
100
200