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
August 2010
----- 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
2 participants
884 discussions
Start a n
N
ew thread
David Hedberg : shell32/tests: Add some event tests to ExplorerBrowser tests.
by Alexandre Julliard
24 Aug '10
24 Aug '10
Module: wine Branch: master Commit: b2a8de3de65a0a716414b84e9e6538fb1f55c08e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b2a8de3de65a0a716414b84e9…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Tue Aug 24 10:56:24 2010 +0200 shell32/tests: Add some event tests to ExplorerBrowser tests. --- dlls/shell32/tests/ebrowser.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/tests/ebrowser.c b/dlls/shell32/tests/ebrowser.c index 8fa8b9a..60472a4 100644 --- a/dlls/shell32/tests/ebrowser.c +++ b/dlls/shell32/tests/ebrowser.c @@ -631,6 +631,11 @@ static void test_Advise(void) ok(ebev.ref == 10, "Got %d\n", ebev.ref); + ebev.completed = 0; + ebrowser_browse_to_desktop(peb); + process_msgs(); + ok(ebev.completed == 10, "Got %d\n", ebev.completed); + /* Remove a bunch somewhere in the middle */ for(i = 4; i < 8; i++) { @@ -638,6 +643,11 @@ static void test_Advise(void) ok(hr == S_OK, "got (0x%08x)\n", hr); } + ebev.completed = 0; + ebrowser_browse_to_desktop(peb); + process_msgs(); + ok(ebev.completed == 6, "Got %d\n", ebev.completed); + if(0) { /* Using unadvise with a previously unadvised cookie results @@ -657,6 +667,11 @@ static void test_Advise(void) ok(ebev.ref == 0, "Got %d\n", ebev.ref); + ebev.completed = 0; + ebrowser_browse_to_desktop(peb); + process_msgs(); + ok(ebev.completed == 0, "Got %d\n", ebev.completed); + /* ::Destroy implies ::Unadvise. */ hr = IExplorerBrowser_Advise(peb, pebe, &cookies[0]); ok(hr == S_OK, "Got 0x%08x\n", hr);
1
0
0
0
David Hedberg : shell32/tests: Add some tests related to the shellview created by ExplorerBrowser.
by Alexandre Julliard
24 Aug '10
24 Aug '10
Module: wine Branch: master Commit: ab63bc0515d5cc4a9ee65df045c4cb64c9caafac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab63bc0515d5cc4a9ee65df04…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Tue Aug 24 10:56:23 2010 +0200 shell32/tests: Add some tests related to the shellview created by ExplorerBrowser. --- dlls/shell32/tests/ebrowser.c | 84 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 84 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/tests/ebrowser.c b/dlls/shell32/tests/ebrowser.c index d8f1677..8fa8b9a 100644 --- a/dlls/shell32/tests/ebrowser.c +++ b/dlls/shell32/tests/ebrowser.c @@ -56,6 +56,13 @@ static HRESULT ebrowser_initialize(IExplorerBrowser *peb) return IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); } +static HRESULT ebrowser_browse_to_desktop(IExplorerBrowser *peb) +{ + LPITEMIDLIST pidl_desktop; + SHGetSpecialFolderLocation (hwnd, CSIDL_DESKTOP, &pidl_desktop); + return IExplorerBrowser_BrowseToIDList(peb, pidl_desktop, 0); +} + /* Process some messages */ static void process_msgs(void) { @@ -316,6 +323,26 @@ static void test_SB_misc(void) IShellBrowser_Release(psb); IExplorerBrowser_Destroy(peb); + IExplorerBrowser_Release(peb); + + /* Browse to the desktop. */ + ebrowser_instantiate(&peb); + ebrowser_initialize(peb); + IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); + + process_msgs(); + hr = ebrowser_browse_to_desktop(peb); + ok(hr == S_OK, "got (0x%08x)\n", hr); + process_msgs(); + + /****** After Browsing *****/ + + hr = IShellBrowser_QueryActiveShellView(psb, (IShellView**)&punk); + ok(hr == S_OK, "got (0x%08x)\n", hr); + if(SUCCEEDED(hr)) IUnknown_Release(punk); + + IShellBrowser_Release(psb); + IExplorerBrowser_Destroy(peb); ref = IExplorerBrowser_Release(peb); ok(ref == 0, "Got %d\n", ref); } @@ -884,6 +911,62 @@ static void test_navigation(void) ILFree(pidl_child); } +static void test_GetCurrentView(void) +{ + IExplorerBrowser *peb; + IUnknown *punk; + HRESULT hr; + + /* GetCurrentView */ + ebrowser_instantiate(&peb); + + if(0) + { + /* Crashes under Windows 7 */ + hr = IExplorerBrowser_GetCurrentView(peb, NULL, NULL); + } + hr = IExplorerBrowser_GetCurrentView(peb, NULL, (void**)&punk); + ok(hr == E_FAIL, "Got 0x%08x\n", hr); + +#define test_gcv(iid, exp) \ + do { \ + hr = IExplorerBrowser_GetCurrentView(peb, &iid, (void**)&punk); \ + ok(hr == exp, "(%s:)Expected (0x%08x), got: (0x%08x)\n", \ + #iid ,exp, hr); \ + if(SUCCEEDED(hr)) IUnknown_Release(punk); \ + } while(0) + + test_gcv(IID_IUnknown, E_FAIL); + test_gcv(IID_IUnknown, E_FAIL); + test_gcv(IID_IShellView, E_FAIL); + test_gcv(IID_IShellView2, E_FAIL); + test_gcv(IID_IFolderView, E_FAIL); + test_gcv(IID_IPersistFolder, E_FAIL); + test_gcv(IID_IPersistFolder2, E_FAIL); + test_gcv(IID_ICommDlgBrowser, E_FAIL); + test_gcv(IID_ICommDlgBrowser2, E_FAIL); + test_gcv(IID_ICommDlgBrowser3, E_FAIL); + + ebrowser_initialize(peb); + ebrowser_browse_to_desktop(peb); + + test_gcv(IID_IUnknown, S_OK); + test_gcv(IID_IUnknown, S_OK); + test_gcv(IID_IShellView, S_OK); + test_gcv(IID_IShellView2, S_OK); + test_gcv(IID_IFolderView, S_OK); + todo_wine test_gcv(IID_IPersistFolder, S_OK); + test_gcv(IID_IPersistFolder2, E_NOINTERFACE); + test_gcv(IID_ICommDlgBrowser, E_NOINTERFACE); + test_gcv(IID_ICommDlgBrowser2, E_NOINTERFACE); + test_gcv(IID_ICommDlgBrowser3, E_NOINTERFACE); + +#undef test_gcv + + IExplorerBrowser_Destroy(peb); + IExplorerBrowser_Release(peb); +} + static BOOL test_instantiate_control(void) { IExplorerBrowser *peb; @@ -933,6 +1016,7 @@ START_TEST(ebrowser) test_basics(); test_Advise(); test_navigation(); + test_GetCurrentView(); DestroyWindow(hwnd); OleUninitialize();
1
0
0
0
David Hedberg : shell32/tests: Some additional tests for IShellBrowser.
by Alexandre Julliard
24 Aug '10
24 Aug '10
Module: wine Branch: master Commit: 008099f618de6157f2686adb7adfed981a90109d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=008099f618de6157f2686adb7…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Tue Aug 24 10:56:22 2010 +0200 shell32/tests: Some additional tests for IShellBrowser. --- dlls/shell32/tests/ebrowser.c | 94 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 91 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/tests/ebrowser.c b/dlls/shell32/tests/ebrowser.c index 788d644..d8f1677 100644 --- a/dlls/shell32/tests/ebrowser.c +++ b/dlls/shell32/tests/ebrowser.c @@ -184,9 +184,11 @@ static void test_SB_misc(void) { IExplorerBrowser *peb; IShellBrowser *psb; + IUnknown *punk; HRESULT hr; HWND retHwnd; - LONG lres; + LRESULT lres; + LONG ref; ebrowser_instantiate(&peb); hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); @@ -227,9 +229,95 @@ static void test_SB_misc(void) hr = IShellBrowser_SetMenuSB(psb, NULL, NULL, NULL); ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); + /***** Before EB::Initialize *****/ + + /* ::GetWindow */ + retHwnd = (HWND)0xDEADBEEF; + hr = IShellBrowser_GetWindow(psb, &retHwnd); + ok(hr == E_FAIL, "got (0x%08x)\n", hr); + ok(retHwnd == (HWND)0xDEADBEEF, "HWND overwritten\n"); + + todo_wine + { + + /* ::SendControlMsg */ + lres = 0xDEADBEEF; + hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, &lres); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(lres == 0, "lres was %ld\n", lres); + + lres = 0xDEADBEEF; + hr = IShellBrowser_SendControlMsg(psb, FCW_TOOLBAR, TB_CHECKBUTTON, + FCIDM_TB_SMALLICON, TRUE, &lres); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(lres == 0, "lres was %ld\n", lres); + + hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, NULL); + ok(hr == S_OK, "got (0x%08x)\n", hr); + + hr = IShellBrowser_SendControlMsg(psb, FCW_TREE, 0, 0, 0, NULL); + ok(hr == S_OK, "got (0x%08x)\n", hr); + + hr = IShellBrowser_SendControlMsg(psb, FCW_PROGRESS, 0, 0, 0, NULL); + ok(hr == S_OK, "got (0x%08x)\n", hr); + } + + /* ::QueryActiveShellView */ + hr = IShellBrowser_QueryActiveShellView(psb, (IShellView**)&punk); + ok(hr == E_FAIL, "got (0x%08x)\n", hr); + + /* Initialize ExplorerBrowser */ + ebrowser_initialize(peb); + + /***** After EB::Initialize *****/ + + /* ::GetWindow */ + hr = IShellBrowser_GetWindow(psb, &retHwnd); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(GetParent(retHwnd) == hwnd, "The HWND returned is not our child.\n"); + + todo_wine + { + /* ::SendControlMsg */ + hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, NULL); + ok(hr == S_OK, "got (0x%08x)\n", hr); + + lres = 0xDEADBEEF; + hr = IShellBrowser_SendControlMsg(psb, FCW_TOOLBAR, 0, 0, 0, &lres); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(lres == 0, "lres was %ld\n", lres); + + lres = 0xDEADBEEF; + hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, &lres); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(lres == 0, "lres was %ld\n", lres); + + lres = 0xDEADBEEF; + hr = IShellBrowser_SendControlMsg(psb, 1234, 0, 0, 0, &lres); + ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(lres == 0, "lres was %ld\n", lres); + + /* Returns S_OK */ + hr = IShellBrowser_SetStatusTextSB(psb, NULL); + ok(hr == S_OK, "got (0x%08x)\n", hr); + + hr = IShellBrowser_ContextSensitiveHelp(psb, FALSE); + ok(hr == S_OK, "got (0x%08x)\n", hr); + + hr = IShellBrowser_EnableModelessSB(psb, TRUE); + ok(hr == S_OK, "got (0x%08x)\n", hr); + + hr = IShellBrowser_SetToolbarItems(psb, NULL, 1, 1); + ok(hr == S_OK, "got (0x%08x)\n", hr); + } + + hr = IShellBrowser_QueryActiveShellView(psb, (IShellView**)&punk); + ok(hr == E_FAIL, "got (0x%08x)\n", hr); + IShellBrowser_Release(psb); - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got %d\n", lres); + IExplorerBrowser_Destroy(peb); + ref = IExplorerBrowser_Release(peb); + ok(ref == 0, "Got %d\n", ref); } static void test_initialization(void)
1
0
0
0
David Hedberg : shell32: Implement IExplorerBrowser:: BrowseToIDList and IShellBrowser::BrowseToObject.
by Alexandre Julliard
24 Aug '10
24 Aug '10
Module: wine Branch: master Commit: 73100ce6797c97a15919add9f464a6618b641a97 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=73100ce6797c97a15919add9f…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Tue Aug 24 10:56:21 2010 +0200 shell32: Implement IExplorerBrowser::BrowseToIDList and IShellBrowser::BrowseToObject. --- dlls/shell32/ebrowser.c | 220 +++++++++++++++++++++++++++++++++- dlls/shell32/tests/ebrowser.c | 266 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 482 insertions(+), 4 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=73100ce6797c97a15919a…
1
0
0
0
David Hedberg : shell32: Support BHID_SFUIObject and BHID_DataObject in IShellItem::BindToHandler.
by Alexandre Julliard
24 Aug '10
24 Aug '10
Module: wine Branch: master Commit: 1f73f3a5910d3d48e5e9a83c1139299f3debb070 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1f73f3a5910d3d48e5e9a83c1…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Tue Aug 24 10:56:20 2010 +0200 shell32: Support BHID_SFUIObject and BHID_DataObject in IShellItem::BindToHandler. --- dlls/shell32/shellitem.c | 20 +++++++++++++++ dlls/shell32/tests/shlfolder.c | 51 +++++++++++++++++++++++++++++----------- 2 files changed, 57 insertions(+), 14 deletions(-) diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c index 3284020..d9e7e7b 100644 --- a/dlls/shell32/shellitem.c +++ b/dlls/shell32/shellitem.c @@ -190,6 +190,26 @@ static HRESULT WINAPI ShellItem_BindToHandler(IShellItem *iface, IBindCtx *pbc, } return ret; } + else if (IsEqualGUID(rbhid, &BHID_SFUIObject)) + { + IShellFolder *psf_parent; + if (_ILIsDesktop(This->pidl)) + ret = SHGetDesktopFolder(&psf_parent); + else + ret = ShellItem_get_parent_shellfolder(This, &psf_parent); + + if (SUCCEEDED(ret)) + { + LPCITEMIDLIST pidl = ILFindLastID(This->pidl); + ret = IShellFolder_GetUIObjectOf(psf_parent, NULL, 1, &pidl, riid, NULL, ppvOut); + IShellFolder_Release(psf_parent); + } + return ret; + } + else if (IsEqualGUID(rbhid, &BHID_DataObject)) + { + return ShellItem_BindToHandler((IShellItem*)This, pbc, &BHID_SFUIObject, &IID_IDataObject, ppvOut); + } FIXME("Unsupported BHID %s.\n", debugstr_guid(rbhid)); diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index e21b44d..34bf59d 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -1888,7 +1888,7 @@ static void test_SHCreateShellItem(void) { IShellItem *shellitem, *shellitem2; IPersistIDList *persistidl; - LPITEMIDLIST pidl_cwd=NULL, pidl_testfile, pidl_abstestfile, pidl_test; + LPITEMIDLIST pidl_cwd=NULL, pidl_testfile, pidl_abstestfile, pidl_test, pidl_desktop; HRESULT ret; char curdirA[MAX_PATH]; WCHAR curdirW[MAX_PATH]; @@ -1910,6 +1910,17 @@ static void test_SHCreateShellItem(void) return; } + if(pSHGetSpecialFolderLocation) + { + ret = pSHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl_desktop); + ok(ret == S_OK, "Got 0x%08x\n", ret); + } + else + { + win_skip("pSHGetSpecialFolderLocation missing.\n"); + pidl_desktop = NULL; + } + MultiByteToWideChar(CP_ACP, 0, curdirA, -1, curdirW, MAX_PATH); ret = SHGetDesktopFolder(&desktopfolder); @@ -2058,6 +2069,17 @@ static void test_SHCreateShellItem(void) } IPersistIDList_Release(persistidl); } + + IShellItem_Release(shellitem); + } + + ret = pSHCreateShellItem(NULL, NULL, pidl_desktop, &shellitem); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ret = IShellItem_GetParent(shellitem, &shellitem2); + ok(FAILED(ret), "Got 0x%08x\n", ret); + if(SUCCEEDED(ret)) IShellItem_Release(shellitem2); IShellItem_Release(shellitem); } @@ -2161,6 +2183,7 @@ static void test_SHCreateShellItem(void) DeleteFileA(".\\testfile"); pILFree(pidl_abstestfile); pILFree(pidl_testfile); + pILFree(pidl_desktop); pILFree(pidl_cwd); IShellFolder_Release(currentfolder); IShellFolder_Release(desktopfolder); @@ -3270,16 +3293,21 @@ static void test_ShellItemBindToHandler(void) IPersistFolder2_Release(ppf2); } + /* BHID_SFUIObject */ + hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFUIObject, &IID_IDataObject, (void**)&punk); + ok(hr == S_OK || broken(hr == E_NOINTERFACE /* XP */), "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) IUnknown_Release(punk); + hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFUIObject, &IID_IContextMenu, (void**)&punk); + ok(hr == S_OK || broken(hr == E_NOINTERFACE /* XP */), "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) IUnknown_Release(punk); + + /* BHID_DataObject */ + hr = IShellItem_BindToHandler(psi, NULL, &BHID_DataObject, &IID_IDataObject, (void**)&punk); + ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) IUnknown_Release(punk); + todo_wine { - /* BHID_SFUIObject */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFUIObject, &IID_IDataObject, (void**)&punk); - ok(hr == S_OK || broken(hr == E_NOINTERFACE /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFUIObject, &IID_IContextMenu, (void**)&punk); - ok(hr == S_OK || broken(hr == E_NOINTERFACE /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - /* BHID_SFViewObject */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFViewObject, &IID_IShellView, (void**)&punk); ok(hr == S_OK, "Got 0x%08x\n", hr); @@ -3319,11 +3347,6 @@ static void test_ShellItemBindToHandler(void) ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); - /* BHID_DataObject */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_DataObject, &IID_IDataObject, (void**)&punk); - ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - /* BHID_Filter */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_Filter, &IID_IUnknown, (void**)&punk); ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr);
1
0
0
0
David Hedberg : shell32: Implement IExplorerBrowser:: Advise and IExplorerBrowser::Unadvise.
by Alexandre Julliard
24 Aug '10
24 Aug '10
Module: wine Branch: master Commit: b88c3e2ecbf72a3a785b8846ebd630dd6bfcca3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b88c3e2ecbf72a3a785b8846e…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Tue Aug 24 10:56:19 2010 +0200 shell32: Implement IExplorerBrowser::Advise and IExplorerBrowser::Unadvise. --- dlls/shell32/ebrowser.c | 61 +++++++++++++++- dlls/shell32/tests/ebrowser.c | 155 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 212 insertions(+), 4 deletions(-) diff --git a/dlls/shell32/ebrowser.c b/dlls/shell32/ebrowser.c index e4e132b..3e56ce0 100644 --- a/dlls/shell32/ebrowser.c +++ b/dlls/shell32/ebrowser.c @@ -28,6 +28,7 @@ #include "windef.h" #include "winbase.h" +#include "wine/list.h" #include "wine/debug.h" #include "debughlp.h" @@ -35,6 +36,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); +typedef struct _event_client { + struct list entry; + IExplorerBrowserEvents *pebe; + DWORD cookie; +} event_client; + typedef struct _ExplorerBrowserImpl { const IExplorerBrowserVtbl *lpVtbl; const IShellBrowserVtbl *lpsbVtbl; @@ -47,11 +54,31 @@ typedef struct _ExplorerBrowserImpl { EXPLORER_BROWSER_OPTIONS eb_options; FOLDERSETTINGS fs; + struct list event_clients; + DWORD events_next_cookie; + IShellView *psv; RECT sv_rc; } ExplorerBrowserImpl; /************************************************************************** + * Event functions. + */ +static void events_unadvise_all(ExplorerBrowserImpl *This) +{ + event_client *client, *curs; + TRACE("%p\n", This); + + LIST_FOR_EACH_ENTRY_SAFE(client, curs, &This->event_clients, event_client, entry) + { + TRACE("Removing %p\n", client); + list_remove(&client->entry); + IExplorerBrowserEvents_Release(client->pebe); + HeapFree(GetProcessHeap(), 0, client); + } +} + +/************************************************************************** * Helper functions */ static void update_layout(ExplorerBrowserImpl *This) @@ -248,6 +275,8 @@ static HRESULT WINAPI IExplorerBrowser_fnDestroy(IExplorerBrowser *iface) This->hwnd_sv = NULL; } + events_unadvise_all(This); + DestroyWindow(This->hwnd_main); This->destroyed = TRUE; @@ -314,18 +343,40 @@ static HRESULT WINAPI IExplorerBrowser_fnAdvise(IExplorerBrowser *iface, DWORD *pdwCookie) { ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface; - FIXME("stub, %p (%p, %p)\n", This, psbe, pdwCookie); + event_client *client; + TRACE("%p (%p, %p)\n", This, psbe, pdwCookie); - return E_NOTIMPL; + client = HeapAlloc(GetProcessHeap(), 0, sizeof(event_client)); + client->pebe = psbe; + client->cookie = ++This->events_next_cookie; + + IExplorerBrowserEvents_AddRef(psbe); + *pdwCookie = client->cookie; + + list_add_tail(&This->event_clients, &client->entry); + + return S_OK; } static HRESULT WINAPI IExplorerBrowser_fnUnadvise(IExplorerBrowser *iface, DWORD dwCookie) { ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface; - FIXME("stub, %p (0x%x)\n", This, dwCookie); + event_client *client; + TRACE("%p (0x%x)\n", This, dwCookie); - return E_NOTIMPL; + LIST_FOR_EACH_ENTRY(client, &This->event_clients, event_client, entry) + { + if(client->cookie == dwCookie) + { + list_remove(&client->entry); + IExplorerBrowserEvents_Release(client->pebe); + HeapFree(GetProcessHeap(), 0, client); + return S_OK; + } + } + + return E_INVALIDARG; } static HRESULT WINAPI IExplorerBrowser_fnSetOptions(IExplorerBrowser *iface, @@ -652,6 +703,8 @@ HRESULT WINAPI ExplorerBrowser_Constructor(IUnknown *pUnkOuter, REFIID riid, voi eb->lpVtbl = &vt_IExplorerBrowser; eb->lpsbVtbl = &vt_IShellBrowser; + list_init(&eb->event_clients); + ret = IExplorerBrowser_QueryInterface((IExplorerBrowser*)eb, riid, ppv); IExplorerBrowser_Release((IExplorerBrowser*)eb); diff --git a/dlls/shell32/tests/ebrowser.c b/dlls/shell32/tests/ebrowser.c index 3397eb7..2d90d06 100644 --- a/dlls/shell32/tests/ebrowser.c +++ b/dlls/shell32/tests/ebrowser.c @@ -44,6 +44,77 @@ static HRESULT ebrowser_initialize(IExplorerBrowser *peb) return IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); } +/********************************************************************* + * IExplorerBrowserEvents implementation + */ +typedef struct { + const IExplorerBrowserEventsVtbl *lpVtbl; + LONG ref; + UINT pending, created, completed, failed; +} IExplorerBrowserEventsImpl; + +static IExplorerBrowserEventsImpl ebev; + +static HRESULT WINAPI IExplorerBrowserEvents_fnQueryInterface(IExplorerBrowserEvents *iface, + REFIID riid, void **ppvObj) +{ + ok(0, "Never called.\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI IExplorerBrowserEvents_fnAddRef(IExplorerBrowserEvents *iface) +{ + IExplorerBrowserEventsImpl *This = (IExplorerBrowserEventsImpl*)iface; + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI IExplorerBrowserEvents_fnRelease(IExplorerBrowserEvents *iface) +{ + IExplorerBrowserEventsImpl *This = (IExplorerBrowserEventsImpl*)iface; + return InterlockedDecrement(&This->ref); +} + +static HRESULT WINAPI IExplorerBrowserEvents_fnOnNavigationPending(IExplorerBrowserEvents *iface, + PCIDLIST_ABSOLUTE pidlFolder) +{ + IExplorerBrowserEventsImpl *This = (IExplorerBrowserEventsImpl*)iface; + This->pending++; + return S_OK; +} + +static HRESULT WINAPI IExplorerBrowserEvents_fnOnNavigationComplete(IExplorerBrowserEvents *iface, + PCIDLIST_ABSOLUTE pidlFolder) +{ + IExplorerBrowserEventsImpl *This = (IExplorerBrowserEventsImpl*)iface; + This->completed++; + return S_OK; +} +static HRESULT WINAPI IExplorerBrowserEvents_fnOnNavigationFailed(IExplorerBrowserEvents *iface, + PCIDLIST_ABSOLUTE pidlFolder) +{ + IExplorerBrowserEventsImpl *This = (IExplorerBrowserEventsImpl*)iface; + This->failed++; + return S_OK; +} +static HRESULT WINAPI IExplorerBrowserEvents_fnOnViewCreated(IExplorerBrowserEvents *iface, + IShellView *psv) +{ + IExplorerBrowserEventsImpl *This = (IExplorerBrowserEventsImpl*)iface; + This->created++; + return S_OK; +} + +static const IExplorerBrowserEventsVtbl ebevents = +{ + IExplorerBrowserEvents_fnQueryInterface, + IExplorerBrowserEvents_fnAddRef, + IExplorerBrowserEvents_fnRelease, + IExplorerBrowserEvents_fnOnNavigationPending, + IExplorerBrowserEvents_fnOnViewCreated, + IExplorerBrowserEvents_fnOnNavigationComplete, + IExplorerBrowserEvents_fnOnNavigationFailed +}; + static void test_QueryInterface(void) { IExplorerBrowser *peb; @@ -378,6 +449,89 @@ static void test_basics(void) ok(lres == 0, "Got %d\n", lres); } +static void test_Advise(void) +{ + IExplorerBrowser *peb; + IExplorerBrowserEvents *pebe; + DWORD cookies[10]; + HRESULT hr; + UINT i, ref; + + /* Set up our IExplorerBrowserEvents implementation */ + ebev.lpVtbl = &ebevents; + pebe = (IExplorerBrowserEvents*) &ebev; + + ebrowser_instantiate(&peb); + + if(0) + { + /* Crashes on Windows 7 */ + IExplorerBrowser_Advise(peb, pebe, NULL); + IExplorerBrowser_Advise(peb, NULL, &cookies[0]); + } + + /* Using Unadvise with a cookie that has yet to be given out + * results in E_INVALIDARG */ + hr = IExplorerBrowser_Unadvise(peb, 11); + ok(hr == E_INVALIDARG, "got (0x%08x)\n", hr); + + /* Add some before initialization */ + for(i = 0; i < 5; i++) + { + hr = IExplorerBrowser_Advise(peb, pebe, &cookies[i]); + ok(hr == S_OK, "got (0x%08x)\n", hr); + } + + ebrowser_initialize(peb); + + /* Add some after initialization */ + for(i = 5; i < 10; i++) + { + hr = IExplorerBrowser_Advise(peb, pebe, &cookies[i]); + ok(hr == S_OK, "got (0x%08x)\n", hr); + } + + ok(ebev.ref == 10, "Got %d\n", ebev.ref); + + /* Remove a bunch somewhere in the middle */ + for(i = 4; i < 8; i++) + { + hr = IExplorerBrowser_Unadvise(peb, cookies[i]); + ok(hr == S_OK, "got (0x%08x)\n", hr); + } + + if(0) + { + /* Using unadvise with a previously unadvised cookie results + * in a crash. */ + hr = IExplorerBrowser_Unadvise(peb, cookies[5]); + } + + /* Remove the rest. */ + for(i = 0; i < 10; i++) + { + if(i<4||i>7) + { + hr = IExplorerBrowser_Unadvise(peb, cookies[i]); + ok(hr == S_OK, "%d: got (0x%08x)\n", i, hr); + } + } + + ok(ebev.ref == 0, "Got %d\n", ebev.ref); + + /* ::Destroy implies ::Unadvise. */ + hr = IExplorerBrowser_Advise(peb, pebe, &cookies[0]); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(ebev.ref == 1, "Got %d\n", ebev.ref); + + hr = IExplorerBrowser_Destroy(peb); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(ebev.ref == 0, "Got %d\n", ebev.ref); + + ref = IExplorerBrowser_Release(peb); + ok(!ref, "Got %d", ref); +} + static BOOL test_instantiate_control(void) { IExplorerBrowser *peb; @@ -424,6 +578,7 @@ START_TEST(ebrowser) test_SB_misc(); test_initialization(); test_basics(); + test_Advise(); DestroyWindow(hwnd); OleUninitialize();
1
0
0
0
Marcus Meissner : ntdll: Set correct protection flags on sections in builtin DLLs.
by Alexandre Julliard
24 Aug '10
24 Aug '10
Module: wine Branch: master Commit: 2ca5513a6294a9e653c678bffee58a537d94d54d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ca5513a6294a9e653c678bff…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Mon Aug 23 17:12:53 2010 +0200 ntdll: Set correct protection flags on sections in builtin DLLs. --- dlls/ntdll/loader.c | 5 ++--- dlls/ntdll/ntdll_misc.h | 2 +- dlls/ntdll/tests/info.c | 14 +++++++------- dlls/ntdll/virtual.c | 31 ++++++++++++++++++++++++++----- 4 files changed, 36 insertions(+), 16 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 79ae817..0724879 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1404,9 +1404,8 @@ static void load_builtin_callback( void *module, const char *filename ) builtin_load_info->status = STATUS_INVALID_IMAGE_FORMAT; return; } - virtual_create_system_view( module, nt->OptionalHeader.SizeOfImage, - VPROT_SYSTEM | VPROT_IMAGE | VPROT_COMMITTED | - VPROT_READ | VPROT_WRITECOPY | VPROT_EXEC ); + + virtual_create_builtin_view( module ); /* create the MODREF */ diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index c7b721a..212edf5 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -155,7 +155,7 @@ extern NTSTATUS nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, ANSI_S /* virtual memory */ extern void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ); -extern NTSTATUS virtual_create_system_view( void *base, SIZE_T size, DWORD vprot ); +extern NTSTATUS virtual_create_builtin_view( void *base ); extern NTSTATUS virtual_alloc_thread_stack( TEB *teb, SIZE_T reserve_size, SIZE_T commit_size ); extern void virtual_clear_thread_stack(void); extern BOOL virtual_handle_stack_fault( void *addr ); diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index a56bcd1..f30c6ab 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -1077,15 +1077,15 @@ static void test_queryvirtualmemory(void) MEMORY_BASIC_INFORMATION mbi; char stackbuf[42]; - trace("Check flags of a function entry in NTDLL.DLL\n"); + trace("Check flags of a function entry in NTDLL.DLL at %p\n", pNtQueryVirtualMemory); status = pNtQueryVirtualMemory(NtCurrentProcess(), pNtQueryVirtualMemory, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%x\n", mbi.State, MEM_COMMIT); - todo_wine ok (mbi.Protect == PAGE_EXECUTE_READ, "mbi.Protect is 0x%x, expected 0x%x\n", mbi.Protect, PAGE_EXECUTE_READ); + ok (mbi.Protect == PAGE_EXECUTE_READ, "mbi.Protect is 0x%x, expected 0x%x\n", mbi.Protect, PAGE_EXECUTE_READ); - trace("Check flags of heap\n"); + trace("Check flags of heap at %p\n", GetProcessHeap()); status = pNtQueryVirtualMemory(NtCurrentProcess(), GetProcessHeap(), MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); @@ -1095,7 +1095,7 @@ static void test_queryvirtualmemory(void) ok (mbi.Protect == PAGE_READWRITE || mbi.Protect == PAGE_EXECUTE_READWRITE, "mbi.Protect is 0x%x\n", mbi.Protect); - trace("Check flags of stack\n"); + trace("Check flags of stack at %p\n", stackbuf); status = pNtQueryVirtualMemory(NtCurrentProcess(), stackbuf, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); @@ -1103,7 +1103,7 @@ static void test_queryvirtualmemory(void) ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%x\n", mbi.State, MEM_COMMIT); ok (mbi.Protect == PAGE_READWRITE, "mbi.Protect is 0x%x, expected 0x%x\n", mbi.Protect, PAGE_READWRITE); - trace("Check flags of read-only data\n"); + trace("Check flags of read-only data at %p\n", teststring); status = pNtQueryVirtualMemory(NtCurrentProcess(), teststring, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); @@ -1112,13 +1112,13 @@ static void test_queryvirtualmemory(void) if (mbi.Protect != PAGE_READONLY) todo_wine ok( mbi.Protect == PAGE_READONLY, "mbi.Protect is 0x%x, expected 0x%X\n", mbi.Protect, PAGE_READONLY); - trace("Check flags of read-write global data (.bss)\n"); + trace("Check flags of read-write global data (.bss) at %p\n", rwtestbuf); status = pNtQueryVirtualMemory(NtCurrentProcess(), rwtestbuf, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%X\n", mbi.State, MEM_COMMIT); - todo_wine ok (mbi.Protect == PAGE_READWRITE, "mbi.Protect is 0x%x, expected 0x%X\n", mbi.Protect, PAGE_READWRITE); + ok (mbi.Protect == PAGE_READWRITE, "mbi.Protect is 0x%x, expected 0x%X\n", mbi.Protect, PAGE_READWRITE); } static void test_affinity(void) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index fdfccb1..51c56fe 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1396,18 +1396,39 @@ void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) /*********************************************************************** * virtual_create_system_view */ -NTSTATUS virtual_create_system_view( void *base, SIZE_T size, DWORD vprot ) +NTSTATUS virtual_create_builtin_view( void *module ) { - FILE_VIEW *view; NTSTATUS status; sigset_t sigset; + IMAGE_NT_HEADERS *nt = RtlImageNtHeader( module ); + SIZE_T size = nt->OptionalHeader.SizeOfImage; + IMAGE_SECTION_HEADER *sec; + FILE_VIEW *view; + void *base; + int i; - size = ROUND_SIZE( base, size ); - base = ROUND_ADDR( base, page_mask ); + size = ROUND_SIZE( module, size ); + base = ROUND_ADDR( module, page_mask ); server_enter_uninterrupted_section( &csVirtual, &sigset ); - status = create_view( &view, base, size, vprot ); + status = create_view( &view, base, size, VPROT_SYSTEM | VPROT_IMAGE | + VPROT_COMMITTED | VPROT_READ | VPROT_WRITECOPY | VPROT_EXEC ); if (!status) TRACE( "created %p-%p\n", base, (char *)base + size ); server_leave_uninterrupted_section( &csVirtual, &sigset ); + + if (status) return status; + + sec = (IMAGE_SECTION_HEADER *)((char *)&nt->OptionalHeader + nt->FileHeader.SizeOfOptionalHeader); + for (i = 0; i < nt->FileHeader.NumberOfSections; i++) + { + DWORD flags = VPROT_SYSTEM | VPROT_IMAGE | VPROT_COMMITTED; + + if (sec[i].Characteristics & IMAGE_SCN_MEM_EXECUTE) flags |= VPROT_EXEC; + if (sec[i].Characteristics & IMAGE_SCN_MEM_READ) flags |= VPROT_READ; + if (sec[i].Characteristics & IMAGE_SCN_MEM_WRITE) flags |= VPROT_WRITE; + memset (view->prot + (sec[i].VirtualAddress >> page_shift), flags, + ROUND_SIZE( sec[i].VirtualAddress, sec[i].Misc.VirtualSize ) >> page_shift ); + } + return status; }
1
0
0
0
Jerome Leclanche : winepath: Add a -0 option to use null character as separator.
by Alexandre Julliard
24 Aug '10
24 Aug '10
Module: wine Branch: master Commit: 8c50936d30d6e1a83619f8fb8a273e9ceb9ebe3c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c50936d30d6e1a83619f8fb8…
Author: Jerome Leclanche <adys.wh(a)gmail.com> Date: Mon Aug 23 15:32:29 2010 +0100 winepath: Add a -0 option to use null character as separator. --- programs/winepath/winepath.c | 26 ++++++++++++++++++++------ 1 files changed, 20 insertions(+), 6 deletions(-) diff --git a/programs/winepath/winepath.c b/programs/winepath/winepath.c index 1645ee9..c4a50fb 100644 --- a/programs/winepath/winepath.c +++ b/programs/winepath/winepath.c @@ -34,7 +34,8 @@ enum { SHORTFORMAT = 1, LONGFORMAT = 2, UNIXFORMAT = 4, - WINDOWSFORMAT = 8 + WINDOWSFORMAT = 8, + PRINT0 = 16, }; static const char progname[] = "winepath"; @@ -53,6 +54,7 @@ static int option(int shortopt, const WCHAR *longopt) " directory to the long format\n" " -s, --short converts the long Windows path of an existing file or\n" " directory to the short format\n" + " -0 separate output with \\0 character, instead of a newline\n" " -h, --help output this help message and exit\n" " -v, --version output version information and exit\n" "\n" @@ -76,6 +78,8 @@ static int option(int shortopt, const WCHAR *longopt) return UNIXFORMAT; case 'w': return WINDOWSFORMAT; + case '0': + return PRINT0; } fprintf(stderr, "%s: invalid option ", progname); @@ -148,8 +152,18 @@ int wmain(int argc, WCHAR *argv[]) char path[MAX_PATH]; int outputformats; int i; + int separator; outputformats = parse_options(argv); + + if (outputformats & PRINT0) + { + separator = '\0'; + outputformats ^= PRINT0; + } + else + separator = '\n'; + if (outputformats == 0) outputformats = UNIXFORMAT; @@ -181,12 +195,12 @@ int wmain(int argc, WCHAR *argv[]) if (outputformats & LONGFORMAT) { if (GetLongPathNameW(argv[i], dos_pathW, MAX_PATH)) WideCharToMultiByte(CP_UNIXCP, 0, dos_pathW, -1, path, MAX_PATH, NULL, NULL); - printf("%s\n", path); + printf("%s%c", path, separator); } if (outputformats & SHORTFORMAT) { if (GetShortPathNameW(argv[i], dos_pathW, MAX_PATH)) WideCharToMultiByte(CP_UNIXCP, 0, dos_pathW, -1, path, MAX_PATH, NULL, NULL); - printf("%s\n", path); + printf("%s%c", path, separator); } if (outputformats & UNIXFORMAT) { WCHAR *ntpath, *tail; @@ -205,11 +219,11 @@ int wmain(int argc, WCHAR *argv[]) if (tail) { WideCharToMultiByte(CP_UNIXCP, 0, tail+1, -1, path, MAX_PATH, NULL, NULL); - printf("%s/%s\n", unix_name, path); + printf("%s/%s%c", unix_name, path, separator); } else { - printf("%s\n", unix_name); + printf("%s%c", unix_name, separator); } HeapFree( GetProcessHeap(), 0, unix_name ); break; @@ -257,7 +271,7 @@ int wmain(int argc, WCHAR *argv[]) if ((windows_name = wine_get_dos_file_name_ptr(unix_name))) { WideCharToMultiByte(CP_UNIXCP, 0, windows_name, -1, path, MAX_PATH, NULL, NULL); - printf("%s\n", path); + printf("%s%c", path, separator); HeapFree( GetProcessHeap(), 0, windows_name ); } else printf( "\n" );
1
0
0
0
Alexandre Julliard : winapi: Add support for the thiscall keyword.
by Alexandre Julliard
24 Aug '10
24 Aug '10
Module: wine Branch: master Commit: f756821df3dd332705018e81bac4e41129f1525a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f756821df3dd332705018e81b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Aug 24 16:34:35 2010 +0200 winapi: Add support for the thiscall keyword. --- tools/winapi/winapi.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/winapi/winapi.pm b/tools/winapi/winapi.pm index dcd9268..928476d 100644 --- a/tools/winapi/winapi.pm +++ b/tools/winapi/winapi.pm @@ -281,7 +281,7 @@ sub parse_spec_file($$) { my $ordinal; my $ARCHES="alpha|i386|powerpc|sparc|win32|win64|x86_64"; if(/^(\d+|@)\s+ - (cdecl|pascal|stdcall|varargs)\s+ + (cdecl|pascal|stdcall|varargs|thiscall)\s+ ((?:(?:-arch=(?:$ARCHES)(?:,(?:$ARCHES))*|-noname|-norelay|-ordinal|-i386|-ret16|-ret64|-register|-interrupt|-private)\s+)*)(\S+)\s*\(\s*(.*?)\s*\)\s*(\S*)$/x) { my $calling_convention = $2;
1
0
0
0
Alexandre Julliard : msvcrt: Use a __thiscall macro where appropriate to make the calling convention clearer .
by Alexandre Julliard
24 Aug '10
24 Aug '10
Module: wine Branch: master Commit: 14072676a60488413ccea6fe801bf9c97f20e9a7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14072676a60488413ccea6fe8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Aug 24 16:31:25 2010 +0200 msvcrt: Use a __thiscall macro where appropriate to make the calling convention clearer. --- dlls/msvcirt/msvcirt.c | 16 +++++---- dlls/msvcp90/exception.c | 44 +++++++++++++------------- dlls/msvcp90/memory.c | 72 ++++++++++++++++++++++---------------------- dlls/msvcp90/msvcp90.h | 2 + dlls/msvcp90/string.c | 20 ++++++------ dlls/msvcrt/cpp.c | 76 +++++++++++++++++++++++---------------------- 6 files changed, 118 insertions(+), 112 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=14072676a60488413ccea…
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
89
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
85
86
87
88
89
Results per page:
10
25
50
100
200