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
February 2007
----- 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
839 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Don't store moniker in nsURI.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 0da187dda839d437ff05abdc4abf0b9536ae5292 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0da187dda839d437ff05abdc4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Feb 9 20:19:13 2007 +0100 mshtml: Don't store moniker in nsURI. --- dlls/mshtml/nsembed.c | 16 +++-------- dlls/mshtml/nsio.c | 73 +++++++++++++++++++++++++++--------------------- 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index b7b32e7..31e9551 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -934,20 +934,13 @@ static nsresult NSAPI nsURIContentListen nsIWineURI_SetIsDocumentURI(wine_uri, TRUE); if(This->bscallback && This->bscallback->mon) { - LPWSTR url = NULL; + LPWSTR wine_url; HRESULT hres; - hres = IMoniker_GetDisplayName(This->bscallback->mon, NULL, 0, &url); + hres = IMoniker_GetDisplayName(This->bscallback->mon, NULL, 0, &wine_url); if(SUCCEEDED(hres)) { - IMoniker *mon = NULL; - - hres = CreateURLMoniker(NULL, url, &mon); - if(SUCCEEDED(hres)) { - nsIWineURI_SetMoniker(wine_uri, mon); - IMoniker_Release(mon); - }else { - WARN("CreateURLMoniker failed: %08x\n", hres); - } + nsIWineURI_SetWineURL(wine_uri, wine_url); + CoTaskMemFree(wine_url); }else { WARN("GetDisplayName failed: %08x\n", hres); } @@ -1511,7 +1504,6 @@ NSContainer *NSContainer_Create(HTMLDocu ERR("GetContentDOMWindow failed: %08x\n", nsres); } - return ret; } diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index af6a124..2cd226c 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -1,5 +1,5 @@ /* - * Copyright 2006 Jacek Caban for CodeWeavers + * Copyright 2006-2007 Jacek Caban for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,9 +25,11 @@ #include "windef.h" #include "winbase.h" #include "winuser.h" +#include "winreg.h" #include "ole2.h" #include "shlguid.h" #include "wininet.h" +#include "shlwapi.h" #include "wine/debug.h" #include "wine/unicode.h" @@ -59,8 +61,9 @@ typedef struct { } nsURI; #define NSURI(x) ((nsIURI*) &(x)->lpWineURIVtbl) +#define NSWINEURI(x) ((nsIWineURI*) &(x)->lpWineURIVtbl) -static nsresult create_uri(nsIURI*,NSContainer*,nsIURI**); +static nsresult create_uri(nsIURI*,NSContainer*,nsIWineURI**); static BOOL exec_shldocvw_67(HTMLDocument *doc, LPCWSTR url) { @@ -601,7 +604,9 @@ static nsresult NSAPI nsChannel_AsyncOpe nsIWineURI *wine_uri; IMoniker *mon; PRBool is_doc_uri; + LPCWSTR wine_url; nsresult nsres; + HRESULT hres; TRACE("(%p)->(%p %p)\n", This, aListener, aContext); @@ -696,11 +701,15 @@ static nsresult NSAPI nsChannel_AsyncOpe return NS_ERROR_UNEXPECTED; } - nsIWineURI_GetMoniker(wine_uri, &mon); - nsIWineURI_Release(wine_uri); + nsIWineURI_GetWineURL(wine_uri, &wine_url); + if(!wine_url) { + TRACE("wine_url == NULL\n"); + return NS_ERROR_UNEXPECTED; + } - if(!mon) { - WARN("mon == NULL\n"); + hres = CreateURLMoniker(NULL, wine_url, &mon); + if(FAILED(hres)) { + WARN("CreateURLMonikrer failed: %08x\n", hres); return NS_ERROR_UNEXPECTED; } @@ -1451,7 +1460,7 @@ static nsresult NSAPI nsURI_Clone(nsIWin return nsres; } - return create_uri(uri, This->container, _retval); + return create_uri(uri, This->container, (nsIWineURI**)_retval); } FIXME("default action not implemented\n"); @@ -1687,7 +1696,7 @@ static const nsIWineURIVtbl nsWineURIVtb nsURI_SetWineURL }; -static nsresult create_uri(nsIURI *uri, NSContainer *container, nsIURI **_retval) +static nsresult create_uri(nsIURI *uri, NSContainer *container, nsIWineURI **_retval) { nsURI *ret = mshtml_alloc(sizeof(nsURI)); @@ -1703,7 +1712,7 @@ static nsresult create_uri(nsIURI *uri, nsIWebBrowserChrome_AddRef(NSWBCHROME(container)); TRACE("retval=%p\n", ret); - *_retval = NSURI(ret); + *_retval = NSWINEURI(ret); return NS_OK; } @@ -1760,7 +1769,8 @@ static nsresult NSAPI nsIOService_NewURI NSContainer *nscontainer = NULL; nsIURI *uri = NULL; PRBool is_javascript = FALSE; - IMoniker *base_mon = NULL; + LPCWSTR base_wine_url = NULL; + nsIWineURI *base_wine_uri = NULL, *wine_uri; nsresult nsres; nsACString_GetData(aSpec, &spec, NULL); @@ -1779,7 +1789,7 @@ static nsresult NSAPI nsIOService_NewURI nsres = nsIURI_GetSpec(aBaseURI, &base_uri_str); if(NS_SUCCEEDED(nsres)) { nsACString_GetData(&base_uri_str, &base_uri, NULL); - TRACE("uri=%s\n", debugstr_a(base_uri)); + TRACE("base_uri=%s\n", debugstr_a(base_uri)); }else { ERR("GetSpec failed: %08x\n", nsres); } @@ -1804,43 +1814,42 @@ static nsresult NSAPI nsIOService_NewURI } if(aBaseURI) { - nsIWineURI *wine_uri; - - nsres = nsIURI_QueryInterface(aBaseURI, &IID_nsIWineURI, (void**)&wine_uri); + nsres = nsIURI_QueryInterface(aBaseURI, &IID_nsIWineURI, (void**)&base_wine_uri); if(NS_SUCCEEDED(nsres)) { - nsIWineURI_GetNSContainer(wine_uri, &nscontainer); - nsIWineURI_GetMoniker(wine_uri, &base_mon); - nsIWineURI_Release(wine_uri); + nsIWineURI_GetNSContainer(base_wine_uri, &nscontainer); + nsIWineURI_GetWineURL(base_wine_uri, &base_wine_url); }else { ERR("Could not get nsIWineURI: %08x\n", nsres); } } - nsres = create_uri(uri, nscontainer, _retval); + nsres = create_uri(uri, nscontainer, &wine_uri); + *_retval = (nsIURI*)wine_uri; if(nscontainer) nsIWebBrowserChrome_Release(NSWBCHROME(nscontainer)); - if(base_mon) { - LPWSTR url; - IMoniker *mon; + if(base_wine_url) { + WCHAR url[INTERNET_MAX_URL_LENGTH], rel_url[INTERNET_MAX_URL_LENGTH]; + LPCSTR speca; DWORD len; HRESULT hres; - len = MultiByteToWideChar(CP_ACP, 0, spec, -1, NULL, 0); - url = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, spec, -1, url, -1); + nsACString_GetData(aSpec, &speca, NULL); + MultiByteToWideChar(CP_ACP, 0, speca, -1, rel_url, sizeof(rel_url)/sizeof(WCHAR)); - hres = CreateURLMoniker(base_mon, url, &mon); - HeapFree(GetProcessHeap(), 0, url); - if(SUCCEEDED(hres)) { - nsIWineURI_SetMoniker((nsIWineURI*)*_retval, mon); - IMoniker_Release(mon); - }else { - WARN("CreateURLMoniker failed: %08x\n", hres); - } + hres = CoInternetCombineUrl(base_wine_url, rel_url, + URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO, + url, sizeof(url)/sizeof(WCHAR), &len, 0); + if(SUCCEEDED(hres)) + nsIWineURI_SetWineURL(wine_uri, url); + else + WARN("CoCombineUrl failed: %08x\n", hres); } + if(base_wine_uri) + nsIWineURI_Release(base_wine_uri); + return nsres; }
1
0
0
0
Jacek Caban : mshtml: Added [Set|Get]WineURL functions to nsIWineURI.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 5ea16d7856597349bf96e52fb95a7103dfaa6004 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ea16d7856597349bf96e52fb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Feb 9 20:18:20 2007 +0100 mshtml: Added [Set|Get]WineURL functions to nsIWineURI. --- dlls/mshtml/nsiface.idl | 2 ++ dlls/mshtml/nsio.c | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index fafa15d..a93c957 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -1533,4 +1533,6 @@ interface nsIWineURI : nsIURI nsresult SetMoniker(IMoniker *aMoniker); nsresult GetIsDocumentURI(PRBool *aIsDocumentURI); nsresult SetIsDocumentURI(PRBool aIsDocumentURI); + nsresult GetWineURL(LPCWSTR *aURL); + nsresult SetWineURL(LPCWSTR aURL); } diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 150d242..af6a124 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -1616,6 +1616,35 @@ static nsresult NSAPI nsURI_SetIsDocumen return NS_OK; } +static nsresult NSAPI nsURI_GetWineURL(nsIWineURI *iface, LPCWSTR *aURL) +{ + nsURI *This = NSURI_THIS(iface); + + TRACE("(%p)->(%p)\n", This, aURL); + + *aURL = This->wine_url; + return NS_OK; +} + +static nsresult NSAPI nsURI_SetWineURL(nsIWineURI *iface, LPCWSTR aURL) +{ + nsURI *This = NSURI_THIS(iface); + + TRACE("(%p)->(%s)\n", This, debugstr_w(aURL)); + + mshtml_free(This->wine_url); + + if(aURL) { + int len = strlenW(aURL)+1; + This->wine_url = mshtml_alloc(len*sizeof(WCHAR)); + memcpy(This->wine_url, aURL, len*sizeof(WCHAR)); + }else { + This->wine_url = NULL; + } + + return NS_OK; +} + #undef NSURI_THIS static const nsIWineURIVtbl nsWineURIVtbl = { @@ -1653,7 +1682,9 @@ static const nsIWineURIVtbl nsWineURIVtb nsURI_GetMoniker, nsURI_SetMoniker, nsURI_GetIsDocumentURI, - nsURI_SetIsDocumentURI + nsURI_SetIsDocumentURI, + nsURI_GetWineURL, + nsURI_SetWineURL }; static nsresult create_uri(nsIURI *uri, NSContainer *container, nsIURI **_retval)
1
0
0
0
Jacek Caban : mshtml: Store URL in unicode in nsURI.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 8beb142b94b0efad90492c1f0d57721a49424116 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8beb142b94b0efad90492c1f0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Feb 9 20:17:16 2007 +0100 mshtml: Store URL in unicode in nsURI. --- dlls/mshtml/nsio.c | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 6366ba2..150d242 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -27,6 +27,7 @@ #include "winuser.h" #include "ole2.h" #include "shlguid.h" +#include "wininet.h" #include "wine/debug.h" #include "wine/unicode.h" @@ -53,7 +54,7 @@ typedef struct { nsIURI *uri; NSContainer *container; IMoniker *mon; - LPSTR spec; + LPWSTR wine_url; PRBool is_doc_uri; } nsURI; @@ -1145,7 +1146,7 @@ static nsrefcnt NSAPI nsURI_Release(nsIW nsIURI_Release(This->uri); if(This->mon) IMoniker_Release(This->mon); - mshtml_free(This->spec); + mshtml_free(This->wine_url); mshtml_free(This); } @@ -1161,8 +1162,11 @@ static nsresult NSAPI nsURI_GetSpec(nsIW if(This->uri) return nsIURI_GetSpec(This->uri, aSpec); - if(This->spec) { - nsACString_SetData(aSpec, This->spec); + if(This->wine_url) { + char speca[INTERNET_MAX_URL_LENGTH]; + WideCharToMultiByte(CP_ACP, 0, This->wine_url, -1, speca, sizeof(speca), NULL, NULL); + nsACString_SetData(aSpec, speca); + return NS_OK; } @@ -1563,8 +1567,8 @@ static nsresult NSAPI nsURI_SetMoniker(n WARN("Moniker already set: %p\n", This->container); IMoniker_Release(This->mon); - mshtml_free(This->spec); - This->spec = NULL; + mshtml_free(This->wine_url); + This->wine_url = NULL; } if(aMoniker) { @@ -1575,12 +1579,12 @@ static nsresult NSAPI nsURI_SetMoniker(n if(SUCCEEDED(hres)) { DWORD len; - len = WideCharToMultiByte(CP_ACP, 0, url, -1, NULL, 0, NULL, NULL); - This->spec = mshtml_alloc(len*sizeof(WCHAR)); - WideCharToMultiByte(CP_ACP, 0, url, -1, This->spec, -1, NULL, NULL); + len = strlenW(url)+1; + This->wine_url = mshtml_alloc(len*sizeof(WCHAR)); + memcpy(This->wine_url, url, len*sizeof(WCHAR)); CoTaskMemFree(url); - TRACE("spec %s\n", debugstr_a(This->spec)); + TRACE("wine_url %s\n", debugstr_w(This->wine_url)); }else { ERR("GetDisplayName failed: %08x\n", hres); } @@ -1661,7 +1665,7 @@ static nsresult create_uri(nsIURI *uri, ret->uri = uri; ret->container = container; ret->mon = NULL; - ret->spec = NULL; + ret->wine_url = NULL; ret->is_doc_uri = FALSE; if(container)
1
0
0
0
Jacek Caban : shlwapi: Fix handling mk URLs.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 961627d344d81d113ba590bb67b4ae7277d090c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=961627d344d81d113ba590bb6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Feb 10 19:05:25 2007 +0100 shlwapi: Fix handling mk URLs. --- dlls/shlwapi/tests/path.c | 5 ++++- dlls/shlwapi/url.c | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletions(-) diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c index 41f9f14..c91e99f 100644 --- a/dlls/shlwapi/tests/path.c +++ b/dlls/shlwapi/tests/path.c @@ -198,7 +198,10 @@ const TEST_URL_COMBINE TEST_COMBINE[] = {"file:///C:\\dir\\file.txt", "test.txt", 0, S_OK, "file:///C:/dir/test.txt"}, {"
http://www.winehq.org/test/
", "test%20file.txt", 0, S_OK, "
http://www.winehq.org/test/test%20file.txt
"}, {"
http://www.winehq.org/test/
", "test%20file.txt", URL_FILE_USE_PATHURL, S_OK, "
http://www.winehq.org/test/test%20file.txt
"}, - {"
http://www.winehq.org%2ftest/
", "test%20file.txt", URL_FILE_USE_PATHURL, S_OK, "
http://www.winehq.org%2ftest/test%20file.txt
"} + {"
http://www.winehq.org%2ftest/
", "test%20file.txt", URL_FILE_USE_PATHURL, S_OK, "
http://www.winehq.org%2ftest/test%20file.txt
"}, + {"xxx:@MSITStore:file.chm/file.html", "dir/file", 0, S_OK, "xxx:dir/file"}, + {"mk:@MSITStore:file.chm::/file.html", "/dir/file", 0, S_OK, "mk:@MSITStore:file.chm::/dir/file"}, + {"mk:@MSITStore:file.chm::/file.html", "mk:@MSITStore:file.chm::/dir/file", 0, S_OK, "mk:@MSITStore:file.chm::/dir/file"}, }; struct { diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index 6c88e91..50e608a 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -629,6 +629,22 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBa process_case = 1; } else do { + /* mk is a special case */ + if(base.nScheme == URL_SCHEME_MK) { + static const WCHAR wsz[] = {':',':',0}; + + WCHAR *ptr = strstrW(base.pszSuffix, wsz); + if(ptr) { + int delta; + + ptr += 2; + delta = ptr-base.pszSuffix; + base.cchProtocol += delta; + base.pszSuffix += delta; + base.cchSuffix -= delta; + } + } + /* get size of location field (if it exists) */ work = (LPWSTR)base.pszSuffix; sizeloc = 0;
1
0
0
0
Jacek Caban : shlwapi: Unicodified scheme detecting code.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 557e4d308bd60c8608882e4f8b090c032408838b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=557e4d308bd60c8608882e4f8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Feb 10 16:29:31 2007 +0100 shlwapi: Unicodified scheme detecting code. --- dlls/shlwapi/url.c | 98 ++++++++++++++++++++++----------------------------- 1 files changed, 42 insertions(+), 56 deletions(-) diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index e89113f..6c88e91 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -44,31 +44,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); /* The following schemes were identified in the native version of * SHLWAPI.DLL version 5.50 */ -typedef struct { +static const struct { URL_SCHEME scheme_number; - LPCSTR scheme_name; -} SHL_2_inet_scheme; - -static const SHL_2_inet_scheme shlwapi_schemes[] = { - {URL_SCHEME_FTP, "ftp"}, - {URL_SCHEME_HTTP, "http"}, - {URL_SCHEME_GOPHER, "gopher"}, - {URL_SCHEME_MAILTO, "mailto"}, - {URL_SCHEME_NEWS, "news"}, - {URL_SCHEME_NNTP, "nntp"}, - {URL_SCHEME_TELNET, "telnet"}, - {URL_SCHEME_WAIS, "wais"}, - {URL_SCHEME_FILE, "file"}, - {URL_SCHEME_MK, "mk"}, - {URL_SCHEME_HTTPS, "https"}, - {URL_SCHEME_SHELL, "shell"}, - {URL_SCHEME_SNEWS, "snews"}, - {URL_SCHEME_LOCAL, "local"}, - {URL_SCHEME_JAVASCRIPT, "javascript"}, - {URL_SCHEME_VBSCRIPT, "vbscript"}, - {URL_SCHEME_ABOUT, "about"}, - {URL_SCHEME_RES, "res"}, - {0, 0} + WCHAR scheme_name[12]; +} shlwapi_schemes[] = { + {URL_SCHEME_FTP, {'f','t','p',0}}, + {URL_SCHEME_HTTP, {'h','t','t','p',0}}, + {URL_SCHEME_GOPHER, {'g','o','p','h','e','r',0}}, + {URL_SCHEME_MAILTO, {'m','a','i','l','t','o',0}}, + {URL_SCHEME_NEWS, {'n','e','w','s',0}}, + {URL_SCHEME_NNTP, {'n','n','t','p',0}}, + {URL_SCHEME_TELNET, {'t','e','l','n','e','t',0}}, + {URL_SCHEME_WAIS, {'w','a','i','s',0}}, + {URL_SCHEME_FILE, {'f','i','l','e',0}}, + {URL_SCHEME_MK, {'m','k',0}}, + {URL_SCHEME_HTTPS, {'h','t','t','p','s',0}}, + {URL_SCHEME_SHELL, {'s','h','e','l','l',0}}, + {URL_SCHEME_SNEWS, {'s','n','e','w','s',0}}, + {URL_SCHEME_LOCAL, {'l','o','c','a','l',0}}, + {URL_SCHEME_JAVASCRIPT, {'j','a','v','a','s','c','r','i','p','t',0}}, + {URL_SCHEME_VBSCRIPT, {'v','b','s','c','r','i','p','t',0}}, + {URL_SCHEME_ABOUT, {'a','b','o','u','t',0}}, + {URL_SCHEME_RES, {'r','e','s',0}}, }; typedef struct { @@ -119,6 +116,19 @@ static const unsigned char HashDataLooku 0x25, 0x45, 0x27, 0x75, 0x92, 0xB8, 0xA3, 0xC8, 0xDE, 0xEB, 0xF8, 0xF3, 0xDB, 0x0A, 0x98, 0x83, 0x7B, 0xE5, 0xCB, 0x4C, 0x78, 0xD1 }; +static DWORD get_scheme_code(LPCWSTR scheme, DWORD scheme_len) +{ + int i; + + for(i=0; i < sizeof(shlwapi_schemes)/sizeof(shlwapi_schemes[0]); i++) { + if(scheme_len == strlenW(shlwapi_schemes[i].scheme_name) + && !memcmp(scheme, shlwapi_schemes[i].scheme_name, scheme_len*sizeof(WCHAR))) + return shlwapi_schemes[i].scheme_number; + } + + return URL_SCHEME_UNKNOWN; +} + static BOOL URL_JustLocation(LPCWSTR str) { while(*str && (*str == L'/')) str++; @@ -147,8 +157,8 @@ static BOOL URL_JustLocation(LPCWSTR str */ HRESULT WINAPI ParseURLA(LPCSTR x, PARSEDURLA *y) { - DWORD cnt; - const SHL_2_inet_scheme *inet_pro; + WCHAR scheme[INTERNET_MAX_SCHEME_LENGTH]; + DWORD cnt, len; y->nScheme = URL_SCHEME_INVALID; if (y->cbSize != sizeof(*y)) return E_INVALIDARG; @@ -180,17 +190,10 @@ HRESULT WINAPI ParseURLA(LPCSTR x, PARSE /* found scheme, set length of remainder */ y->cchSuffix = lstrlenA(y->pszSuffix); - /* see if known scheme and return indicator number */ - y->nScheme = URL_SCHEME_UNKNOWN; - inet_pro = shlwapi_schemes; - while (inet_pro->scheme_name) { - if (!strncasecmp(inet_pro->scheme_name, y->pszProtocol, - min(y->cchProtocol, lstrlenA(inet_pro->scheme_name)))) { - y->nScheme = inet_pro->scheme_number; - break; - } - inet_pro++; - } + len = MultiByteToWideChar(CP_ACP, 0, y->pszProtocol, y->cchProtocol, + scheme, sizeof(scheme)); + y->nScheme = get_scheme_code(scheme, len); + return S_OK; } @@ -202,9 +205,6 @@ HRESULT WINAPI ParseURLA(LPCSTR x, PARSE HRESULT WINAPI ParseURLW(LPCWSTR x, PARSEDURLW *y) { DWORD cnt; - const SHL_2_inet_scheme *inet_pro; - LPSTR cmpstr; - INT len; y->nScheme = URL_SCHEME_INVALID; if (y->cbSize != sizeof(*y)) return E_INVALIDARG; @@ -235,22 +235,8 @@ HRESULT WINAPI ParseURLW(LPCWSTR x, PARS /* found scheme, set length of remainder */ y->cchSuffix = lstrlenW(y->pszSuffix); + y->nScheme = get_scheme_code(y->pszProtocol, y->cchProtocol); - /* see if known scheme and return indicator number */ - len = WideCharToMultiByte(0, 0, y->pszProtocol, y->cchProtocol, 0, 0, 0, 0); - cmpstr = HeapAlloc(GetProcessHeap(), 0, len); - WideCharToMultiByte(0, 0, y->pszProtocol, y->cchProtocol, cmpstr, len, 0, 0); - y->nScheme = URL_SCHEME_UNKNOWN; - inet_pro = shlwapi_schemes; - while (inet_pro->scheme_name) { - if (!strncasecmp(inet_pro->scheme_name, cmpstr, - min(len, lstrlenA(inet_pro->scheme_name)))) { - y->nScheme = inet_pro->scheme_number; - break; - } - inet_pro++; - } - HeapFree(GetProcessHeap(), 0, cmpstr); return S_OK; } @@ -643,7 +629,6 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBa process_case = 1; } else do { - /* get size of location field (if it exists) */ work = (LPWSTR)base.pszSuffix; sizeloc = 0; @@ -665,6 +650,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBa len = (DWORD)(work - base.pszSuffix + 1); base.cchSuffix = len; } + /* * At this point: * .pszSuffix points to location (starting with '//')
1
0
0
0
Jacek Caban : itss: Fix handling URLs without '/' in object name.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 73452e90a4e0c4f2a02df925672a2a1f7833f229 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=73452e90a4e0c4f2a02df9256…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Feb 10 16:30:42 2007 +0100 itss: Fix handling URLs without '/' in object name. --- dlls/itss/protocol.c | 9 ++++++++- dlls/itss/tests/protocol.c | 3 +++ 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/dlls/itss/protocol.c b/dlls/itss/protocol.c index 2d7cd98..fe7e3c8 100644 --- a/dlls/itss/protocol.c +++ b/dlls/itss/protocol.c @@ -180,13 +180,20 @@ static HRESULT WINAPI ITSProtocol_Start( object_name += 2; memset(&chm_object, 0, sizeof(chm_object)); res = chm_resolve_object(chm_file, object_name, &chm_object); + if(res != CHM_RESOLVE_SUCCESS && object_name[0] != '/') { + WCHAR tmp_obj_name[MAX_PATH]; + tmp_obj_name[0] = '/'; + strcpyW(tmp_obj_name+1, object_name); + res = chm_resolve_object(chm_file, tmp_obj_name, &chm_object); + } if(res != CHM_RESOLVE_SUCCESS) { WARN("Could not resolve chm object\n"); chm_close(chm_file); return report_result(pOIProtSink, STG_E_FILENOTFOUND); } - IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, object_name+1); + IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, + object_name[0] == '/' ? object_name+1 : object_name); /* FIXME: Native doesn't use FindMimeFromData */ hres = FindMimeFromData(NULL, szUrl, NULL, 0, NULL, 0, &mime, 0); diff --git a/dlls/itss/tests/protocol.c b/dlls/itss/tests/protocol.c index 70f22b9..f04f162 100644 --- a/dlls/itss/tests/protocol.c +++ b/dlls/itss/tests/protocol.c @@ -402,6 +402,8 @@ static void test_its_protocol(void) 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; static const WCHAR blank_url3[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; + static const WCHAR blank_url4[] = {'i','t','s',':', + 't','e','s','t','.','c','h','m',':',':','b','l','a','n','k','.','h','t','m','l',0}; static const WCHAR wrong_url1[] = {'i','t','s',':','t','e','s','t','.','c','h','m',':',':','/','b','l','a','n','.','h','t','m','l',0}; static const WCHAR wrong_url2[] = @@ -446,6 +448,7 @@ static void test_its_protocol(void) test_protocol_url(factory, blank_url1); test_protocol_url(factory, blank_url2); test_protocol_url(factory, blank_url3); + test_protocol_url(factory, blank_url4); } IClassFactory_Release(factory);
1
0
0
0
Duane Clark : treeview: Scrolling does not cause label being edited to lose focus.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 5bc1a8de8701ab4a0bcea1d999b2d9ec4220669c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bc1a8de8701ab4a0bcea1d99…
Author: Duane Clark <fpga(a)pacbell.net> Date: Fri Feb 9 17:45:30 2007 -0800 treeview: Scrolling does not cause label being edited to lose focus. --- dlls/comctl32/tests/treeview.c | 50 ++++++++++++++++++++++++++++++++------- dlls/comctl32/treeview.c | 11 ++++---- 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index ba14dd6..39821fb 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -29,10 +29,10 @@ #include "commctrl.h" #include "wine/test.h" - + static HWND hMainWnd; -static HWND hTree; +static HWND hTree, hEdit; static HTREEITEM hRoot, hChild; static int pos = 0; @@ -140,6 +140,37 @@ static void DoTest2(void) ok(!strcmp(sequence, "1(nR)nR23(RC)RC45(CR)CR."), "root-child select test\n"); } +static void DoFocusTest(void) +{ + TVINSERTSTRUCTA ins; + static CHAR child1[] = "Edit", + child2[] = "A really long string"; + HTREEITEM hChild1, hChild2; + + /* This test verifies that when a label is being edited, scrolling + * the treeview does not cause the label to lose focus. To test + * this, first some additional entries are added to generate + * scrollbars. + */ + ins.hParent = hRoot; + ins.hInsertAfter = hChild; + U(ins).item.mask = TVIF_TEXT; + U(ins).item.pszText = child1; + hChild1 = TreeView_InsertItem(hTree, &ins); + assert(hChild1); + ins.hInsertAfter = hChild1; + U(ins).item.mask = TVIF_TEXT; + U(ins).item.pszText = child2; + hChild2 = TreeView_InsertItem(hTree, &ins); + assert(hChild2); + + ShowWindow(hMainWnd,SW_SHOW); + SendMessageW(hTree, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hChild); + hEdit = TreeView_EditLabel(hTree, hChild); + ScrollWindowEx(hTree, -10, 0, NULL, NULL, NULL, NULL, SW_SCROLLCHILDREN); + ok(GetFocus() == hEdit, "Edit control should have focus\n"); +} + static LRESULT CALLBACK MyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { @@ -147,9 +178,9 @@ static LRESULT CALLBACK MyWndProc(HWND h case WM_CREATE: { hTree = CreateWindowExA(WS_EX_CLIENTEDGE, WC_TREEVIEWA, NULL, WS_CHILD|WS_VISIBLE| - TVS_LINESATROOT|TVS_HASLINES|TVS_HASBUTTONS, - 0, 0, 300, 50, hWnd, (HMENU)100, GetModuleHandleA(0), 0); - + TVS_LINESATROOT|TVS_HASLINES|TVS_HASBUTTONS|TVS_EDITLABELS, + 0, 0, 120, 100, hWnd, (HMENU)100, GetModuleHandleA(0), 0); + SetFocus(hTree); return 0; } @@ -211,15 +242,16 @@ START_TEST(treeview) wc.lpszClassName = "MyTestWnd"; wc.lpfnWndProc = MyWndProc; RegisterClassA(&wc); - - - hMainWnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, GetModuleHandleA(NULL), 0); + + + hMainWnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, 130, 105, NULL, NULL, GetModuleHandleA(NULL), 0); GetClientRect(hMainWnd, &rc); FillRoot(); DoTest1(); DoTest2(); + DoFocusTest(); PostMessageA(hMainWnd, WM_CLOSE, 0, 0); while(GetMessageA(&msg,0,0,0)) { diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 587a3cf..b89f2de 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -4654,9 +4654,6 @@ TREEVIEW_VScroll(TREEVIEW_INFO *infoPtr, if (!(infoPtr->uInternalStatus & TV_VSCROLL)) return 0; - if (infoPtr->hwndEdit) - SetFocus(infoPtr->hwnd); - if (!oldFirstVisible) { assert(infoPtr->root->firstChild == NULL); @@ -4727,9 +4724,6 @@ TREEVIEW_HScroll(TREEVIEW_INFO *infoPtr, if (!(infoPtr->uInternalStatus & TV_HSCROLL)) return FALSE; - if (infoPtr->hwndEdit) - SetFocus(infoPtr->hwnd); - maxWidth = infoPtr->treeWidth - infoPtr->clientWidth; /* shall never occur */ if (maxWidth <= 0) @@ -5619,6 +5613,11 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg else return 0; + case WM_NCLBUTTONDOWN: + if (infoPtr->hwndEdit) + SetFocus(infoPtr->hwnd); + goto def; + case WM_NCPAINT: if (nc_paint (infoPtr, (HRGN)wParam)) return 0;
1
0
0
0
Joris Huizer : winegcc: Sign-compare fixes.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 909425d99d2250f14a7948217750bb23ccf4e83f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=909425d99d2250f14a7948217…
Author: Joris Huizer <joris_huizer(a)yahoo.com> Date: Sat Feb 10 03:57:25 2007 -0800 winegcc: Sign-compare fixes. --- tools/winegcc/utils.c | 15 ++++++++------- tools/winegcc/utils.h | 2 +- tools/winegcc/winegcc.c | 11 ++++++----- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c index 1af91e9..c5b46a4 100644 --- a/tools/winegcc/utils.c +++ b/tools/winegcc/utils.c @@ -118,16 +118,16 @@ void strarray_add(strarray* arr, const c arr->base[arr->size++] = str; } -void strarray_del(strarray* arr, int i) +void strarray_del(strarray* arr, unsigned int i) { - if (i < 0 || i >= arr->size) error("Invalid index i=%d", i); + if (i >= arr->size) error("Invalid index i=%d", i); memmove(&arr->base[i], &arr->base[i + 1], (arr->size - i - 1) * sizeof(arr->base[0])); arr->size--; } void strarray_addall(strarray* arr, const strarray* from) { - int i; + unsigned int i; for (i = 0; i < from->size; i++) strarray_add(arr, from->base[i]); @@ -136,7 +136,7 @@ void strarray_addall(strarray* arr, cons strarray* strarray_dup(const strarray* arr) { strarray* dup = strarray_alloc(); - int i; + unsigned int i; for (i = 0; i < arr->size; i++) strarray_add(dup, arr->base[i]); @@ -160,7 +160,7 @@ strarray* strarray_fromstring(const char char* strarray_tostring(const strarray* arr, const char* sep) { char *str, *newstr; - int i; + unsigned int i; str = strmake("%s", arr->base[0]); for (i = 1; i < arr->size; i++) @@ -277,7 +277,7 @@ static file_type guess_lib_type(const ch file_type get_lib_type(strarray* path, const char* library, char** file) { - int i; + unsigned int i; for (i = 0; i < path->size; i++) { @@ -289,7 +289,8 @@ file_type get_lib_type(strarray* path, c void spawn(const strarray* prefix, const strarray* args, int ignore_errors) { - int i, status; + unsigned int i; + int status; strarray* arr = strarray_dup(args); const char** argv; char* prog = 0; diff --git a/tools/winegcc/utils.h b/tools/winegcc/utils.h index 02e995a..4c8fec3 100644 --- a/tools/winegcc/utils.h +++ b/tools/winegcc/utils.h @@ -48,7 +48,7 @@ strarray* strarray_alloc(void); strarray* strarray_dup(const strarray* arr); void strarray_free(strarray* arr); void strarray_add(strarray* arr, const char* str); -void strarray_del(strarray* arr, int i); +void strarray_del(strarray* arr, unsigned int i); void strarray_addall(strarray* arr, const strarray* from); strarray* strarray_fromstring(const char* str, const char* delim); char* strarray_tostring(const strarray* arr, const char* sep); diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index f1aa87e..f1a7bb0 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -170,7 +170,7 @@ struct options static void clean_temp_files(void) { - int i; + unsigned int i; if (keep_generated) return; @@ -239,7 +239,8 @@ static const strarray* get_translator(en static void compile(struct options* opts, const char* lang) { strarray* comp_args = strarray_alloc(); - int j, gcc_defs = 0; + unsigned int j; + int gcc_defs = 0; switch(opts->processor) { @@ -434,7 +435,7 @@ static void build(struct options* opts) const char *output_name, *spec_file, *lang; const char* winebuild = getenv("WINEBUILD"); int generate_app_loader = 1; - int j; + unsigned int j; /* NOTE: for the files array we'll use the following convention: * -axxx: xxx is an archive (.a) @@ -719,7 +720,7 @@ static int is_linker_arg(const char* arg "-static", "-static-libgcc", "-shared", "-shared-libgcc", "-symbolic", "-framework" }; - int j; + unsigned int j; switch (arg[1]) { @@ -769,7 +770,7 @@ static int is_mingw_arg(const char* arg) { "-mno-cygwin", "-mwindows", "-mconsole", "-mthreads", "-municode" }; - int j; + unsigned int j; for (j = 0; j < sizeof(mingw_switches)/sizeof(mingw_switches[0]); j++) if (strcmp(mingw_switches[j], arg) == 0) return 1;
1
0
0
0
Mike McCormack : msi: Split process_handle() into two separate functions.
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: d0e12bdef75cdfcb60ac36588035e6f87abd34e6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0e12bdef75cdfcb60ac36588…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Sat Feb 10 11:05:43 2007 +0900 msi: Split process_handle() into two separate functions. --- dlls/msi/custom.c | 98 +++++++++++++++++++++++++++------------------------- 1 files changed, 51 insertions(+), 47 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index a5751cc..fd6bae6 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -322,7 +322,7 @@ static UINT store_binary_to_temp(MSIPACK return r; } -static void file_running_action(MSIPACKAGE* package, HANDLE Handle, +static void file_running_action(MSIPACKAGE* package, HANDLE Handle, BOOL process, LPCWSTR name) { MSIRUNNINGACTION *action; @@ -367,53 +367,59 @@ static UINT custom_get_thread_return( HA } } -static UINT process_handle(MSIPACKAGE* package, UINT type, - HANDLE ThreadHandle, HANDLE ProcessHandle, - LPCWSTR Name) +static UINT wait_process_handle(MSIPACKAGE* package, UINT type, + HANDLE ProcessHandle, LPCWSTR name) { UINT rc = ERROR_SUCCESS; if (!(type & msidbCustomActionTypeAsync)) { - /* synchronous */ - TRACE("Synchronous Execution of action %s\n",debugstr_w(Name)); - if (ProcessHandle) - msi_dialog_check_messages(ProcessHandle); + TRACE("waiting for %s\n", debugstr_w(name)); + + msi_dialog_check_messages(ProcessHandle); + + if (!(type & msidbCustomActionTypeContinue)) + rc = custom_get_process_return(ProcessHandle); + + CloseHandle(ProcessHandle); + } + else + { + TRACE("%s running in background\n", debugstr_w(name)); + + if (!(type & msidbCustomActionTypeContinue)) + file_running_action(package, ProcessHandle, TRUE, name); else - msi_dialog_check_messages(ThreadHandle); + CloseHandle(ProcessHandle); + } + + return rc; +} + +static UINT wait_thread_handle(MSIPACKAGE* package, UINT type, + HANDLE ThreadHandle, LPCWSTR name) +{ + UINT rc = ERROR_SUCCESS; + + if (!(type & msidbCustomActionTypeAsync)) + { + TRACE("waiting for %s\n", debugstr_w(name)); + + msi_dialog_check_messages(ThreadHandle); if (!(type & msidbCustomActionTypeContinue)) - { - if (ProcessHandle) - rc = custom_get_process_return(ProcessHandle); - else - rc = custom_get_thread_return(ThreadHandle); - } + rc = custom_get_thread_return(ThreadHandle); CloseHandle(ThreadHandle); - if (ProcessHandle) - CloseHandle(ProcessHandle); } else { - TRACE("Asynchronous Execution of action %s\n",debugstr_w(Name)); - /* asynchronous */ + TRACE("%s running in background\n", debugstr_w(name)); + if (!(type & msidbCustomActionTypeContinue)) - { - if (ProcessHandle) - { - file_running_action(package, ProcessHandle, TRUE, Name); - CloseHandle(ThreadHandle); - } - else - file_running_action(package, ThreadHandle, FALSE, Name); - } + file_running_action(package, ThreadHandle, FALSE, name); else - { CloseHandle(ThreadHandle); - if (ProcessHandle) - CloseHandle(ProcessHandle); - } } return rc; @@ -503,7 +509,7 @@ static HANDLE do_msidbCustomActionTypeDl return CreateThread(NULL, 0, DllThread, info, 0, NULL); } -static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source, +static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source, LPCWSTR target, const INT type, LPCWSTR action) { WCHAR tmp_file[MAX_PATH]; @@ -525,12 +531,12 @@ static UINT HANDLE_CustomType1(MSIPACKAG ThreadHandle = do_msidbCustomActionTypeDll( package, tmp_file, target ); - r = process_handle(package, type, ThreadHandle, NULL, action); + r = wait_thread_handle( package, type, ThreadHandle, action ); return r; } -static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source, +static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source, LPCWSTR target, const INT type, LPCWSTR action) { WCHAR tmp_file[MAX_PATH]; @@ -578,8 +584,9 @@ static UINT HANDLE_CustomType2(MSIPACKAG ERR("Unable to execute command %s\n", debugstr_w(cmd)); return ERROR_SUCCESS; } + CloseHandle( info.hThread ); - r = process_handle(package, type, info.hThread, info.hProcess, action); + r = wait_process_handle(package, type, info.hProcess, action); return r; } @@ -601,7 +608,7 @@ static UINT HANDLE_CustomType17(MSIPACKA hThread = do_msidbCustomActionTypeDll( package, file->TargetPath, target ); - return process_handle(package, type, hThread, NULL, action); + return wait_thread_handle(package, type, hThread, action); } static UINT HANDLE_CustomType18(MSIPACKAGE *package, LPCWSTR source, @@ -615,7 +622,6 @@ static UINT HANDLE_CustomType18(MSIPACKA INT len; static const WCHAR spc[] = {' ',0}; MSIFILE *file; - UINT prc; memset(&si,0,sizeof(STARTUPINFOW)); @@ -646,7 +652,6 @@ static UINT HANDLE_CustomType18(MSIPACKA rc = CreateProcessW(NULL, cmd, NULL, NULL, FALSE, 0, NULL, c_collen, &si, &info); - if ( !rc ) { ERR("Unable to execute command %s\n", debugstr_w(cmd)); @@ -654,10 +659,9 @@ static UINT HANDLE_CustomType18(MSIPACKA return ERROR_SUCCESS; } msi_free(cmd); + CloseHandle( info.hThread ); - prc = process_handle(package, type, info.hThread, info.hProcess, action); - - return prc; + return wait_process_handle(package, type, info.hProcess, action); } static UINT HANDLE_CustomType19(MSIPACKAGE *package, LPCWSTR source, @@ -740,7 +744,9 @@ static UINT HANDLE_CustomType50(MSIPACKA } msi_free(cmd); - return process_handle(package, type, info.hThread, info.hProcess, action); + CloseHandle( info.hThread ); + + return wait_process_handle(package, type, info.hProcess, action); } static UINT HANDLE_CustomType34(MSIPACKAGE *package, LPCWSTR source, @@ -750,7 +756,6 @@ static UINT HANDLE_CustomType34(MSIPACKA STARTUPINFOW si; PROCESS_INFORMATION info; BOOL rc; - UINT prc; memset(&si,0,sizeof(STARTUPINFOW)); @@ -779,10 +784,9 @@ static UINT HANDLE_CustomType34(MSIPACKA return ERROR_SUCCESS; } msi_free(deformated); + CloseHandle( info.hThread ); - prc = process_handle(package, type, info.hThread, info.hProcess, action); - - return prc; + return wait_process_handle(package, type, info.hProcess, action); }
1
0
0
0
Mikołaj Zalewski : shell32: Allow overwriting files in SHFileOperation(FO_COPY) ( with confirmation dialogs).
by Alexandre Julliard
12 Feb '07
12 Feb '07
Module: wine Branch: master Commit: 33ee219ce3a321c8f986e1bde4d3bb32c6e10096 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33ee219ce3a321c8f986e1bde…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Fri Feb 9 17:13:25 2007 +0100 shell32: Allow overwriting files in SHFileOperation(FO_COPY) (with confirmation dialogs). --- dlls/shell32/shell32_Bg.rc | 6 ++- dlls/shell32/shell32_Cs.rc | 8 ++- dlls/shell32/shell32_De.rc | 6 ++- dlls/shell32/shell32_En.rc | 8 ++- dlls/shell32/shell32_Eo.rc | 7 ++- dlls/shell32/shell32_Es.rc | 6 ++- dlls/shell32/shell32_Fi.rc | 6 ++- dlls/shell32/shell32_Fr.rc | 6 ++- dlls/shell32/shell32_It.rc | 6 ++- dlls/shell32/shell32_Ko.rc | 6 ++- dlls/shell32/shell32_No.rc | 6 ++- dlls/shell32/shell32_Pl.rc | 6 ++- dlls/shell32/shell32_Pt.rc | 6 ++- dlls/shell32/shell32_Ru.rc | 6 ++- dlls/shell32/shell32_Tr.rc | 6 ++- dlls/shell32/shell32_Uk.rc | 6 ++- dlls/shell32/shell32_main.h | 3 +- dlls/shell32/shfldr_unixfs.c | 2 +- dlls/shell32/shlfileop.c | 128 +++++++++++++++++++++++++++++++--------- dlls/shell32/shresdef.h | 1 + dlls/shell32/tests/shlfileop.c | 55 +++++++++++++++++ 21 files changed, 241 insertions(+), 49 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=33ee219ce3a321c8f986e…
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
84
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Results per page:
10
25
50
100
200