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
2025
January
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
January 2019
----- 2025 -----
January 2025
----- 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
31 participants
300 discussions
Start a n
N
ew thread
[reactos] 01/01: [INETMIB1_WINETEST] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9a0babd145356adfe2508…
commit 9a0babd145356adfe25083ffbc30ff6d3458aa0e Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 26 13:11:11 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 26 13:11:11 2019 +0100 [INETMIB1_WINETEST] Sync with Wine Staging 4.0. CORE-15682 --- modules/rostests/winetests/inetmib1/main.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/rostests/winetests/inetmib1/main.c b/modules/rostests/winetests/inetmib1/main.c index 057cc6e744..32785fcc3f 100644 --- a/modules/rostests/winetests/inetmib1/main.c +++ b/modules/rostests/winetests/inetmib1/main.c @@ -123,7 +123,7 @@ if (0) /* crashes on native */ /* Oddly enough, this "succeeds," even though the OID is clearly * unsupported. */ - vars[0].name.idLength = sizeof(bogus) / sizeof(bogus[0]); + vars[0].name.idLength = ARRAY_SIZE(bogus); vars[0].name.ids = bogus; vars[0].value.asnType = 0; list.len = 1; @@ -146,7 +146,7 @@ if (0) /* crashes on native */ "expected 1.2.3.4, got %s\n", SnmpUtilOidToA(&vars[0].name)); /* The table is not an accessible variable, so it fails */ - vars[0].name.idLength = sizeof(mib2IfTable) / sizeof(mib2IfTable[0]); + vars[0].name.idLength = ARRAY_SIZE(mib2IfTable); vars[0].name.ids = mib2IfTable; SetLastError(0xdeadbeef); error = 0xdeadbeef; @@ -161,13 +161,11 @@ if (0) /* crashes on native */ /* A Get fails on something that specifies a table (but not a particular * entry in it)... */ - vars[0].name.idLength = sizeof(mib2IfDescr) / sizeof(mib2IfDescr[0]); + vars[0].name.idLength = ARRAY_SIZE(mib2IfDescr); vars[0].name.ids = mib2IfDescr; - vars[1].name.idLength = - sizeof(mib2IfAdminStatus) / sizeof(mib2IfAdminStatus[0]); + vars[1].name.idLength = ARRAY_SIZE(mib2IfAdminStatus); vars[1].name.ids = mib2IfAdminStatus; - vars[2].name.idLength = - sizeof(mib2IfOperStatus) / sizeof(mib2IfOperStatus[0]); + vars[2].name.idLength = ARRAY_SIZE(mib2IfOperStatus); vars[2].name.ids = mib2IfOperStatus; list.len = 3; SetLastError(0xdeadbeef); @@ -270,7 +268,7 @@ if (0) /* crashes on native */ * variables, on recent systems (at least Win2k) the first variable it * returns a value for is the first interface. */ - vars[0].name.idLength = sizeof(mib2System) / sizeof(mib2System[0]); + vars[0].name.idLength = ARRAY_SIZE(mib2System); vars[0].name.ids = mib2System; SnmpUtilOidCpy(&vars2[0].name, &vars[0].name); vars2[0].value.asnType = 0; @@ -282,7 +280,7 @@ if (0) /* crashes on native */ ok(error == SNMP_ERRORSTATUS_NOERROR, "expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); ok(index == 0, "expected index 0, got %d\n", index); - vars3[0].name.idLength = sizeof(mib2If) / sizeof(mib2If[0]); + vars3[0].name.idLength = ARRAY_SIZE(mib2If); vars3[0].name.ids = mib2If; ok(!SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, vars[0].name.idLength) || !SnmpUtilOidNCmp(&vars2[0].name, &vars3[0].name, vars3[0].name.idLength), @@ -291,7 +289,7 @@ if (0) /* crashes on native */ SnmpUtilVarBindFree(&vars2[0]); /* Check the type and OIDs of the IP address table */ - vars[0].name.idLength = sizeof(mib2IpAddr) / sizeof(mib2IpAddr[0]); + vars[0].name.idLength = ARRAY_SIZE(mib2IpAddr); vars[0].name.ids = mib2IpAddr; SnmpUtilOidCpy(&vars2[0].name, &vars[0].name); vars2[0].value.asnType = 0;
6 years
1
0
0
0
[reactos] 01/01: [INETCOMM] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4973a53fc32c478d25eea…
commit 4973a53fc32c478d25eeac326d8036da9aadad03 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 26 13:10:33 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 26 13:10:33 2019 +0100 [INETCOMM] Sync with Wine Staging 4.0. CORE-15682 --- dll/win32/inetcomm/mimeole.c | 16 ++++++++++------ dll/win32/inetcomm/smtptransport.c | 20 ++++++++++---------- media/doc/README.WINE | 2 +- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/dll/win32/inetcomm/mimeole.c b/dll/win32/inetcomm/mimeole.c index f13a4ff17a..47061490bd 100644 --- a/dll/win32/inetcomm/mimeole.c +++ b/dll/win32/inetcomm/mimeole.c @@ -822,16 +822,21 @@ static void empty_param_list(struct list *list) } } +static void free_header(header_t *header) +{ + list_remove(&header->entry); + PropVariantClear(&header->value); + empty_param_list(&header->params); + heap_free(header); +} + static void empty_header_list(struct list *list) { header_t *header, *cursor2; LIST_FOR_EACH_ENTRY_SAFE(header, cursor2, list, header_t, entry) { - list_remove(&header->entry); - PropVariantClear(&header->value); - empty_param_list(&header->params); - HeapFree(GetProcessHeap(), 0, header); + free_header(header); } } @@ -1235,8 +1240,7 @@ static HRESULT WINAPI MimeBody_DeleteProp( if(found) { - list_remove(&cursor->entry); - HeapFree(GetProcessHeap(), 0, cursor); + free_header(cursor); return S_OK; } } diff --git a/dll/win32/inetcomm/smtptransport.c b/dll/win32/inetcomm/smtptransport.c index af11308258..d71061ed6b 100644 --- a/dll/win32/inetcomm/smtptransport.c +++ b/dll/win32/inetcomm/smtptransport.c @@ -281,7 +281,7 @@ static void SMTPTransport_CallbackSendHello(IInternetTransport *iface, char *pBu HRESULT hr; const char *pszHello; char *pszCommand; - const char szHostName[] = "localhost"; /* FIXME */ + static const char szHostName[] = "localhost"; /* FIXME */ TRACE("\n"); @@ -483,7 +483,7 @@ static void SMTPTransport_CallbackMessageSendTo(IInternetTransport *iface, char if ((This->pending_message.rAddressList.prgAddress[This->ulCurrentAddressIndex].addrtype & ADDR_TOFROM_MASK) == ADDR_TO) { - const char szCommandFormat[] = "RCPT TO: <%s>\n"; + static const char szCommandFormat[] = "RCPT TO: <%s>\n"; char *szCommand; int len = sizeof(szCommandFormat) - 2 /* "%s" */ + strlen(This->pending_message.rAddressList.prgAddress[This->ulCurrentAddressIndex].szEmail); @@ -659,10 +659,10 @@ static HRESULT WINAPI SMTPTransport_InitNew(ISMTPTransport2 *iface, static HRESULT WINAPI SMTPTransport_SendMessage(ISMTPTransport2 *iface, LPSMTPMESSAGE pMessage) { + static const char szCommandFormat[] = "MAIL FROM: <%s>\n"; SMTPTransport *This = (SMTPTransport *)iface; ULONG i, size; LPSTR pszFromAddress = NULL; - const char szCommandFormat[] = "MAIL FROM: <%s>\n"; char *szCommand; int len; HRESULT hr; @@ -723,8 +723,8 @@ static HRESULT WINAPI SMTPTransport_SendMessage(ISMTPTransport2 *iface, static HRESULT WINAPI SMTPTransport_CommandMAIL(ISMTPTransport2 *iface, LPSTR pszEmailFrom) { + static const char szCommandFormat[] = "MAIL FROM: <%s>\n"; SMTPTransport *This = (SMTPTransport *)iface; - const char szCommandFormat[] = "MAIL FROM: <%s>\n"; char *szCommand; int len; HRESULT hr; @@ -750,8 +750,8 @@ static HRESULT WINAPI SMTPTransport_CommandMAIL(ISMTPTransport2 *iface, LPSTR ps static HRESULT WINAPI SMTPTransport_CommandRCPT(ISMTPTransport2 *iface, LPSTR pszEmailTo) { + static const char szCommandFormat[] = "RCPT TO: <%s>\n"; SMTPTransport *This = (SMTPTransport *)iface; - const char szCommandFormat[] = "RCPT TO: <%s>\n"; char *szCommand; int len; HRESULT hr; @@ -777,9 +777,9 @@ static HRESULT WINAPI SMTPTransport_CommandRCPT(ISMTPTransport2 *iface, LPSTR ps static HRESULT WINAPI SMTPTransport_CommandEHLO(ISMTPTransport2 *iface) { + static const char szCommandFormat[] = "EHLO %s\n"; + static const char szHostname[] = "localhost"; /* FIXME */ SMTPTransport *This = (SMTPTransport *)iface; - const char szCommandFormat[] = "EHLO %s\n"; - const char szHostname[] = "localhost"; /* FIXME */ char *szCommand; int len = sizeof(szCommandFormat) - 2 /* "%s" */ + sizeof(szHostname); HRESULT hr; @@ -801,9 +801,9 @@ static HRESULT WINAPI SMTPTransport_CommandEHLO(ISMTPTransport2 *iface) static HRESULT WINAPI SMTPTransport_CommandHELO(ISMTPTransport2 *iface) { + static const char szCommandFormat[] = "HELO %s\n"; + static const char szHostname[] = "localhost"; /* FIXME */ SMTPTransport *This = (SMTPTransport *)iface; - const char szCommandFormat[] = "HELO %s\n"; - const char szHostname[] = "localhost"; /* FIXME */ char *szCommand; int len = sizeof(szCommandFormat) - 2 /* "%s" */ + sizeof(szHostname); HRESULT hr; @@ -826,8 +826,8 @@ static HRESULT WINAPI SMTPTransport_CommandHELO(ISMTPTransport2 *iface) static HRESULT WINAPI SMTPTransport_CommandAUTH(ISMTPTransport2 *iface, LPSTR pszAuthType) { + static const char szCommandFormat[] = "AUTH %s\n"; SMTPTransport *This = (SMTPTransport *)iface; - const char szCommandFormat[] = "AUTH %s\n"; char *szCommand; int len; HRESULT hr; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 5d821d721b..7439319218 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -78,7 +78,7 @@ reactos/dll/win32/ieframe # Synced to WineStaging-4.0 reactos/dll/win32/imaadp32.acm # Synced to WineStaging-4.0 reactos/dll/win32/imagehlp # Synced to WineStaging-3.3 reactos/dll/win32/imm32 # Synced to WineStaging-4.0 -reactos/dll/win32/inetcomm # Synced to WineStaging-3.17 +reactos/dll/win32/inetcomm # Synced to WineStaging-4.0 reactos/dll/win32/inetmib1 # Synced to WineStaging-3.17 reactos/dll/win32/initpki # Synced to WineStaging-3.3 reactos/dll/win32/inseng # Synced to WineStaging-3.3
6 years
1
0
0
0
[reactos] 01/01: [IMM32] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c0deab6d9dd2fe96c61bb…
commit c0deab6d9dd2fe96c61bb2600c4ed22ecba1547d Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 26 13:10:01 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 26 13:10:01 2019 +0100 [IMM32] Sync with Wine Staging 4.0. CORE-15682 --- dll/win32/imm32/imm.c | 9 ++++++--- media/doc/README.WINE | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index 28eb00f355..4255e98078 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -608,9 +608,12 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC) if (!hIMC) return old; - SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, FALSE, ISC_SHOWUIALL); - data->IMC.hWnd = hWnd; - SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, TRUE, ISC_SHOWUIALL); + if(GetActiveWindow() == data->IMC.hWnd) + { + SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, FALSE, ISC_SHOWUIALL); + data->IMC.hWnd = hWnd; + SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, TRUE, ISC_SHOWUIALL); + } return old; } diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 884392fa06..5d821d721b 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -77,7 +77,7 @@ reactos/dll/win32/iccvid # Synced to WineStaging-4.0 reactos/dll/win32/ieframe # Synced to WineStaging-4.0 reactos/dll/win32/imaadp32.acm # Synced to WineStaging-4.0 reactos/dll/win32/imagehlp # Synced to WineStaging-3.3 -reactos/dll/win32/imm32 # Synced to WineStaging-3.17 +reactos/dll/win32/imm32 # Synced to WineStaging-4.0 reactos/dll/win32/inetcomm # Synced to WineStaging-3.17 reactos/dll/win32/inetmib1 # Synced to WineStaging-3.17 reactos/dll/win32/initpki # Synced to WineStaging-3.3
6 years
1
0
0
0
[reactos] 01/01: [IMAADP32.ACM] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2653fad683063012beb73…
commit 2653fad683063012beb73be4faaf99e31a8ff22d Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 26 13:09:32 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 26 13:09:32 2019 +0100 [IMAADP32.ACM] Sync with Wine Staging 4.0. CORE-15682 --- dll/win32/imaadp32.acm/imaadp32.c | 8 ++++---- media/doc/README.WINE | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dll/win32/imaadp32.acm/imaadp32.c b/dll/win32/imaadp32.acm/imaadp32.c index 9518adc345..a93b5f6af7 100644 --- a/dll/win32/imaadp32.acm/imaadp32.c +++ b/dll/win32/imaadp32.acm/imaadp32.c @@ -530,13 +530,13 @@ static LRESULT ADPCM_DriverDetails(PACMDRIVERDETAILSW add) add->cFilterTags = 0; add->hicon = NULL; MultiByteToWideChar( CP_ACP, 0, "Microsoft IMA ADPCM", -1, - add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) ); + add->szShortName, ARRAY_SIZE(add->szShortName) ); MultiByteToWideChar( CP_ACP, 0, "Microsoft IMA ADPCM CODEC", -1, - add->szLongName, sizeof(add->szLongName)/sizeof(WCHAR) ); + add->szLongName, ARRAY_SIZE(add->szLongName) ); MultiByteToWideChar( CP_ACP, 0, "Brought to you by the Wine team...", -1, - add->szCopyright, sizeof(add->szCopyright)/sizeof(WCHAR) ); + add->szCopyright, ARRAY_SIZE(add->szCopyright) ); MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1, - add->szLicensing, sizeof(add->szLicensing)/sizeof(WCHAR) ); + add->szLicensing, ARRAY_SIZE(add->szLicensing) ); add->szFeatures[0] = 0; return MMSYSERR_NOERROR; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 134e3b16f0..884392fa06 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -75,7 +75,7 @@ reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9 reactos/dll/win32/httpapi # Synced to WineStaging-3.3 reactos/dll/win32/iccvid # Synced to WineStaging-4.0 reactos/dll/win32/ieframe # Synced to WineStaging-4.0 -reactos/dll/win32/imaadp32.acm # Synced to WineStaging-3.17 +reactos/dll/win32/imaadp32.acm # Synced to WineStaging-4.0 reactos/dll/win32/imagehlp # Synced to WineStaging-3.3 reactos/dll/win32/imm32 # Synced to WineStaging-3.17 reactos/dll/win32/inetcomm # Synced to WineStaging-3.17
6 years
1
0
0
0
[reactos] 01/01: [IEFRAME] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ec33091a1d4eb1649067a…
commit ec33091a1d4eb1649067ab74f152e8c21680d6f0 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 26 13:08:54 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 26 13:08:54 2019 +0100 [IEFRAME] Sync with Wine Staging 4.0. CORE-15682 --- dll/win32/ieframe/iexplore.c | 22 +++++++++++----------- dll/win32/ieframe/intshcut.c | 24 ++++++++++++------------ media/doc/README.WINE | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/dll/win32/ieframe/iexplore.c b/dll/win32/ieframe/iexplore.c index 477d58fce6..1a444b8406 100644 --- a/dll/win32/ieframe/iexplore.c +++ b/dll/win32/ieframe/iexplore.c @@ -170,8 +170,8 @@ static void add_fav_to_menu(HMENU favmenu, HMENU menu, LPWSTR title, LPCWSTR url static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) { + static const WCHAR search[] = {'*',0}; WCHAR path[MAX_PATH*2]; - const WCHAR search[] = {'*',0}; WCHAR* filename; HANDLE findhandle; WIN32_FIND_DATAW finddata; @@ -202,9 +202,9 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) if(finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + static const WCHAR ignore1[] = {'.','.',0}; + static const WCHAR ignore2[] = {'.',0}; MENUITEMINFOW item; - const WCHAR ignore1[] = {'.','.',0}; - const WCHAR ignore2[] = {'.',0}; if(!lstrcmpW(filename, ignore1) || !lstrcmpW(filename, ignore2)) continue; @@ -217,9 +217,9 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) add_favs_to_menu(favmenu, item.hSubMenu, path); } else { + static const WCHAR urlext[] = {'.','u','r','l',0}; WCHAR* fileext; WCHAR* url = NULL; - const WCHAR urlext[] = {'.','u','r','l',0}; if(lstrcmpiW(PathFindExtensionW(filename), urlext)) continue; @@ -250,18 +250,18 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) static void add_tbs_to_menu(HMENU menu) { + static const WCHAR toolbar_key[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'I','n','t','e','r','n','e','t',' ', + 'E','x','p','l','o','r','e','r','\\', + 'T','o','o','l','b','a','r',0}; HUSKEY toolbar_handle; - WCHAR toolbar_key[] = {'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'I','n','t','e','r','n','e','t',' ', - 'E','x','p','l','o','r','e','r','\\', - 'T','o','o','l','b','a','r',0}; if(SHRegOpenUSKeyW(toolbar_key, KEY_READ, NULL, &toolbar_handle, TRUE) == ERROR_SUCCESS) { + static const WCHAR classes_key[] = {'S','o','f','t','w','a','r','e','\\', + 'C','l','a','s','s','e','s','\\','C','L','S','I','D',0}; HUSKEY classes_handle; - WCHAR classes_key[] = {'S','o','f','t','w','a','r','e','\\', - 'C','l','a','s','s','e','s','\\','C','L','S','I','D',0}; WCHAR guid[39]; DWORD value_len = ARRAY_SIZE(guid); int i; diff --git a/dll/win32/ieframe/intshcut.c b/dll/win32/ieframe/intshcut.c index 4331bb9b0a..8bf8ae8702 100644 --- a/dll/win32/ieframe/intshcut.c +++ b/dll/win32/ieframe/intshcut.c @@ -456,11 +456,11 @@ static HRESULT get_profile_string(LPCWSTR lpAppName, LPCWSTR lpKeyName, static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileName, DWORD dwMode) { + static const WCHAR str_header[] = {'I','n','t','e','r','n','e','t','S','h','o','r','t','c','u','t',0}; + static const WCHAR str_URL[] = {'U','R','L',0}; + static const WCHAR str_iconfile[] = {'i','c','o','n','f','i','l','e',0}; + static const WCHAR str_iconindex[] = {'i','c','o','n','i','n','d','e','x',0}; InternetShortcut *This = impl_from_IPersistFile(pFile); - static WCHAR str_header[] = {'I','n','t','e','r','n','e','t','S','h','o','r','t','c','u','t',0}; - static WCHAR str_URL[] = {'U','R','L',0}; - static WCHAR str_iconfile[] = {'i','c','o','n','f','i','l','e',0}; - static WCHAR str_iconindex[] = {'i','c','o','n','i','n','d','e','x',0}; WCHAR *filename = NULL; WCHAR *url; HRESULT hr; @@ -573,12 +573,12 @@ static HRESULT WINAPI PersistFile_Save(IPersistFile *pFile, LPCOLESTR pszFileNam file = CreateFileW(pszFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (file != INVALID_HANDLE_VALUE) { + static const char str_header[] = "[InternetShortcut]"; + static const char str_URL[] = "URL="; + static const char str_ICONFILE[] = "ICONFILE="; + static const char str_eol[] = "\r\n"; DWORD bytesWritten; char *iconfile; - char str_header[] = "[InternetShortcut]"; - char str_URL[] = "URL="; - char str_ICONFILE[] = "ICONFILE="; - char str_eol[] = "\r\n"; IPropertyStorage *pPropStgRead; PROPSPEC ps[2]; PROPVARIANT pvread[2]; @@ -587,11 +587,11 @@ static HRESULT WINAPI PersistFile_Save(IPersistFile *pFile, LPCOLESTR pszFileNam ps[1].ulKind = PRSPEC_PROPID; ps[1].u.propid = PID_IS_ICONINDEX; - WriteFile(file, str_header, lstrlenA(str_header), &bytesWritten, NULL); - WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL); - WriteFile(file, str_URL, lstrlenA(str_URL), &bytesWritten, NULL); + WriteFile(file, str_header, ARRAY_SIZE(str_header) - 1, &bytesWritten, NULL); + WriteFile(file, str_eol, ARRAY_SIZE(str_eol) - 1, &bytesWritten, NULL); + WriteFile(file, str_URL, ARRAY_SIZE(str_URL) - 1, &bytesWritten, NULL); WriteFile(file, url, lstrlenA(url), &bytesWritten, NULL); - WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL); + WriteFile(file, str_eol, ARRAY_SIZE(str_eol) - 1, &bytesWritten, NULL); hr = IPropertySetStorage_Open(This->property_set_storage, &FMTID_Intshcut, STGM_READ|STGM_SHARE_EXCLUSIVE, &pPropStgRead); if (SUCCEEDED(hr)) diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 1a8529a124..134e3b16f0 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -74,7 +74,7 @@ reactos/dll/win32/hlink # Synced to WineStaging-4.0 reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9 reactos/dll/win32/httpapi # Synced to WineStaging-3.3 reactos/dll/win32/iccvid # Synced to WineStaging-4.0 -reactos/dll/win32/ieframe # Synced to WineStaging-3.17 +reactos/dll/win32/ieframe # Synced to WineStaging-4.0 reactos/dll/win32/imaadp32.acm # Synced to WineStaging-3.17 reactos/dll/win32/imagehlp # Synced to WineStaging-3.3 reactos/dll/win32/imm32 # Synced to WineStaging-3.17
6 years
1
0
0
0
[reactos] 01/01: [IMAGEHLP_WINETEST] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d03e237837924b33112f3…
commit d03e237837924b33112f3d6b514bb2b42498d958 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 26 13:08:26 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 26 13:08:26 2019 +0100 [IMAGEHLP_WINETEST] Sync with Wine Staging 4.0. CORE-15682 --- modules/rostests/winetests/imagehlp/image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rostests/winetests/imagehlp/image.c b/modules/rostests/winetests/imagehlp/image.c index 0d6521b45b..9fb1032356 100644 --- a/modules/rostests/winetests/imagehlp/image.c +++ b/modules/rostests/winetests/imagehlp/image.c @@ -229,7 +229,7 @@ static const struct expected_blob b1[] = { {FILE_TOTAL-FILE_IDATA-FIELD_OFFSET(struct Imports, ibn), &bin.idata_section.ibn} }; -static const struct expected_update_accum a1 = { sizeof(b1) / sizeof(b1[0]), b1, TRUE }; +static const struct expected_update_accum a1 = { ARRAY_SIZE(b1), b1, TRUE }; static const struct expected_blob b2[] = { {FILE_PE_START, &bin}, @@ -239,7 +239,7 @@ static const struct expected_blob b2[] = { {FILE_IDATA-FILE_TEXT, &bin.text_section}, {FILE_TOTAL-FILE_IDATA, &bin.idata_section} }; -static const struct expected_update_accum a2 = { sizeof(b2) / sizeof(b2[0]), b2, FALSE }; +static const struct expected_update_accum a2 = { ARRAY_SIZE(b2), b2, FALSE }; /* Creates a test file and returns a handle to it. The file's path is returned * in temp_file, which must be at least MAX_PATH characters in length.
6 years
1
0
0
0
[reactos] 01/01: [ICCVID] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bd88475d94abf96582ba1…
commit bd88475d94abf96582ba1b4671a6a9c62f00d6e0 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 26 13:07:54 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 26 13:07:54 2019 +0100 [ICCVID] Sync with Wine Staging 4.0. CORE-15682 --- dll/win32/iccvid/iccvid.c | 4 ++-- media/doc/README.WINE | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dll/win32/iccvid/iccvid.c b/dll/win32/iccvid/iccvid.c index 3977d95a41..67967a0fb3 100644 --- a/dll/win32/iccvid/iccvid.c +++ b/dll/win32/iccvid/iccvid.c @@ -957,8 +957,8 @@ static LRESULT ICCVID_GetInfo( ICCVID_Info *info, ICINFO *icinfo, DWORD dwSize ) icinfo->dwVersion = ICVERSION; icinfo->dwVersionICM = ICVERSION; - LoadStringW(ICCVID_hModule, IDS_NAME, icinfo->szName, sizeof(icinfo->szName)/sizeof(WCHAR)); - LoadStringW(ICCVID_hModule, IDS_DESCRIPTION, icinfo->szDescription, sizeof(icinfo->szDescription)/sizeof(WCHAR)); + LoadStringW(ICCVID_hModule, IDS_NAME, icinfo->szName, ARRAY_SIZE(icinfo->szName)); + LoadStringW(ICCVID_hModule, IDS_DESCRIPTION, icinfo->szDescription, ARRAY_SIZE(icinfo->szDescription)); /* msvfw32 will fill icinfo->szDriver for us */ return sizeof(ICINFO); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 4a8f272ad9..1a8529a124 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -73,7 +73,7 @@ reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-4.0 reactos/dll/win32/hlink # Synced to WineStaging-4.0 reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9 reactos/dll/win32/httpapi # Synced to WineStaging-3.3 -reactos/dll/win32/iccvid # Synced to WineStaging-3.3 +reactos/dll/win32/iccvid # Synced to WineStaging-4.0 reactos/dll/win32/ieframe # Synced to WineStaging-3.17 reactos/dll/win32/imaadp32.acm # Synced to WineStaging-3.17 reactos/dll/win32/imagehlp # Synced to WineStaging-3.3
6 years
1
0
0
0
[reactos] 01/01: [HLINK_WINETEST] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=99138ae93e6408ec5f5a7…
commit 99138ae93e6408ec5f5a7f09476cef809618c4bf Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 26 13:07:24 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 26 13:07:24 2019 +0100 [HLINK_WINETEST] Sync with Wine Staging 4.0. CORE-15682 --- modules/rostests/winetests/hlink/hlink.c | 257 ++++++++++++++++++++++++++++--- 1 file changed, 236 insertions(+), 21 deletions(-) diff --git a/modules/rostests/winetests/hlink/hlink.c b/modules/rostests/winetests/hlink/hlink.c index 265dea3f45..ccbbd889d5 100644 --- a/modules/rostests/winetests/hlink/hlink.c +++ b/modules/rostests/winetests/hlink/hlink.c @@ -81,9 +81,16 @@ DEFINE_EXPECT(HT_GetFriendlyName); DEFINE_EXPECT(HLF_UpdateHlink); +DEFINE_EXPECT(BindStatusCallback_GetBindInfo); +DEFINE_EXPECT(BindStatusCallback_OnObjectAvailable); +DEFINE_EXPECT(BindStatusCallback_OnStartBinding); +DEFINE_EXPECT(BindStatusCallback_OnStopBinding); + DEFINE_GUID(CLSID_IdentityUnmarshal,0x0000001b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(IID_IHlinkHistory,0x79eac9c8,0xbaf9,0x11ce,0x8c,0x82,0x00,0xaa,0x00,0x4b,0xa9,0x0b); +static IHlinkTarget HlinkTarget; + static const WCHAR winehq_urlW[] = {'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g', '/','t','e','s','t','s','/','h','e','l','l','o','.','h','t','m','l',0}; @@ -120,7 +127,7 @@ static void test_HlinkIsShortcut(void) {NULL, E_INVALIDARG} }; - for(i=0; i<sizeof(shortcut_test)/sizeof(shortcut_test[0]); i++) { + for (i=0; i < ARRAY_SIZE(shortcut_test); i++) { hres = HlinkIsShortcut(shortcut_test[i].file); ok(hres == shortcut_test[i].hres, "[%d] HlinkIsShortcut returned %08x, expected %08x\n", i, hres, shortcut_test[i].hres); @@ -651,7 +658,7 @@ static void test_HlinkParseDisplayName(void) hres = HlinkParseDisplayName(bctx, winehq_urlW, FALSE, &eaten, &mon); ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres); - ok(eaten == sizeof(winehq_urlW)/sizeof(WCHAR)-1, "eaten=%d\n", eaten); + ok(eaten == ARRAY_SIZE(winehq_urlW)-1, "eaten=%d\n", eaten); ok(mon != NULL, "mon == NULL\n"); hres = IMoniker_GetDisplayName(mon, bctx, 0, &name); @@ -667,7 +674,7 @@ static void test_HlinkParseDisplayName(void) hres = HlinkParseDisplayName(bctx, clsid_nameW, FALSE, &eaten, &mon); ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres); - ok(eaten == sizeof(clsid_nameW)/sizeof(WCHAR)-1, "eaten=%d\n", eaten); + ok(eaten == ARRAY_SIZE(clsid_nameW)-1, "eaten=%d\n", eaten); ok(mon != NULL, "mon == NULL\n"); hres = IMoniker_IsSystemMoniker(mon, &issys); @@ -678,7 +685,7 @@ static void test_HlinkParseDisplayName(void) hres = HlinkParseDisplayName(bctx, invalid_urlW, FALSE, &eaten, &mon); ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres); - ok(eaten == sizeof(invalid_urlW)/sizeof(WCHAR)-1, "eaten=%d\n", eaten); + ok(eaten == ARRAY_SIZE(invalid_urlW)-1, "eaten=%d\n", eaten); ok(mon != NULL, "mon == NULL\n"); hres = IMoniker_GetDisplayName(mon, bctx, 0, &name); @@ -694,7 +701,7 @@ static void test_HlinkParseDisplayName(void) hres = HlinkParseDisplayName(bctx, file_urlW, FALSE, &eaten, &mon); ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres); - ok(eaten == sizeof(file_urlW)/sizeof(WCHAR)-1, "eaten=%d\n", eaten); + ok(eaten == ARRAY_SIZE(file_urlW)-1, "eaten=%d\n", eaten); ok(mon != NULL, "mon == NULL\n"); hres = IMoniker_GetDisplayName(mon, bctx, 0, &name); @@ -757,21 +764,25 @@ static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallback *ifa return E_NOINTERFACE; } +static LONG bind_callback_refs = 1; + static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallback *iface) { - return 2; + return ++bind_callback_refs; } static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface) { - return 1; + return --bind_callback_refs; } -static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *iface, DWORD dwReserved, - IBinding *pib) +static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *iface, + DWORD reserved, IBinding *binding) { - ok(0, "unexpected call\n"); - return E_NOTIMPL; + CHECK_EXPECT(BindStatusCallback_OnStartBinding); + + ok(!binding, "binding = %p\n", binding); + return S_OK; } static HRESULT WINAPI BindStatusCallback_GetPriority(IBindStatusCallback *iface, LONG *pnPriority) @@ -793,15 +804,20 @@ static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface, return E_NOTIMPL; } -static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError) +static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hr, const WCHAR *error) { - ok(0, "unexpected call\n"); - return E_NOTIMPL; + CHECK_EXPECT(BindStatusCallback_OnStopBinding); + + ok(hr == S_OK, "got hr %#x\n", hr); + ok(!error, "got error %s\n", wine_dbgstr_w(error)); + + return 0xdeadbeef; } -static HRESULT WINAPI BindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) +static HRESULT WINAPI BindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *bind_flags, BINDINFO *bind_info) { - ok(0, "unexpected call\n"); + CHECK_EXPECT(BindStatusCallback_GetBindInfo); + return E_NOTIMPL; } @@ -812,10 +828,14 @@ static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallback *if return E_NOTIMPL; } -static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk) +static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallback *iface, REFIID iid, IUnknown *out) { - ok(0, "unexpected call\n"); - return E_NOTIMPL; + CHECK_EXPECT(BindStatusCallback_OnObjectAvailable); + + ok(IsEqualGUID(iid, &IID_IUnknown), "iid = %s\n", wine_dbgstr_guid(iid)); + ok(out == (IUnknown *)&HlinkTarget, "out = %p\n", out); + + return 0xdeadbeef; } static IBindStatusCallbackVtbl BindStatusCallbackVtbl = { @@ -853,14 +873,16 @@ static HRESULT WINAPI HlinkBrowseContext_QueryInterface( return E_NOINTERFACE; } +static LONG browse_ctx_refs = 1; + static ULONG WINAPI HlinkBrowseContext_AddRef(IHlinkBrowseContext *iface) { - return 2; + return ++browse_ctx_refs; } static ULONG WINAPI HlinkBrowseContext_Release(IHlinkBrowseContext *iface) { - return 1; + return --browse_ctx_refs; } static HRESULT WINAPI HlinkBrowseContext_Register(IHlinkBrowseContext *iface, @@ -1125,9 +1147,16 @@ static HRESULT WINAPI Moniker_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSiz return E_NOTIMPL; } +static BOOL async_bind; +static IBindStatusCallback *async_bind_callback; + static HRESULT WINAPI Moniker_BindToObject(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, void **ppv) { + static WCHAR bscb_holderW[] = {'_','B','S','C','B','_','H','o','l','d','e','r','_',0}; + IUnknown *bind_callback_holder; + HRESULT hr; + CHECK_EXPECT(BindToObject); ok(pbc != _bctx, "pbc != _bctx\n"); @@ -1136,6 +1165,17 @@ static HRESULT WINAPI Moniker_BindToObject(IMoniker *iface, IBindCtx *pbc, IMoni ok(ppv != NULL, "ppv == NULL\n"); ok(*ppv == NULL, "*ppv = %p\n", *ppv); + if (async_bind) + { + hr = IBindCtx_GetObjectParam(pbc, bscb_holderW, &bind_callback_holder); + ok(hr == S_OK, "Failed to get IBindStatusCallback holder, hr %#x.\n", hr); + hr = IUnknown_QueryInterface(bind_callback_holder, &IID_IBindStatusCallback, + (void **)&async_bind_callback); + ok(hr == S_OK, "Failed to get IBindStatusCallback interface, hr %#x.\n", hr); + IUnknown_Release(bind_callback_holder); + return MK_S_ASYNCHRONOUS; + } + *ppv = &HlinkTarget; return S_OK; } @@ -2188,6 +2228,8 @@ static void test_StdHlink(void) static void test_Hlink_Navigate(void) { + BINDINFO bind_info = {sizeof(BINDINFO)}; + DWORD bind_flags; IHlink *hlink; IBindCtx *pbc; HRESULT hres; @@ -2301,6 +2343,179 @@ if (0) { /* these currently open a browser window on wine */ else skip("interactive IHlink_Navigate tests\n"); + /* test binding callback */ + SET_EXPECT(IsSystemMoniker); + SET_EXPECT(GetDisplayName); + SET_EXPECT(BindStatusCallback_GetBindInfo); + SET_EXPECT(HBC_GetObject); + SET_EXPECT(Reduce); + SET_EXPECT(BindToObject); + SET_EXPECT(BindStatusCallback_OnStartBinding); + SET_EXPECT(BindStatusCallback_OnObjectAvailable); + SET_EXPECT(HT_QueryInterface_IHlinkTarget); + SET_EXPECT(HT_GetBrowseContext); + SET_EXPECT(HT_SetBrowseContext); + SET_EXPECT(HBC_QueryInterface_IHlinkHistory); + SET_EXPECT(HT_Navigate); + SET_EXPECT(HT_GetFriendlyName); + SET_EXPECT(BindStatusCallback_OnStopBinding); + hres = IHlink_Navigate(hlink, 0, pbc, &BindStatusCallback, &HlinkBrowseContext); + ok(hres == S_OK, "Navigate failed: %#x\n", hres); + CHECK_CALLED(IsSystemMoniker); + CHECK_CALLED(GetDisplayName); + CHECK_CALLED(HBC_GetObject); +todo_wine + CHECK_CALLED(BindStatusCallback_GetBindInfo); +todo_wine + CHECK_CALLED(Reduce); + CHECK_CALLED(BindToObject); +todo_wine { + CHECK_CALLED(BindStatusCallback_OnStartBinding); + CHECK_CALLED(BindStatusCallback_OnObjectAvailable); +} + CHECK_CALLED(HT_QueryInterface_IHlinkTarget); +todo_wine + CHECK_CALLED(HT_GetBrowseContext); + CHECK_CALLED(HT_SetBrowseContext); +todo_wine + CHECK_CALLED(HBC_QueryInterface_IHlinkHistory); + CHECK_CALLED(HT_Navigate); +todo_wine + CHECK_CALLED(HT_GetFriendlyName); +todo_wine + CHECK_CALLED(BindStatusCallback_OnStopBinding); + + ok(bind_callback_refs == 1, "Got unexpected refcount %d.\n", bind_callback_refs); + ok(browse_ctx_refs == 1, "Got unexpected refcount %d.\n", browse_ctx_refs); + + /* test asynchronous binding */ + async_bind = TRUE; + SET_EXPECT(IsSystemMoniker); + SET_EXPECT(GetDisplayName); + SET_EXPECT(HBC_GetObject); + SET_EXPECT(Reduce); + SET_EXPECT(BindToObject); + hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext); + ok(hres == MK_S_ASYNCHRONOUS, "Navigate failed: %#x\n", hres); + CHECK_CALLED(IsSystemMoniker); + CHECK_CALLED(GetDisplayName); + CHECK_CALLED(HBC_GetObject); +todo_wine + CHECK_CALLED(Reduce); + CHECK_CALLED(BindToObject); + + ok(browse_ctx_refs > 1, "Got unexpected refcount %d.\n", browse_ctx_refs); + + hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext); + ok(hres == E_UNEXPECTED, "Got hr %#x.\n", hres); + + hres = IBindStatusCallback_GetBindInfo(async_bind_callback, &bind_flags, &bind_info); + ok(hres == S_OK, "Got hr %#x.\n", hres); + + hres = IBindStatusCallback_OnStartBinding(async_bind_callback, 0, NULL); + ok(hres == S_OK, "Got hr %#x.\n", hres); + + SET_EXPECT(HT_QueryInterface_IHlinkTarget); + SET_EXPECT(HT_GetBrowseContext); + SET_EXPECT(HT_SetBrowseContext); + SET_EXPECT(HBC_QueryInterface_IHlinkHistory); + SET_EXPECT(HT_Navigate); + SET_EXPECT(HT_GetFriendlyName); + hres = IBindStatusCallback_OnObjectAvailable(async_bind_callback, &IID_IUnknown, + (IUnknown *)&HlinkTarget); + ok(hres == S_OK, "Got hr %#x.\n", hres); + CHECK_CALLED(HT_QueryInterface_IHlinkTarget); +todo_wine + CHECK_CALLED(HT_GetBrowseContext); + CHECK_CALLED(HT_SetBrowseContext); +todo_wine + CHECK_CALLED(HBC_QueryInterface_IHlinkHistory); + CHECK_CALLED(HT_Navigate); +todo_wine + CHECK_CALLED(HT_GetFriendlyName); + + hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext); + ok(hres == E_UNEXPECTED, "Got hr %#x.\n", hres); + + ok(browse_ctx_refs > 1, "Got unexpected refcount %d.\n", browse_ctx_refs); + + hres = IBindStatusCallback_OnStopBinding(async_bind_callback, S_OK, NULL); + ok(hres == S_OK, "Got hr %#x.\n", hres); + + ok(browse_ctx_refs == 1, "Got unexpected refcount %d.\n", browse_ctx_refs); + + IBindStatusCallback_Release(async_bind_callback); + + SET_EXPECT(IsSystemMoniker); + SET_EXPECT(GetDisplayName); + SET_EXPECT(BindStatusCallback_GetBindInfo); + SET_EXPECT(HBC_GetObject); + SET_EXPECT(Reduce); + SET_EXPECT(BindToObject); + hres = IHlink_Navigate(hlink, 0, pbc, &BindStatusCallback, &HlinkBrowseContext); + ok(hres == MK_S_ASYNCHRONOUS, "Navigate failed: %#x\n", hres); + CHECK_CALLED(IsSystemMoniker); + CHECK_CALLED(GetDisplayName); +todo_wine + CHECK_CALLED(BindStatusCallback_GetBindInfo); + CHECK_CALLED(HBC_GetObject); +todo_wine + CHECK_CALLED(Reduce); + CHECK_CALLED(BindToObject); + + ok(bind_callback_refs > 1, "Got unexpected refcount %d.\n", bind_callback_refs); + ok(browse_ctx_refs > 1, "Got unexpected refcount %d.\n", browse_ctx_refs); + + hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext); + ok(hres == E_UNEXPECTED, "Got hr %#x.\n", hres); + + SET_EXPECT(BindStatusCallback_GetBindInfo); + hres = IBindStatusCallback_GetBindInfo(async_bind_callback, &bind_flags, &bind_info); + ok(hres == E_NOTIMPL, "Got hr %#x.\n", hres); + CHECK_CALLED(BindStatusCallback_GetBindInfo); + + SET_EXPECT(BindStatusCallback_OnStartBinding); + hres = IBindStatusCallback_OnStartBinding(async_bind_callback, 0, NULL); + ok(hres == S_OK, "Got hr %#x.\n", hres); + CHECK_CALLED(BindStatusCallback_OnStartBinding); + + SET_EXPECT(BindStatusCallback_OnObjectAvailable); + SET_EXPECT(HT_QueryInterface_IHlinkTarget); + SET_EXPECT(HT_GetBrowseContext); + SET_EXPECT(HT_SetBrowseContext); + SET_EXPECT(HBC_QueryInterface_IHlinkHistory); + SET_EXPECT(HT_Navigate); + SET_EXPECT(HT_GetFriendlyName); + hres = IBindStatusCallback_OnObjectAvailable(async_bind_callback, &IID_IUnknown, + (IUnknown *)&HlinkTarget); + ok(hres == S_OK, "Got hr %#x.\n", hres); + CHECK_CALLED(BindStatusCallback_OnObjectAvailable); + CHECK_CALLED(HT_QueryInterface_IHlinkTarget); +todo_wine + CHECK_CALLED(HT_GetBrowseContext); + CHECK_CALLED(HT_SetBrowseContext); +todo_wine + CHECK_CALLED(HBC_QueryInterface_IHlinkHistory); + CHECK_CALLED(HT_Navigate); +todo_wine + CHECK_CALLED(HT_GetFriendlyName); + + hres = IHlink_Navigate(hlink, 0, pbc, NULL, &HlinkBrowseContext); + ok(hres == E_UNEXPECTED, "Got hr %#x.\n", hres); + + ok(bind_callback_refs > 1, "Got unexpected refcount %d.\n", bind_callback_refs); + ok(browse_ctx_refs > 1, "Got unexpected refcount %d.\n", browse_ctx_refs); + + SET_EXPECT(BindStatusCallback_OnStopBinding); + hres = IBindStatusCallback_OnStopBinding(async_bind_callback, S_OK, NULL); + ok(hres == S_OK, "Got hr %#x.\n", hres); + CHECK_CALLED(BindStatusCallback_OnStopBinding); + + ok(bind_callback_refs == 1, "Got unexpected refcount %d.\n", bind_callback_refs); + ok(browse_ctx_refs == 1, "Got unexpected refcount %d.\n", browse_ctx_refs); + + IBindStatusCallback_Release(async_bind_callback); + IHlink_Release(hlink); IBindCtx_Release(pbc); _bctx = NULL;
6 years
1
0
0
0
[reactos] 01/01: [HLINK] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=07e4452656237a3f0dc00…
commit 07e4452656237a3f0dc0066e6e46606c461abae9 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 26 13:06:56 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 26 13:06:56 2019 +0100 [HLINK] Sync with Wine Staging 4.0. CORE-15682 --- dll/win32/hlink/hlink_main.c | 6 +- dll/win32/hlink/link.c | 209 ++++++++++++++++++++++++++++++++++++++++--- media/doc/README.WINE | 2 +- 3 files changed, 199 insertions(+), 18 deletions(-) diff --git a/dll/win32/hlink/hlink_main.c b/dll/win32/hlink/hlink_main.c index b0a20b18bb..4af5961753 100644 --- a/dll/win32/hlink/hlink_main.c +++ b/dll/win32/hlink/hlink_main.c @@ -389,9 +389,9 @@ HRESULT WINAPI HlinkParseDisplayName(LPBC pibc, LPCWSTR pwzDisplayName, BOOL fNo if(fNoForceAbs) FIXME("Unsupported fNoForceAbs\n"); - if(!strncmpiW(pwzDisplayName, file_colonW, sizeof(file_colonW)/sizeof(WCHAR))) { - pwzDisplayName += sizeof(file_colonW)/sizeof(WCHAR); - eaten += sizeof(file_colonW)/sizeof(WCHAR); + if(!strncmpiW(pwzDisplayName, file_colonW, ARRAY_SIZE(file_colonW))) { + pwzDisplayName += ARRAY_SIZE(file_colonW); + eaten += ARRAY_SIZE(file_colonW); while(*pwzDisplayName == '/') { pwzDisplayName++; diff --git a/dll/win32/hlink/link.c b/dll/win32/hlink/link.c index 25ee45d7c7..e3de7646ef 100644 --- a/dll/win32/hlink/link.c +++ b/dll/win32/hlink/link.c @@ -52,6 +52,12 @@ typedef struct IHlinkSite *Site; DWORD SiteData; BOOL absolute; + + IBindStatusCallback IBindStatusCallback_iface; + IBindStatusCallback *bind_callback; + IBindCtx *async_bind_ctx; + DWORD async_flags; + IHlinkBrowseContext *async_browse_ctx; } HlinkImpl; static inline HlinkImpl *impl_from_IHlink(IHlink *iface) @@ -472,32 +478,47 @@ static HRESULT WINAPI IHlink_fnGetMiscStatus(IHlink* iface, DWORD* pdwStatus) return E_NOTIMPL; } -static HRESULT WINAPI IHlink_fnNavigate(IHlink* iface, DWORD grfHLNF, LPBC pbc, - IBindStatusCallback *pbsc, IHlinkBrowseContext *phbc) +static HRESULT WINAPI IHlink_fnNavigate(IHlink *iface, DWORD flags, IBindCtx *user_bind_ctx, + IBindStatusCallback *bind_callback, IHlinkBrowseContext *browse_ctx) { - HlinkImpl *This = impl_from_IHlink(iface); + HlinkImpl *This = impl_from_IHlink(iface); IMoniker *mon = NULL; HRESULT r; - FIXME("Semi-Stub:(%p)->(%i %p %p %p)\n", This, grfHLNF, pbc, pbsc, phbc); + TRACE("hlink %p, flags %#x, user_bind_ctx %p, bind_callback %p, browse_ctx %p.\n", + This, flags, user_bind_ctx, bind_callback, browse_ctx); + + if (This->async_bind_ctx) + return E_UNEXPECTED; r = __GetMoniker(This, &mon, HLINKGETREF_ABSOLUTE); TRACE("Moniker %p\n", mon); if (SUCCEEDED(r)) { - IBindCtx *bcxt = NULL; + IBindCtx *bind_ctx = NULL; IUnknown *unk = NULL; IHlinkTarget *target; - if (phbc) + if (browse_ctx) { - r = IHlinkBrowseContext_GetObject(phbc, mon, TRUE, &unk); + r = IHlinkBrowseContext_GetObject(browse_ctx, mon, TRUE, &unk); if (r != S_OK) { - CreateBindCtx(0, &bcxt); - RegisterBindStatusCallback(bcxt, pbsc, NULL, 0); - r = IMoniker_BindToObject(mon, bcxt, NULL, &IID_IUnknown, (void**)&unk); + CreateBindCtx(0, &bind_ctx); + RegisterBindStatusCallback(bind_ctx, &This->IBindStatusCallback_iface, NULL, 0); + This->bind_callback = bind_callback; + r = IMoniker_BindToObject(mon, bind_ctx, NULL, &IID_IUnknown, (void**)&unk); + if (r == MK_S_ASYNCHRONOUS) + { + This->async_bind_ctx = bind_ctx; + This->async_flags = flags; + if (bind_callback) + IBindStatusCallback_AddRef(bind_callback); + IHlinkBrowseContext_AddRef(This->async_browse_ctx = browse_ctx); + IMoniker_Release(mon); + return r; + } } if (r == S_OK) { @@ -506,13 +527,13 @@ static HRESULT WINAPI IHlink_fnNavigate(IHlink* iface, DWORD grfHLNF, LPBC pbc, } if (r == S_OK) { - if (bcxt) IHlinkTarget_SetBrowseContext(target, phbc); - r = IHlinkTarget_Navigate(target, grfHLNF, This->Location); + if (bind_ctx) IHlinkTarget_SetBrowseContext(target, browse_ctx); + r = IHlinkTarget_Navigate(target, flags, This->Location); IHlinkTarget_Release(target); } - RevokeBindStatusCallback(bcxt, pbsc); - if (bcxt) IBindCtx_Release(bcxt); + RevokeBindStatusCallback(bind_ctx, &This->IBindStatusCallback_iface); + if (bind_ctx) IBindCtx_Release(bind_ctx); } else { @@ -948,6 +969,165 @@ static const IPersistStreamVtbl psvt = IPersistStream_fnGetSizeMax, }; +static HlinkImpl *impl_from_IBindStatusCallback(IBindStatusCallback *iface) +{ + return CONTAINING_RECORD(iface, HlinkImpl, IBindStatusCallback_iface); +} + +static HRESULT WINAPI bind_callback_QueryInterface(IBindStatusCallback *iface, REFIID iid, void **out) +{ + if (IsEqualGUID(iid, &IID_IUnknown) || IsEqualGUID(iid, &IID_IBindStatusCallback)) + { + IBindStatusCallback_AddRef(*out = iface); + return S_OK; + } + + WARN("No interface for %s.\n", debugstr_guid(iid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI bind_callback_AddRef(IBindStatusCallback *iface) +{ + HlinkImpl *hlink = impl_from_IBindStatusCallback(iface); + return IHlink_AddRef(&hlink->IHlink_iface); +} + +static ULONG WINAPI bind_callback_Release(IBindStatusCallback *iface) +{ + HlinkImpl *hlink = impl_from_IBindStatusCallback(iface); + return IHlink_Release(&hlink->IHlink_iface); +} + +static HRESULT WINAPI bind_callback_OnStartBinding(IBindStatusCallback *iface, + DWORD reserved, IBinding *binding) +{ + HlinkImpl *hlink = impl_from_IBindStatusCallback(iface); + + TRACE("hlink %p, reserved %#x, binding %p.\n", hlink, reserved, binding); + + if (hlink->bind_callback) + return IBindStatusCallback_OnStartBinding(hlink->bind_callback, reserved, binding); + return S_OK; +} + +static HRESULT WINAPI bind_callback_GetPriority(IBindStatusCallback *iface, LONG *priority) +{ + FIXME("iface %p, priority %p, stub!\n", iface, priority); + return E_NOTIMPL; +} + +static HRESULT WINAPI bind_callback_OnLowResource(IBindStatusCallback *iface, DWORD reserved) +{ + HlinkImpl *hlink = impl_from_IBindStatusCallback(iface); + + TRACE("hlink %p, reserved %#x.\n", hlink, reserved); + + if (hlink->bind_callback) + return IBindStatusCallback_OnLowResource(hlink->bind_callback, reserved); + return S_OK; +} + +static HRESULT WINAPI bind_callback_OnProgress(IBindStatusCallback *iface, + ULONG progress, ULONG max, ULONG status, const WCHAR *text) +{ + HlinkImpl *hlink = impl_from_IBindStatusCallback(iface); + + TRACE("hlink %p, progress %u, max %u, status %u, text %s.\n", + hlink, progress, max, status, debugstr_w(text)); + + if (hlink->bind_callback) + return IBindStatusCallback_OnProgress(hlink->bind_callback, progress, max, status, text); + return S_OK; +} + +static HRESULT WINAPI bind_callback_OnStopBinding(IBindStatusCallback *iface, + HRESULT hr, const WCHAR *error) +{ + HlinkImpl *hlink = impl_from_IBindStatusCallback(iface); + + TRACE("hlink %p, hr %#x, error %s.\n", hlink, hr, debugstr_w(error)); + + if (hlink->bind_callback) + IBindStatusCallback_OnStopBinding(hlink->bind_callback, hr, error); + + if (hlink->async_bind_ctx) + { + if (hlink->bind_callback) + IBindStatusCallback_Release(hlink->bind_callback); + RevokeBindStatusCallback(hlink->async_bind_ctx, iface); + IBindCtx_Release(hlink->async_bind_ctx); + IHlinkBrowseContext_Release(hlink->async_browse_ctx); + hlink->async_bind_ctx = NULL; + } + return S_OK; +} + +static HRESULT WINAPI bind_callback_GetBindInfo(IBindStatusCallback *iface, + DWORD *bind_flags, BINDINFO *bind_info) +{ + HlinkImpl *hlink = impl_from_IBindStatusCallback(iface); + + TRACE("hlink %p, bind_flags %p, bind_info %p.\n", hlink, bind_flags, bind_info); + + if (hlink->bind_callback) + return IBindStatusCallback_GetBindInfo(hlink->bind_callback, bind_flags, bind_info); + return S_OK; +} + +static HRESULT WINAPI bind_callback_OnDataAvailable(IBindStatusCallback *iface, + DWORD flags, DWORD size, FORMATETC *formatetc, STGMEDIUM *stgmed) +{ + FIXME("iface %p, flags %#x, size %d, formatetc %p, stgmed %p, stub!\n", + iface, flags, size, formatetc, stgmed); + return E_NOTIMPL; +} + +static HRESULT WINAPI bind_callback_OnObjectAvailable(IBindStatusCallback *iface, + REFIID iid, IUnknown *unk) +{ + HlinkImpl *hlink = impl_from_IBindStatusCallback(iface); + IHlinkTarget *target; + HRESULT hr; + + TRACE("hlink %p, iid %s, unk %p.\n", hlink, debugstr_guid(iid), unk); + + if (hlink->bind_callback) + IBindStatusCallback_OnObjectAvailable(hlink->bind_callback, iid, unk); + + if (hlink->async_bind_ctx) + { + hr = IUnknown_QueryInterface(unk, &IID_IHlinkTarget, (void **)&target); + if (FAILED(hr)) + return hr; + + IHlinkTarget_SetBrowseContext(target, hlink->async_browse_ctx); + hr = IHlinkTarget_Navigate(target, hlink->async_flags, hlink->Location); + IHlinkTarget_Release(target); + + if (hlink->Site) + IHlinkSite_OnNavigationComplete(hlink->Site, hlink->SiteData, 0, hr, NULL); + + return hr; + } + + return S_OK; +} + +static const IBindStatusCallbackVtbl bind_callback_vtbl = +{ + bind_callback_QueryInterface, + bind_callback_AddRef, + bind_callback_Release, + bind_callback_OnStartBinding, + bind_callback_GetPriority, + bind_callback_OnLowResource, + bind_callback_OnProgress, + bind_callback_OnStopBinding, + bind_callback_GetBindInfo, + bind_callback_OnDataAvailable, + bind_callback_OnObjectAvailable, +}; + HRESULT HLink_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv) { HlinkImpl * hl; @@ -966,6 +1146,7 @@ HRESULT HLink_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv) hl->IHlink_iface.lpVtbl = &hlvt; hl->IPersistStream_iface.lpVtbl = &psvt; hl->IDataObject_iface.lpVtbl = &dovt; + hl->IBindStatusCallback_iface.lpVtbl = &bind_callback_vtbl; *ppv = hl; return S_OK; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 3f33ba081b..4a8f272ad9 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -70,7 +70,7 @@ reactos/dll/win32/fontsub # Synced to WineStaging-2.9 reactos/dll/win32/fusion # Synced to WineStaging-3.17 reactos/dll/win32/gdiplus # Synced to WineStaging-4.0 reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-4.0 -reactos/dll/win32/hlink # Synced to WineStaging-3.3 +reactos/dll/win32/hlink # Synced to WineStaging-4.0 reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9 reactos/dll/win32/httpapi # Synced to WineStaging-3.3 reactos/dll/win32/iccvid # Synced to WineStaging-3.3
6 years
1
0
0
0
[reactos] 01/01: [HID_WINETEST] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=279107d5cfc671e8f69d5…
commit 279107d5cfc671e8f69d56fe7fe2dfb88de46da0 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 26 13:06:23 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 26 13:06:23 2019 +0100 [HID_WINETEST] Sync with Wine Staging 4.0. CORE-15682 --- modules/rostests/winetests/hid/device.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/rostests/winetests/hid/device.c b/modules/rostests/winetests/hid/device.c index ce9b3a5d12..f20677fb1b 100644 --- a/modules/rostests/winetests/hid/device.c +++ b/modules/rostests/winetests/hid/device.c @@ -66,7 +66,7 @@ static void run_for_each_device(device_test *test) data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data) + detail_size); data->cbSize = sizeof(*data); - info_set = SetupDiGetClassDevsW(&hid_guid, NULL, NULL, DIGCF_DEVICEINTERFACE); + info_set = SetupDiGetClassDevsW(&hid_guid, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); while (SetupDiEnumDeviceInterfaces(info_set, NULL, &hid_guid, index, &interface_data)) { index ++; @@ -74,11 +74,13 @@ static void run_for_each_device(device_test *test) if (SetupDiGetDeviceInterfaceDetailW(info_set, &interface_data, data, sizeof(*data) + detail_size, NULL, NULL)) { HANDLE file = CreateFileW(data->DevicePath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - if (file == INVALID_HANDLE_VALUE) + if (file == INVALID_HANDLE_VALUE && GetLastError() == ERROR_ACCESS_DENIED) { - trace("Failed to access device %s, likely not plugged in or access is denied.\n", wine_dbgstr_w(data->DevicePath)); + trace("Not enough permissions to read device %s.\n", wine_dbgstr_w(data->DevicePath)); continue; } + ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %u.\n", + wine_dbgstr_w(data->DevicePath), GetLastError()); test(file); @@ -108,7 +110,7 @@ static HANDLE get_device(USHORT page, USHORT usages[], UINT usage_count, DWORD a data = HeapAlloc(GetProcessHeap(), 0 , sizeof(*data) + detail_size); data->cbSize = sizeof(*data); - info_set = SetupDiGetClassDevsW(&hid_guid, NULL, NULL, DIGCF_DEVICEINTERFACE); + info_set = SetupDiGetClassDevsW(&hid_guid, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); while (SetupDiEnumDeviceInterfaces(info_set, NULL, &hid_guid, index, &interface_data)) { index ++; @@ -118,11 +120,13 @@ static HANDLE get_device(USHORT page, USHORT usages[], UINT usage_count, DWORD a PHIDP_PREPARSED_DATA ppd; HIDP_CAPS Caps; HANDLE file = CreateFileW(data->DevicePath, access, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); - if (file == INVALID_HANDLE_VALUE) + if (file == INVALID_HANDLE_VALUE && GetLastError() == ERROR_ACCESS_DENIED) { - trace("Failed to access device %s, likely not plugged in or access is denied.\n", wine_dbgstr_w(data->DevicePath)); + trace("Not enough permissions to read device %s.\n", wine_dbgstr_w(data->DevicePath)); continue; } + ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + rc = HidD_GetPreparsedData(file, &ppd); ok(rc, "Failed to get preparsed data(0x%x)\n", GetLastError()); status = HidP_GetCaps(ppd, &Caps);
6 years
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
30
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Results per page:
10
25
50
100
200