winehq.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
February
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2016
----- 2025 -----
February 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
542 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Bind load event directly to the target.
by Alexandre Julliard
02 May '16
02 May '16
Module: wine Branch: master Commit: 67cb39b270b4a6d78c43aeebd5109b8aca597b8b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=67cb39b270b4a6d78c43aeebd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 2 14:05:38 2016 +0200 mshtml: Bind load event directly to the target. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlelem.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index d5729b1..033800b 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -4267,7 +4267,16 @@ static event_target_t **HTMLElement_get_event_target_ptr(DispatchEx *dispex) static void HTMLElement_bind_event(DispatchEx *dispex, int eid) { HTMLElement *This = impl_from_DispatchEx(dispex); - This->node.doc->node.event_target.dispex.data->vtbl->bind_event(&This->node.doc->node.event_target.dispex, eid); + + static const WCHAR loadW[] = {'l','o','a','d',0}; + + switch(eid) { + case EVENTID_LOAD: + add_nsevent_listener(This->node.doc, This->node.nsnode, loadW); + return; + default: + This->node.doc->node.event_target.dispex.data->vtbl->bind_event(&This->node.doc->node.event_target.dispex, eid); + } } static const tid_t HTMLElement_iface_tids[] = {
1
0
0
0
Jacek Caban : mshtml: Ensure that bind_event is not called multiple times for the same event.
by Alexandre Julliard
02 May '16
02 May '16
Module: wine Branch: master Commit: 60538b4cd96a14eb25e78fdf6230dcc9734fbd38 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60538b4cd96a14eb25e78fdf6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 2 14:05:08 2016 +0200 mshtml: Ensure that bind_event is not called multiple times for the same event. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlevent.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 2226278..27b6c39 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1386,6 +1386,7 @@ void detach_events(HTMLDocumentNode *doc) release_nsevents(doc); } +/* Caller should ensure that it's called only once for given event in the target. */ static void bind_event(EventTarget *event_target, eventid_t eid) { if(event_target->dispex.data->vtbl->bind_event) @@ -1423,13 +1424,17 @@ static HRESULT set_event_handler_disp(EventTarget *event_target, eventid_t eid, if(!data) return E_OUTOFMEMORY; - if(!alloc_handler_vector(data, eid, 0)) - return E_OUTOFMEMORY; + if(!data->event_table[eid]) { + if(!alloc_handler_vector(data, eid, 0)) + return E_OUTOFMEMORY; + + bind_event(event_target, eid); + }else if(data->event_table[eid]->handler_prop) { + IDispatch_Release(data->event_table[eid]->handler_prop); + } data->event_table[eid]->handler_prop = disp; IDispatch_AddRef(disp); - - bind_event(event_target, eid); return S_OK; } @@ -1522,15 +1527,15 @@ HRESULT attach_event(EventTarget *event_target, BSTR name, IDispatch *disp, VARI i++; if(i == data->event_table[eid]->handler_cnt && !alloc_handler_vector(data, eid, i+1)) return E_OUTOFMEMORY; - }else if(!alloc_handler_vector(data, eid, i+1)) { + }else if(alloc_handler_vector(data, eid, i+1)) { + bind_event(event_target, eid); + }else { return E_OUTOFMEMORY; } IDispatch_AddRef(disp); data->event_table[eid]->handlers[i] = disp; - bind_event(event_target, eid); - *res = VARIANT_TRUE; return S_OK; }
1
0
0
0
Olivier F. R. Dierick : shell32/tests: Tests for broken apps that check GetLastError() after SHFileOperation().
by Alexandre Julliard
02 May '16
02 May '16
Module: wine Branch: master Commit: 07156ad007dead9b8eb535c8c76969fe6a427ea4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07156ad007dead9b8eb535c8c…
Author: Olivier F. R. Dierick <o.dierick(a)piezo-forte.be> Date: Sat Apr 23 16:04:01 2016 +0200 shell32/tests: Tests for broken apps that check GetLastError() after SHFileOperation(). Signed-off-by: Olivier F. R. Dierick <o.dierick(a)piezo-forte.be> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/shlfileop.c | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index d33ad5b..0e502fc 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -1819,6 +1819,30 @@ static void test_copy(void) ok(DeleteFileA("abcdefgh.abc"), "Expected file to exist\n"); ok(DeleteFileA("dir\\abcdefgh.abc"), "Expected file to exist\n"); ok(RemoveDirectoryA("dir"), "Expected dir to exist\n"); + + /* Check last error after a successful file operation. */ + clean_after_shfo_tests(); + init_shfo_tests(); + shfo.pFrom = "test1.txt\0"; + shfo.pTo = "testdir2\0"; + shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; + SetLastError(0xdeadbeef); + retval = SHFileOperationA(&shfo); + ok(retval == ERROR_SUCCESS, "File copy failed with %d\n", retval); + ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + + /* Check last error after a failed file operation. */ + clean_after_shfo_tests(); + init_shfo_tests(); + shfo.pFrom = "nonexistent\0"; + shfo.pTo = "testdir2\0"; + shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; + SetLastError(0xdeadbeef); + retval = SHFileOperationA(&shfo); + ok(retval != ERROR_SUCCESS, "Unexpected ERROR_SUCCESS\n"); + ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); } /* tests the FO_MOVE action */ @@ -2464,6 +2488,7 @@ static void test_unicode(void) SHFILEOPSTRUCTW shfoW; int ret; HANDLE file; + static const WCHAR UNICODE_PATH_TO[] = {'c',':','\\',0x00ae,0x00ae,'\0'}; if (!pSHFileOperationW) { @@ -2530,6 +2555,36 @@ static void test_unicode(void) ret = pSHFileOperationW(&shfoW); ok(!ret, "Directory is not removed, ErrorCode: %d\n", ret); ok(!file_existsW(UNICODE_PATH), "The directory should have been removed\n"); + + shfoW.hwnd = NULL; + shfoW.wFunc = FO_COPY; + shfoW.pFrom = UNICODE_PATH; + shfoW.pTo = UNICODE_PATH_TO; + shfoW.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; + shfoW.hNameMappings = NULL; + shfoW.lpszProgressTitle = NULL; + + /* Check last error after a successful file operation. */ + createTestFileW(UNICODE_PATH); + ok(file_existsW(UNICODE_PATH), "The file does not exist\n"); + SetLastError(0xdeadbeef); + ret = SHFileOperationW(&shfoW); + ok(ret == ERROR_SUCCESS, "File copy failed with %d\n", ret); + ok(!shfoW.fAnyOperationsAborted, "Didn't expect aborted operations\n"); + ok(GetLastError() == ERROR_SUCCESS || + broken(GetLastError() == ERROR_INVALID_HANDLE), /* WinXp, win2k3 */ + "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + + /* Check last error after a failed file operation. */ + DeleteFileW(UNICODE_PATH); + ok(!file_existsW(UNICODE_PATH), "The file should have been removed\n"); + SetLastError(0xdeadbeef); + ret = SHFileOperationW(&shfoW); + ok(ret != ERROR_SUCCESS, "Unexpected ERROR_SUCCESS\n"); + ok(!shfoW.fAnyOperationsAborted, "Didn't expect aborted operations\n"); + ok(GetLastError() == ERROR_SUCCESS || + broken(GetLastError() == ERROR_INVALID_HANDLE), /* WinXp, win2k3 */ + "Expected ERROR_SUCCESS, got %d\n", GetLastError()); } static void
1
0
0
0
Olivier F. R. Dierick : shell32: Set last error explicitly in SHFileOperation().
by Alexandre Julliard
02 May '16
02 May '16
Module: wine Branch: master Commit: 9f202b78046adbb30cb9b936e72ce3ca0c4fa1fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f202b78046adbb30cb9b936e…
Author: Olivier F. R. Dierick <o.dierick(a)piezo-forte.be> Date: Sat Apr 23 16:03:39 2016 +0200 shell32: Set last error explicitly in SHFileOperation(). Signed-off-by: Olivier F. R. Dierick <o.dierick(a)piezo-forte.be> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/shlfileop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 234a141..6f20181 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -894,7 +894,6 @@ int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp) if (ForFree) continue; retCode = ERROR_OUTOFMEMORY; nFileOp.fAnyOperationsAborted = TRUE; - SetLastError(retCode); return retCode; } } @@ -1564,6 +1563,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) if (ret == ERROR_CANCELLED) lpFileOp->fAnyOperationsAborted = TRUE; + SetLastError(ERROR_SUCCESS); return ret; }
1
0
0
0
Alexandre Julliard : inetcomm: Don't use strcasecmp on Ansi strings.
by Alexandre Julliard
02 May '16
02 May '16
Module: wine Branch: master Commit: 5719bb92bdad8c59584bd49adf60d074aa55a919 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5719bb92bdad8c59584bd49ad…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon May 2 20:01:58 2016 +0900 inetcomm: Don't use strcasecmp on Ansi strings. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/inetcomm/mimeole.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/inetcomm/mimeole.c b/dlls/inetcomm/mimeole.c index d2db23b..96eab81 100644 --- a/dlls/inetcomm/mimeole.c +++ b/dlls/inetcomm/mimeole.c @@ -214,7 +214,7 @@ static header_t *read_prop(MimeBody *body, char **ptr) for(prop = default_props; prop->name; prop++) { - if(!strcasecmp(*ptr, prop->name)) + if(!lstrcmpiA(*ptr, prop->name)) { TRACE("%s: found match with default property id %d\n", *ptr, prop->id); break; @@ -226,7 +226,7 @@ static header_t *read_prop(MimeBody *body, char **ptr) property_list_entry_t *prop_entry; LIST_FOR_EACH_ENTRY(prop_entry, &body->new_props, property_list_entry_t, entry) { - if(!strcasecmp(*ptr, prop_entry->prop.name)) + if(!lstrcmpiA(*ptr, prop_entry->prop.name)) { TRACE("%s: found match with already added new property id %d\n", *ptr, prop_entry->prop.id); prop = &prop_entry->prop; @@ -496,7 +496,7 @@ static HRESULT find_prop(MimeBody *body, const char *name, header_t **prop) LIST_FOR_EACH_ENTRY(header, &body->headers, header_t, entry) { - if(!strcasecmp(name, header->prop->name)) + if(!lstrcmpiA(name, header->prop->name)) { *prop = header; return S_OK; @@ -650,7 +650,7 @@ static HRESULT WINAPI MimeBody_GetProp( if(!pszName || !pValue) return E_INVALIDARG; - if(!strcasecmp(pszName, "att:pri-content-type")) + if(!lstrcmpiA(pszName, "att:pri-content-type")) { PropVariantClear(pValue); pValue->vt = VT_LPSTR; @@ -690,7 +690,7 @@ static HRESULT WINAPI MimeBody_SetProp( LIST_FOR_EACH_ENTRY(prop_entry, &This->new_props, property_list_entry_t, entry) { - if(!strcasecmp(pszName, prop_entry->prop.name)) + if(!lstrcmpiA(pszName, prop_entry->prop.name)) { TRACE("Found match with already added new property id %d\n", prop_entry->prop.id); prop = &prop_entry->prop; @@ -871,14 +871,14 @@ static HRESULT WINAPI MimeBody_IsContentType( { const char *pri = This->content_pri_type; if(!pri) pri = "text"; - if(strcasecmp(pri, pszPriType)) return S_FALSE; + if(lstrcmpiA(pri, pszPriType)) return S_FALSE; } if(pszSubType) { const char *sub = This->content_sub_type; if(!sub) sub = "plain"; - if(strcasecmp(sub, pszSubType)) return S_FALSE; + if(lstrcmpiA(sub, pszSubType)) return S_FALSE; } return S_OK; @@ -1764,7 +1764,7 @@ static body_t *create_sub_body(MimeMessage *msg, IStream *pStm, BODYOFFSETS *off for(i = 0; i < count; i++) { - if(!strcasecmp(param_info[i].pszName, "boundary")) + if(!lstrcmpiA(param_info[i].pszName, "boundary")) { struct list offset_list; offset_entry_t *cur, *cursor2;
1
0
0
0
Alistair Leslie-Hughes : inetcomm: Add MimeGetAddressFormatW stub.
by Alexandre Julliard
02 May '16
02 May '16
Module: wine Branch: master Commit: 27ae15ccfe9ff2a98523c14c61c48accaa5f3c0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27ae15ccfe9ff2a98523c14c6…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Apr 28 08:15:19 2016 +0000 inetcomm: Add MimeGetAddressFormatW stub. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/inetcomm/inetcomm.spec | 2 +- dlls/inetcomm/mimeole.c | 8 ++++++++ include/mimeole.idl | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/inetcomm/inetcomm.spec b/dlls/inetcomm/inetcomm.spec index 86eb9bd..bfd115c 100644 --- a/dlls/inetcomm/inetcomm.spec +++ b/dlls/inetcomm/inetcomm.spec @@ -42,7 +42,7 @@ @ stub MimeEditGetBackgroundImageUrl @ stub MimeEditIsSafeToRun @ stub MimeEditViewSource -@ stub MimeGetAddressFormatW +@ stdcall MimeGetAddressFormatW(ptr ptr long long ptr) @ stub MimeOleAlgNameFromSMimeCap @ stub MimeOleAlgStrengthFromSMimeCap @ stub MimeOleClearDirtyTree diff --git a/dlls/inetcomm/mimeole.c b/dlls/inetcomm/mimeole.c index eb6c829..d2db23b 100644 --- a/dlls/inetcomm/mimeole.c +++ b/dlls/inetcomm/mimeole.c @@ -3221,3 +3221,11 @@ HRESULT WINAPI MimeOleGetPropertySchema(IMimePropertySchema **schema) return S_OK; } + +HRESULT WINAPI MimeGetAddressFormatW(REFIID riid, void *object, DWORD addr_type, + ADDRESSFORMAT addr_format, WCHAR **address) +{ + FIXME("(%s, %p, %d, %d, %p) stub\n", debugstr_guid(riid), object, addr_type, addr_format, address); + + return E_NOTIMPL; +} diff --git a/include/mimeole.idl b/include/mimeole.idl index bc1f3ac..5990c29 100644 --- a/include/mimeole.idl +++ b/include/mimeole.idl @@ -1435,7 +1435,7 @@ cpp_quote("HRESULT WINAPI MimeEditGetBackgroundImageUrl(IUnknown*,BSTR*);") cpp_quote("HRESULT WINAPI MimeEditDocumentFromStream(IStream*,REFIID,void**);") cpp_quote("HRESULT WINAPI MimeOleGetPropertySchema(IMimePropertySchema**);") - +cpp_quote("HRESULT WINAPI MimeGetAddressFormatW(REFIID,void*,DWORD,ADDRESSFORMAT,WCHAR**);") cpp_quote("#ifdef __cplusplus") cpp_quote("}") cpp_quote("#endif")
1
0
0
0
Alistair Leslie-Hughes : inetcomm: Implement IMimeBody GetProp.
by Alexandre Julliard
02 May '16
02 May '16
Module: wine Branch: master Commit: c74a53951d99472fa8a71bc670a3e75992c93064 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c74a53951d99472fa8a71bc67…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Apr 28 08:15:07 2016 +0000 inetcomm: Implement IMimeBody GetProp. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/inetcomm/mimeole.c | 17 ++++++++++++++--- dlls/inetcomm/tests/mimeole.c | 15 ++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/dlls/inetcomm/mimeole.c b/dlls/inetcomm/mimeole.c index 86d03cf..eb6c829 100644 --- a/dlls/inetcomm/mimeole.c +++ b/dlls/inetcomm/mimeole.c @@ -642,7 +642,13 @@ static HRESULT WINAPI MimeBody_GetProp( LPPROPVARIANT pValue) { MimeBody *This = impl_from_IMimeBody(iface); - TRACE("(%p)->(%s, 0x%x, %p)\n", This, pszName, dwFlags, pValue); + header_t *header; + HRESULT hr; + + TRACE("(%p)->(%s, 0x%x, %p)\n", This, debugstr_a(pszName), dwFlags, pValue); + + if(!pszName || !pValue) + return E_INVALIDARG; if(!strcasecmp(pszName, "att:pri-content-type")) { @@ -652,8 +658,13 @@ static HRESULT WINAPI MimeBody_GetProp( return S_OK; } - FIXME("stub!\n"); - return E_FAIL; + hr = find_prop(This, pszName, &header); + if(hr == S_OK) + { + PropVariantCopy(pValue, &header->value); + } + + return hr; } static HRESULT WINAPI MimeBody_SetProp( diff --git a/dlls/inetcomm/tests/mimeole.c b/dlls/inetcomm/tests/mimeole.c index b317116..498bbb7 100644 --- a/dlls/inetcomm/tests/mimeole.c +++ b/dlls/inetcomm/tests/mimeole.c @@ -361,12 +361,21 @@ static void test_MessageSetProp(void) ok(hr == S_OK, "ret %08x\n", hr); PropVariantClear(&prop); + hr = IMimeBody_GetProp(body, NULL, 0, &prop); + ok(hr == E_INVALIDARG, "ret %08x\n", hr); + + hr = IMimeBody_GetProp(body, "Thread-Topic", 0, NULL); + ok(hr == E_INVALIDARG, "ret %08x\n", hr); + + hr = IMimeBody_GetProp(body, "Wine-Topic", 0, &prop); + ok(hr == MIME_E_NOT_FOUND, "ret %08x\n", hr); + hr = IMimeBody_GetProp(body, "Thread-Topic", 0, &prop); - todo_wine ok(hr == S_OK, "ret %08x\n", hr); + ok(hr == S_OK, "ret %08x\n", hr); if(hr == S_OK) { - todo_wine ok(prop.vt == VT_LPSTR, "type %d\n", prop.vt); - todo_wine ok(!strcmp(prop.u.pszVal, topic), "got %s\n", prop.u.pszVal); + ok(prop.vt == VT_LPSTR, "type %d\n", prop.vt); + ok(!strcmp(prop.u.pszVal, topic), "got %s\n", prop.u.pszVal); PropVariantClear(&prop); }
1
0
0
0
Alistair Leslie-Hughes : inetcomm: Implement IMimeBody SetProp.
by Alexandre Julliard
02 May '16
02 May '16
Module: wine Branch: master Commit: ed9a8a22cadb265b359db548f7c7a4b4e24fd629 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ed9a8a22cadb265b359db548f…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Apr 28 08:14:55 2016 +0000 inetcomm: Implement IMimeBody SetProp. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/inetcomm/mimeole.c | 56 +++++++++++++++++++++++++++++++++++++++++-- dlls/inetcomm/tests/mimeole.c | 43 +++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 2 deletions(-) diff --git a/dlls/inetcomm/mimeole.c b/dlls/inetcomm/mimeole.c index 7a0b5bf..86d03cf 100644 --- a/dlls/inetcomm/mimeole.c +++ b/dlls/inetcomm/mimeole.c @@ -663,8 +663,60 @@ static HRESULT WINAPI MimeBody_SetProp( LPCPROPVARIANT pValue) { MimeBody *This = impl_from_IMimeBody(iface); - FIXME("(%p)->(%s, 0x%x, %p) stub\n", This, debugstr_a(pszName), dwFlags, pValue); - return E_NOTIMPL; + header_t *header; + HRESULT hr; + + TRACE("(%p)->(%s, 0x%x, %p)\n", This, debugstr_a(pszName), dwFlags, pValue); + + if(!pszName || !pValue) + return E_INVALIDARG; + + hr = find_prop(This, pszName, &header); + if(hr != S_OK) + { + property_list_entry_t *prop_entry; + const property_t *prop = NULL; + + LIST_FOR_EACH_ENTRY(prop_entry, &This->new_props, property_list_entry_t, entry) + { + if(!strcasecmp(pszName, prop_entry->prop.name)) + { + TRACE("Found match with already added new property id %d\n", prop_entry->prop.id); + prop = &prop_entry->prop; + break; + } + } + + header = HeapAlloc(GetProcessHeap(), 0, sizeof(*header)); + if(!header) + return E_OUTOFMEMORY; + + if(!prop) + { + prop_entry = HeapAlloc(GetProcessHeap(), 0, sizeof(*prop_entry)); + if(!prop_entry) + { + HeapFree(GetProcessHeap(), 0, header); + return E_OUTOFMEMORY; + } + prop_entry->prop.name = strdupA(pszName); + prop_entry->prop.id = This->next_prop_id++; + prop_entry->prop.flags = 0; + prop_entry->prop.default_vt = pValue->vt; + list_add_tail(&This->new_props, &prop_entry->entry); + prop = &prop_entry->prop; + TRACE("Allocating new prop id %d\n", prop_entry->prop.id); + } + + header->prop = prop; + PropVariantInit(&header->value); + list_init(&header->params); + list_add_tail(&This->headers, &header->entry); + } + + PropVariantCopy(&header->value, pValue); + + return S_OK; } static HRESULT WINAPI MimeBody_AppendProp( diff --git a/dlls/inetcomm/tests/mimeole.c b/dlls/inetcomm/tests/mimeole.c index a0fc695..b317116 100644 --- a/dlls/inetcomm/tests/mimeole.c +++ b/dlls/inetcomm/tests/mimeole.c @@ -332,6 +332,48 @@ static void test_CreateMessage(void) IStream_Release(stream); } +static void test_MessageSetProp(void) +{ + static const char topic[] = "wine topic"; + HRESULT hr; + IMimeMessage *msg; + IMimeBody *body; + PROPVARIANT prop; + + hr = MimeOleCreateMessage(NULL, &msg); + ok(hr == S_OK, "ret %08x\n", hr); + + PropVariantInit(&prop); + + hr = IMimeMessage_BindToObject(msg, HBODY_ROOT, &IID_IMimeBody, (void**)&body); + ok(hr == S_OK, "ret %08x\n", hr); + + hr = IMimeBody_SetProp(body, NULL, 0, &prop); + ok(hr == E_INVALIDARG, "ret %08x\n", hr); + + hr = IMimeBody_SetProp(body, "Thread-Topic", 0, NULL); + ok(hr == E_INVALIDARG, "ret %08x\n", hr); + + prop.vt = VT_LPSTR; + prop.u.pszVal = CoTaskMemAlloc(strlen(topic)+1); + strcpy(prop.u.pszVal, topic); + hr = IMimeBody_SetProp(body, "Thread-Topic", 0, &prop); + ok(hr == S_OK, "ret %08x\n", hr); + PropVariantClear(&prop); + + hr = IMimeBody_GetProp(body, "Thread-Topic", 0, &prop); + todo_wine ok(hr == S_OK, "ret %08x\n", hr); + if(hr == S_OK) + { + todo_wine ok(prop.vt == VT_LPSTR, "type %d\n", prop.vt); + todo_wine ok(!strcmp(prop.u.pszVal, topic), "got %s\n", prop.u.pszVal); + PropVariantClear(&prop); + } + + IMimeBody_Release(body); + IMimeMessage_Release(msg); +} + static void test_MessageOptions(void) { static const char string[] = "XXXXX"; @@ -434,6 +476,7 @@ START_TEST(mimeole) test_CreateBody(); test_Allocator(); test_CreateMessage(); + test_MessageSetProp(); test_MessageOptions(); test_BindToObject(); test_MimeOleGetPropertySchema();
1
0
0
0
Jacek Caban : user32/tests: Added PrivateExtractIcons test.
by Alexandre Julliard
02 May '16
02 May '16
Module: wine Branch: master Commit: 912d7474c00f911ca4682d6273ce3ce213c156e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=912d7474c00f911ca4682d627…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 29 21:00:42 2016 +0200 user32/tests: Added PrivateExtractIcons test. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/cursoricon.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index 90e0d84..5138c56 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -2517,6 +2517,25 @@ static void test_DestroyCursor(void) ok(cursor2 != cursor, "cursor == %p, cursor2 == %p\n", cursor, cursor2); } +static void test_PrivateExtractIcons(void) +{ + HICON icon; + UINT ret; + + static const test_icon_entries_t icon_desc[] = {{0,0,TRUE}, {16,16,TRUE}, {32,32}, {64,64,TRUE}}; + + create_ico_file("extract.ico", icon_desc, sizeof(icon_desc)/sizeof(*icon_desc)); + + ret = PrivateExtractIconsA("extract.ico", 0, 32, 32, &icon, NULL, 1, 0); + ok(ret == 1, "PrivateExtractIconsA returned %u\n", ret); + ok(icon != NULL, "icon == NULL\n"); + + test_icon_info(icon, 32, 32, 32, 32); + DestroyIcon(icon); + + DeleteFileA("extract.ico"); +} + static void test_monochrome_icon(void) { HANDLE handle; @@ -2670,6 +2689,7 @@ START_TEST(cursoricon) test_SetCursor(); test_ShowCursor(); test_DestroyCursor(); + test_PrivateExtractIcons(); test_monochrome_icon(); do_parent(); test_child_process();
1
0
0
0
Jacek Caban : user32: Use proper types in ICO_GetIconDirectory.
by Alexandre Julliard
02 May '16
02 May '16
Module: wine Branch: master Commit: 03b93eeeff304fadf1b11c622777cd75bb5e7f81 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=03b93eeeff304fadf1b11c622…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 29 21:00:34 2016 +0200 user32: Use proper types in ICO_GetIconDirectory. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/cursoricon.c | 23 ----------------------- dlls/user32/exticon.c | 4 ++-- dlls/user32/user_private.h | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 25 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 4de6b28..4f93195 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -48,29 +48,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(cursor); WINE_DECLARE_DEBUG_CHANNEL(icon); WINE_DECLARE_DEBUG_CHANNEL(resource); -#include "pshpack1.h" - -typedef struct { - BYTE bWidth; - BYTE bHeight; - BYTE bColorCount; - BYTE bReserved; - WORD xHotspot; - WORD yHotspot; - DWORD dwDIBSize; - DWORD dwDIBOffset; -} CURSORICONFILEDIRENTRY; - -typedef struct -{ - WORD idReserved; - WORD idType; - WORD idCount; - CURSORICONFILEDIRENTRY idEntries[1]; -} CURSORICONFILEDIR; - -#include "poppack.h" - static HDC screen_dc; static const WCHAR DISPLAYW[] = {'D','I','S','P','L','A','Y',0}; diff --git a/dlls/user32/exticon.c b/dlls/user32/exticon.c index 0dbbef1..a428ae7 100644 --- a/dlls/user32/exticon.c +++ b/dlls/user32/exticon.c @@ -218,13 +218,13 @@ static BYTE * ICO_LoadIcon( LPBYTE peimage, LPicoICONDIRENTRY lpiIDE, ULONG *uSi */ static BYTE * ICO_GetIconDirectory( LPBYTE peimage, LPicoICONDIR* lplpiID, ULONG *uSize ) { - CURSORICONDIR * lpcid; /* icon resource in resource-dir format */ + CURSORICONFILEDIR *lpcid; /* icon resource in resource-dir format */ CURSORICONDIR * lpID; /* icon resource in resource format */ int i; TRACE("%p %p\n", peimage, lplpiID); - lpcid = (CURSORICONDIR*)peimage; + lpcid = (CURSORICONFILEDIR*)peimage; if( lpcid->idReserved || (lpcid->idType != 1) || (!lpcid->idCount) ) return 0; diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index ead7a53..e4a2ed1 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -318,6 +318,25 @@ typedef struct CURSORICONDIRENTRY idEntries[1]; } CURSORICONDIR; +typedef struct { + BYTE bWidth; + BYTE bHeight; + BYTE bColorCount; + BYTE bReserved; + WORD xHotspot; + WORD yHotspot; + DWORD dwDIBSize; + DWORD dwDIBOffset; +} CURSORICONFILEDIRENTRY; + +typedef struct +{ + WORD idReserved; + WORD idType; + WORD idCount; + CURSORICONFILEDIRENTRY idEntries[1]; +} CURSORICONFILEDIR; + #include "poppack.h" extern BOOL get_icon_size( HICON handle, SIZE *size ) DECLSPEC_HIDDEN;
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Results per page:
10
25
50
100
200