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 2009
----- 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
793 discussions
Start a n
N
ew thread
Vincent Povirk : shell32: Implement IShellItem_GetParent.
by Alexandre Julliard
22 May '09
22 May '09
Module: wine Branch: master Commit: 9eed85f0321c8ffc3142e5926a77eaaadcd4e381 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9eed85f0321c8ffc3142e5926…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu May 21 13:18:26 2009 -0500 shell32: Implement IShellItem_GetParent. --- dlls/shell32/shellitem.c | 36 +++++++++++++++++++++++++++++++++--- dlls/shell32/tests/shlfolder.c | 23 ++++++++++++++++++++++- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c index 50f0327..ffd528b 100644 --- a/dlls/shell32/shellitem.c +++ b/dlls/shell32/shellitem.c @@ -105,6 +105,27 @@ static ULONG WINAPI ShellItem_Release(IShellItem *iface) return ref; } +static HRESULT ShellItem_get_parent_pidl(ShellItem *This, LPITEMIDLIST *parent_pidl) +{ + *parent_pidl = ILClone(This->pidl); + if (*parent_pidl) + { + if (ILRemoveLastID(*parent_pidl)) + return S_OK; + else + { + ILFree(*parent_pidl); + *parent_pidl = NULL; + return E_INVALIDARG; + } + } + else + { + *parent_pidl = NULL; + return E_OUTOFMEMORY; + } +} + static HRESULT WINAPI ShellItem_BindToHandler(IShellItem *iface, IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut) { @@ -117,11 +138,20 @@ static HRESULT WINAPI ShellItem_BindToHandler(IShellItem *iface, IBindCtx *pbc, static HRESULT WINAPI ShellItem_GetParent(IShellItem *iface, IShellItem **ppsi) { - FIXME("(%p,%p)\n", iface, ppsi); + ShellItem *This = (ShellItem*)iface; + LPITEMIDLIST parent_pidl; + HRESULT ret; - *ppsi = NULL; + TRACE("(%p,%p)\n", iface, ppsi); - return E_NOTIMPL; + ret = ShellItem_get_parent_pidl(This, &parent_pidl); + if (SUCCEEDED(ret)) + { + ret = SHCreateShellItem(NULL, NULL, parent_pidl, ppsi); + ILFree(parent_pidl); + } + + return ret; } static HRESULT WINAPI ShellItem_GetDisplayName(IShellItem *iface, SIGDN sigdnName, diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index aed9f0e..7900966 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -1747,7 +1747,7 @@ cleanup: static void test_SHCreateShellItem(void) { - IShellItem *shellitem; + IShellItem *shellitem, *shellitem2; IPersistIDList *persistidl; LPITEMIDLIST pidl_cwd=NULL, pidl_testfile, pidl_abstestfile, pidl_test; HRESULT ret; @@ -1830,6 +1830,27 @@ static void test_SHCreateShellItem(void) } IPersistIDList_Release(persistidl); } + + ret = IShellItem_GetParent(shellitem, &shellitem2); + ok(SUCCEEDED(ret), "GetParent returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ret = IShellItem_QueryInterface(shellitem2, &IID_IPersistIDList, (void**)&persistidl); + ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ret = IPersistIDList_GetIDList(persistidl, &pidl_test); + ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ok(ILIsEqual(pidl_cwd, pidl_test), "id lists are not equal\n"); + pILFree(pidl_test); + } + IPersistIDList_Release(persistidl); + } + IShellItem_Release(shellitem2); + } + IShellItem_Release(shellitem); }
1
0
0
0
Vincent Povirk : shell32: Handle parent folders in SHCreateShellItem.
by Alexandre Julliard
22 May '09
22 May '09
Module: wine Branch: master Commit: 5b95a43d5e16ee7ae9674ffac1a5d794bc89b3e6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5b95a43d5e16ee7ae9674ffac…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu May 21 13:13:11 2009 -0500 shell32: Handle parent folders in SHCreateShellItem. --- dlls/shell32/shellitem.c | 33 +++++++++++++++++++++++++++++---- dlls/shell32/tests/shlfolder.c | 6 +++--- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c index 08b2e24..50f0327 100644 --- a/dlls/shell32/shellitem.c +++ b/dlls/shell32/shellitem.c @@ -280,16 +280,41 @@ HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent, { return E_INVALIDARG; } - else if (!pidlParent && !psfParent) + else if (pidlParent || psfParent) { - new_pidl = ILClone(pidl); + LPITEMIDLIST temp_parent=NULL; + if (!pidlParent) + { + IPersistFolder2* ppf2Parent; + + if (!SUCCEEDED(IPersistFolder2_QueryInterface(psfParent, &IID_IPersistFolder2, (void**)&ppf2Parent))) + { + FIXME("couldn't get IPersistFolder2 interface of parent\n"); + return E_NOINTERFACE; + } + + if (!SUCCEEDED(IPersistFolder2_GetCurFolder(ppf2Parent, &temp_parent))) + { + FIXME("couldn't get parent PIDL\n"); + IPersistFolder2_Release(ppf2Parent); + return E_NOINTERFACE; + } + + pidlParent = temp_parent; + IPersistFolder2_Release(ppf2Parent); + } + + new_pidl = ILCombine(pidlParent, pidl); + ILFree(temp_parent); + if (!new_pidl) return E_OUTOFMEMORY; } else { - FIXME("(%p,%p,%p) not implemented\n", pidlParent, psfParent, pidl); - return E_NOINTERFACE; + new_pidl = ILClone(pidl); + if (!new_pidl) + return E_OUTOFMEMORY; } ret = IShellItem_Constructor(NULL, &IID_IShellItem, (void**)&This); diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 9c0c9a0..aed9f0e 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -1814,7 +1814,7 @@ static void test_SHCreateShellItem(void) } ret = pSHCreateShellItem(pidl_cwd, NULL, pidl_testfile, &shellitem); - todo_wine ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); @@ -1834,7 +1834,7 @@ static void test_SHCreateShellItem(void) } ret = pSHCreateShellItem(NULL, currentfolder, pidl_testfile, &shellitem); - todo_wine ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); @@ -1855,7 +1855,7 @@ static void test_SHCreateShellItem(void) /* if a parent pidl and shellfolder are specified, the shellfolder is ignored */ ret = pSHCreateShellItem(pidl_cwd, desktopfolder, pidl_testfile, &shellitem); - todo_wine ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl);
1
0
0
0
Vincent Povirk : shell32: Fail properly when no pidl is passed to SHCreateShellItem.
by Alexandre Julliard
22 May '09
22 May '09
Module: wine Branch: master Commit: 1d57a31d92983b2ef26752ba2fcee90978254c9d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d57a31d92983b2ef26752ba2…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu May 21 11:24:29 2009 -0500 shell32: Fail properly when no pidl is passed to SHCreateShellItem. --- dlls/shell32/shellitem.c | 6 +++++- dlls/shell32/tests/shlfolder.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c index 643f1b5..08b2e24 100644 --- a/dlls/shell32/shellitem.c +++ b/dlls/shell32/shellitem.c @@ -276,7 +276,11 @@ HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent, TRACE("(%p,%p,%p,%p)\n", pidlParent, psfParent, pidl, ppsi); - if (!pidlParent && !psfParent && pidl) + if (!pidl) + { + return E_INVALIDARG; + } + else if (!pidlParent && !psfParent) { new_pidl = ILClone(pidl); if (!new_pidl) diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 0b5d7b2..9c0c9a0 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -1783,7 +1783,7 @@ static void test_SHCreateShellItem(void) pidl_abstestfile = pILCombine(pidl_cwd, pidl_testfile); ret = pSHCreateShellItem(NULL, NULL, NULL, &shellitem); - todo_wine ok(ret == E_INVALIDARG, "SHCreateShellItem returned %x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateShellItem returned %x\n", ret); if (0) /* crashes on Windows XP */ {
1
0
0
0
Vincent Povirk : shell32: Add test for SHCreateShellItem.
by Alexandre Julliard
22 May '09
22 May '09
Module: wine Branch: master Commit: 026c37e747e642a6816b8b42583d32707fa994d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=026c37e747e642a6816b8b425…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu May 21 11:19:21 2009 -0500 shell32: Add test for SHCreateShellItem. --- dlls/shell32/tests/shlfolder.c | 145 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 145 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 0536d2e..0b5d7b2 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -52,6 +52,9 @@ static HRESULT (WINAPI *pStrRetToBufW)(STRRET*,LPCITEMIDLIST,LPWSTR,UINT); static LPITEMIDLIST (WINAPI *pILFindLastID)(LPCITEMIDLIST); static void (WINAPI *pILFree)(LPITEMIDLIST); static BOOL (WINAPI *pILIsEqual)(LPCITEMIDLIST, LPCITEMIDLIST); +static HRESULT (WINAPI *pSHCreateShellItem)(LPCITEMIDLIST,IShellFolder*,LPCITEMIDLIST,IShellItem**); +static LPITEMIDLIST (WINAPI *pILCombine)(LPCITEMIDLIST,LPCITEMIDLIST); + static void init_function_pointers(void) { @@ -68,6 +71,8 @@ static void init_function_pointers(void) pILFindLastID = (void *)GetProcAddress(hmod, (LPCSTR)16); pILFree = (void*)GetProcAddress(hmod, (LPSTR)155); pILIsEqual = (void*)GetProcAddress(hmod, (LPSTR)21); + pSHCreateShellItem = (void*)GetProcAddress(hmod, "SHCreateShellItem"); + pILCombine = (void*)GetProcAddress(hmod, (LPSTR)25); hmod = GetModuleHandleA("shlwapi.dll"); pStrRetToBufW = (void*)GetProcAddress(hmod, "StrRetToBufW"); @@ -1740,6 +1745,142 @@ cleanup: RemoveDirectoryA(".\\testfolder"); } +static void test_SHCreateShellItem(void) +{ + IShellItem *shellitem; + IPersistIDList *persistidl; + LPITEMIDLIST pidl_cwd=NULL, pidl_testfile, pidl_abstestfile, pidl_test; + HRESULT ret; + char curdirA[MAX_PATH]; + WCHAR curdirW[MAX_PATH]; + IShellFolder *desktopfolder=NULL, *currentfolder=NULL; + static WCHAR testfileW[] = {'t','e','s','t','f','i','l','e',0}; + + GetCurrentDirectoryA(MAX_PATH, curdirA); + + if (!lstrlenA(curdirA)) + { + win_skip("GetCurrentDirectoryA returned empty string, skipping test_SHCreateShellItem\n"); + return; + } + + MultiByteToWideChar(CP_ACP, 0, curdirA, -1, curdirW, MAX_PATH); + + ret = SHGetDesktopFolder(&desktopfolder); + ok(SUCCEEDED(ret), "SHGetShellFolder returned %x\n", ret); + + ret = IShellFolder_ParseDisplayName(desktopfolder, NULL, NULL, curdirW, NULL, &pidl_cwd, NULL); + ok(SUCCEEDED(ret), "ParseDisplayName returned %x\n", ret); + + ret = IShellFolder_BindToObject(desktopfolder, pidl_cwd, NULL, &IID_IShellFolder, (void**)¤tfolder); + ok(SUCCEEDED(ret), "BindToObject returned %x\n", ret); + + CreateTestFile(".\\testfile"); + + ret = IShellFolder_ParseDisplayName(currentfolder, NULL, NULL, testfileW, NULL, &pidl_testfile, NULL); + ok(SUCCEEDED(ret), "ParseDisplayName returned %x\n", ret); + + pidl_abstestfile = pILCombine(pidl_cwd, pidl_testfile); + + ret = pSHCreateShellItem(NULL, NULL, NULL, &shellitem); + todo_wine ok(ret == E_INVALIDARG, "SHCreateShellItem returned %x\n", ret); + + if (0) /* crashes on Windows XP */ + { + pSHCreateShellItem(NULL, NULL, pidl_cwd, NULL); + pSHCreateShellItem(pidl_cwd, NULL, NULL, &shellitem); + pSHCreateShellItem(NULL, currentfolder, NULL, &shellitem); + pSHCreateShellItem(pidl_cwd, currentfolder, NULL, &shellitem); + } + + ret = pSHCreateShellItem(NULL, NULL, pidl_cwd, &shellitem); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); + ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ret = IPersistIDList_GetIDList(persistidl, &pidl_test); + ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ok(ILIsEqual(pidl_cwd, pidl_test), "id lists are not equal\n"); + pILFree(pidl_test); + } + IPersistIDList_Release(persistidl); + } + IShellItem_Release(shellitem); + } + + ret = pSHCreateShellItem(pidl_cwd, NULL, pidl_testfile, &shellitem); + todo_wine ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); + ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ret = IPersistIDList_GetIDList(persistidl, &pidl_test); + ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ok(ILIsEqual(pidl_abstestfile, pidl_test), "id lists are not equal\n"); + pILFree(pidl_test); + } + IPersistIDList_Release(persistidl); + } + IShellItem_Release(shellitem); + } + + ret = pSHCreateShellItem(NULL, currentfolder, pidl_testfile, &shellitem); + todo_wine ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); + ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ret = IPersistIDList_GetIDList(persistidl, &pidl_test); + ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ok(ILIsEqual(pidl_abstestfile, pidl_test), "id lists are not equal\n"); + pILFree(pidl_test); + } + IPersistIDList_Release(persistidl); + } + IShellItem_Release(shellitem); + } + + /* if a parent pidl and shellfolder are specified, the shellfolder is ignored */ + ret = pSHCreateShellItem(pidl_cwd, desktopfolder, pidl_testfile, &shellitem); + todo_wine ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); + ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ret = IPersistIDList_GetIDList(persistidl, &pidl_test); + ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); + if (SUCCEEDED(ret)) + { + ok(ILIsEqual(pidl_abstestfile, pidl_test), "id lists are not equal\n"); + pILFree(pidl_test); + } + IPersistIDList_Release(persistidl); + } + IShellItem_Release(shellitem); + } + + DeleteFileA(".\\testfile"); + pILFree(pidl_abstestfile); + pILFree(pidl_testfile); + pILFree(pidl_cwd); + IShellFolder_Release(currentfolder); + IShellFolder_Release(desktopfolder); +} START_TEST(shlfolder) { @@ -1762,6 +1903,10 @@ START_TEST(shlfolder) else skip("SHGetFolderPathAndSubDirA not present\n"); test_LocalizedNames(); + if(pSHCreateShellItem) + test_SHCreateShellItem(); + else + win_skip("test_SHCreateShellItem not present\n"); OleUninitialize(); }
1
0
0
0
Rein Klazes : win87em.dll16: Remove a unnecessary floating point instruction that can cause invalid operation exceptions .
by Alexandre Julliard
22 May '09
22 May '09
Module: wine Branch: master Commit: b0a40dafd9266c22dedd908d6e60ba0fdeed6d68 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0a40dafd9266c22dedd908d6…
Author: Rein Klazes <wijn(a)online.nl> Date: Fri May 22 09:02:00 2009 +0200 win87em.dll16: Remove a unnecessary floating point instruction that can cause invalid operation exceptions. --- dlls/win87em.dll16/win87em.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/dlls/win87em.dll16/win87em.c b/dlls/win87em.dll16/win87em.c index d3fc96a..6154ac6 100644 --- a/dlls/win87em.dll16/win87em.c +++ b/dlls/win87em.dll16/win87em.c @@ -149,7 +149,6 @@ void WINAPI _fpMath( CONTEXT *context ) case 6: /* round top of stack to integer using method AX & 0x0C00 */ /* returns current controlword */ { - DWORD dw=0; WORD save,mask; /* I don't know much about asm() programming. This could be * wrong. @@ -160,10 +159,8 @@ void WINAPI _fpMath( CONTEXT *context ) __asm__ __volatile__("orw $0xC00,%0" : "=m" (mask) : : "memory"); __asm__ __volatile__("fldcw %0;wait" : : "m" (mask)); __asm__ __volatile__("frndint"); - __asm__ __volatile__("fist %0;wait" : "=m" (dw) : : "memory"); __asm__ __volatile__("fldcw %0" : : "m" (save)); #endif - TRACE("On top of stack is %d\n",dw); } break;
1
0
0
0
Nikolay Sivov : comctl32/tests: A bunch of ListView hittest tests.
by Alexandre Julliard
22 May '09
22 May '09
Module: wine Branch: master Commit: 691aa6e267c8d1c8e17924f06997ddfc2fea5cf8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=691aa6e267c8d1c8e17924f06…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Fri May 22 00:57:30 2009 +0400 comctl32/tests: A bunch of ListView hittest tests. --- dlls/comctl32/tests/listview.c | 186 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 186 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 1c002d9..d3e4ee8 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -387,6 +387,89 @@ static HWND subclass_header(HWND hwndListview) return hwnd; } +/* Performs a single LVM_HITTEST test */ +static void test_lvm_hittest(HWND hwnd, INT x, INT y, INT item, UINT flags, + BOOL todo_item, BOOL todo_flags, int line) +{ + LVHITTESTINFO lpht; + DWORD ret; + + lpht.pt.x = x; + lpht.pt.y = y; + lpht.iSubItem = 10; + + trace("hittesting pt=(%d,%d)\n", lpht.pt.x, lpht.pt.y); + ret = SendMessage(hwnd, LVM_HITTEST, 0, (LPARAM)&lpht); + + if (todo_item) + { + todo_wine + { + ok_(__FILE__, line)(ret == item, "Expected %d item, got %d\n", item, ret); + ok_(__FILE__, line)(lpht.iItem == item, "Expected %d item, got %d\n", item, lpht.iItem); + ok_(__FILE__, line)(lpht.iSubItem == 10, "Expected subitem not overwrited\n"); + } + } + else + { + ok_(__FILE__, line)(ret == item, "Expected %d item, got %d\n", item, ret); + ok_(__FILE__, line)(lpht.iItem == item, "Expected %d item, got %d\n", item, lpht.iItem); + ok_(__FILE__, line)(lpht.iSubItem == 10, "Expected subitem not overwrited\n"); + } + + if (todo_flags) + { + todo_wine + ok_(__FILE__, line)(lpht.flags == flags, "Expected flags %x, got %x\n", flags, lpht.flags); + } + else + ok_(__FILE__, line)(lpht.flags == flags, "Expected flags %x, got %x\n", flags, lpht.flags); +} + +/* Performs a single LVM_SUBITEMHITTEST test */ +static void test_lvm_subitemhittest(HWND hwnd, INT x, INT y, INT item, INT subitem, UINT flags, + BOOL todo_item, BOOL todo_subitem, BOOL todo_flags, int line) +{ + LVHITTESTINFO lpht; + DWORD ret; + + lpht.pt.x = x; + lpht.pt.y = y; + + trace("subhittesting pt=(%d,%d)\n", lpht.pt.x, lpht.pt.y); + ret = SendMessage(hwnd, LVM_SUBITEMHITTEST, 0, (LPARAM)&lpht); + + if (todo_item) + { + todo_wine + { + ok_(__FILE__, line)(ret == item, "Expected %d item, got %d\n", item, ret); + ok_(__FILE__, line)(lpht.iItem == item, "Expected %d item, got %d\n", item, lpht.iItem); + } + } + else + { + ok_(__FILE__, line)(ret == item, "Expected %d item, got %d\n", item, ret); + ok_(__FILE__, line)(lpht.iItem == item, "Expected %d item, got %d\n", item, lpht.iItem); + } + + if (todo_subitem) + { + todo_wine + ok_(__FILE__, line)(lpht.iSubItem == subitem, "Expected subitem %d, got %d\n", subitem, lpht.iSubItem); + } + else + ok_(__FILE__, line)(lpht.iSubItem == subitem, "Expected subitem %d, got %d\n", subitem, lpht.iSubItem); + + if (todo_flags) + { + todo_wine + ok_(__FILE__, line)(lpht.flags == flags, "Expected flags %x, got %x\n", flags, lpht.flags); + } + else + ok_(__FILE__, line)(lpht.flags == flags, "Expected flags %x, got %x\n", flags, lpht.flags); +} + static void test_images(void) { HWND hwnd; @@ -2241,6 +2324,108 @@ static void test_setredraw(void) DestroyWindow(hwnd); } +static void test_hittest(void) +{ + HWND hwnd; + DWORD r; + RECT bounds; + LVITEMA item; + static CHAR text[] = "1234567890ABCDEFGHIJKLMNOPQRST"; + POINT pos; + INT x, y; + HIMAGELIST himl, himl2; + HBITMAP hbmp; + + hwnd = create_listview_control(0); + ok(hwnd != NULL, "failed to create a listview window\n"); + + /* LVS_REPORT with a single subitem (2 columns) */ + insert_column(hwnd, 0); + insert_column(hwnd, 1); + insert_item(hwnd, 0); + + item.iSubItem = 0; + /* the only purpose of that line is to be as long as a half item rect */ + item.pszText = text; + r = SendMessage(hwnd, LVM_SETITEMTEXT, 0, (LPARAM)&item); + expect(TRUE, r); + + r = SendMessage(hwnd, LVM_SETCOLUMNWIDTH, 0, MAKELPARAM(100, 0)); + expect(TRUE, r); + r = SendMessage(hwnd, LVM_SETCOLUMNWIDTH, 1, MAKELPARAM(100, 0)); + expect(TRUE, r); + + memset(&bounds, 0, sizeof(bounds)); + bounds.left = LVIR_BOUNDS; + r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&bounds); + ok(bounds.bottom - bounds.top > 0, "Expected non zero item height\n"); + ok(bounds.right - bounds.left > 0, "Expected non zero item width\n"); + r = SendMessage(hwnd, LVM_GETITEMPOSITION, 0, (LPARAM)&pos); + expect(TRUE, r); + + /* LVS_EX_FULLROWSELECT not set, no icons attached */ + x = pos.x + 50; /* column half width */ + y = pos.y + (bounds.bottom - bounds.top) / 2; + test_lvm_hittest(hwnd, x, y, 0, LVHT_ONITEMLABEL, FALSE, FALSE, __LINE__); + test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE, __LINE__); + x = pos.x + 150; /* outside column */ + y = pos.y + (bounds.bottom - bounds.top) / 2; + test_lvm_hittest(hwnd, x, y, -1, LVHT_TORIGHT, FALSE, FALSE, __LINE__); + test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, TRUE, TRUE, TRUE, __LINE__); + /* parent client area is 100x100 by default */ + MoveWindow(hwnd, 0, 0, 300, 100, FALSE); + x = pos.x + 150; /* outside column */ + y = pos.y + (bounds.bottom - bounds.top) / 2; + test_lvm_hittest(hwnd, x, y, -1, LVHT_NOWHERE, FALSE, FALSE, __LINE__); + test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE, __LINE__); + /* the same with LVS_EX_FULLROWSELECT */ + SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT); + x = pos.x + 150; /* outside column */ + y = pos.y + (bounds.bottom - bounds.top) / 2; + test_lvm_hittest(hwnd, x, y, 0, LVHT_ONITEM, FALSE, FALSE, __LINE__); + test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE, __LINE__); + MoveWindow(hwnd, 0, 0, 100, 100, FALSE); + x = pos.x + 150; /* outside column */ + y = pos.y + (bounds.bottom - bounds.top) / 2; + test_lvm_hittest(hwnd, x, y, -1, LVHT_TORIGHT, FALSE, FALSE, __LINE__); + test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, TRUE, TRUE, TRUE, __LINE__); + /* try with icons */ + himl = ImageList_Create(16, 16, 0, 4, 4); + ok(himl != NULL, "failed to create imagelist\n"); + hbmp = CreateBitmap(16, 16, 1, 1, NULL); + ok(hbmp != NULL, "failed to create bitmap\n"); + r = ImageList_Add(himl, hbmp, 0); + ok(r == 0, "should be zero\n"); + + r = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM)himl); + ok(r == 0, "should return zero\n"); + + item.mask = LVIF_IMAGE; + item.iImage = 0; + item.iItem = 0; + item.iSubItem = 0; + r = SendMessage(hwnd, LVM_SETITEM, 0, (LPARAM)&item); + expect(TRUE, r); + /* on state icon */ + x = pos.x + 8; /* outside column */ + y = pos.y + (bounds.bottom - bounds.top) / 2; + test_lvm_hittest(hwnd, x, y, 0, LVHT_ONITEMSTATEICON, FALSE, TRUE, __LINE__); + test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMSTATEICON, FALSE, FALSE, TRUE, __LINE__); + + himl2 = (HIMAGELIST)SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM)NULL); + ok(himl2 == himl, "should return handle\n"); + + r = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)himl); + ok(r == 0, "should return zero\n"); + /* on item icon */ + x = pos.x + 8; /* outside column */ + y = pos.y + (bounds.bottom - bounds.top) / 2; + test_lvm_hittest(hwnd, x, y, 0, LVHT_ONITEMICON, FALSE, FALSE, __LINE__); + test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMICON, FALSE, FALSE, FALSE, __LINE__); + + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -2284,6 +2469,7 @@ START_TEST(listview) test_norecompute(); test_nosortheader(); test_setredraw(); + test_hittest(); DestroyWindow(hwndparent); }
1
0
0
0
Austin English : powerprof: Remove a noisy FIXME.
by Alexandre Julliard
22 May '09
22 May '09
Module: wine Branch: master Commit: d4c880dfe4e8a1c547ef32fa1d52d6ead214fa76 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d4c880dfe4e8a1c547ef32fa1…
Author: Austin English <austinenglish(a)gmail.com> Date: Thu May 21 15:08:02 2009 -0500 powerprof: Remove a noisy FIXME. --- dlls/powrprof/powrprof.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/dlls/powrprof/powrprof.c b/dlls/powrprof/powrprof.c index c51434f..507b380 100644 --- a/dlls/powrprof/powrprof.c +++ b/dlls/powrprof/powrprof.c @@ -299,8 +299,6 @@ BOOLEAN WINAPI WritePwrScheme(PUINT puiID, LPWSTR lpszName, LPWSTR lpszDescripti BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - FIXME("(%p, %d, %p) not fully implemented\n", hinstDLL, fdwReason, lpvReserved); - switch(fdwReason) { case DLL_PROCESS_ATTACH: {
1
0
0
0
Austin English : ntdll: Change a noisy FIXME to a WARN.
by Alexandre Julliard
22 May '09
22 May '09
Module: wine Branch: master Commit: 81543b79c21a8c9c9761294fc31ab6ce1348a66a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81543b79c21a8c9c9761294fc…
Author: Austin English <austinenglish(a)gmail.com> Date: Thu May 21 15:07:02 2009 -0500 ntdll: Change a noisy FIXME to a WARN. --- dlls/ntdll/nt.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 58320c3..323e7e6 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -1307,7 +1307,8 @@ NTSTATUS WINAPI NtPowerInformation( return STATUS_SUCCESS; } default: - FIXME("Unimplemented NtPowerInformation action: %d\n", InformationLevel); + /* FIXME: Needed by .NET Framework */ + WARN("Unimplemented NtPowerInformation action: %d\n", InformationLevel); return STATUS_NOT_IMPLEMENTED; } }
1
0
0
0
Aric Stewart : msctf: Beginning implementation of ITfContext::GetSelection.
by Alexandre Julliard
22 May '09
22 May '09
Module: wine Branch: master Commit: 13d6aa2bb72d9d90e239d6e3001948ed0e2f9be1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=13d6aa2bb72d9d90e239d6e30…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Thu May 21 13:45:57 2009 -0500 msctf: Beginning implementation of ITfContext::GetSelection. --- dlls/msctf/context.c | 55 +++++++++++++++++++++++++++++++++++- dlls/msctf/tests/inputprocessor.c | 23 +++++++++++++++- include/textstor.idl | 2 + 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c index 8c83798..8e14a72 100644 --- a/dlls/msctf/context.c +++ b/dlls/msctf/context.c @@ -283,8 +283,59 @@ static HRESULT WINAPI Context_GetSelection (ITfContext *iface, TF_SELECTION *pSelection, ULONG *pcFetched) { Context *This = (Context *)iface; - FIXME("STUB:(%p)\n",This); - return E_NOTIMPL; + EditCookie *cookie; + ULONG count, i; + ULONG totalFetched = 0; + HRESULT hr = S_OK; + + if (!pSelection || !pcFetched) + return E_INVALIDARG; + + *pcFetched = 0; + + if (!This->connected) + return TF_E_DISCONNECTED; + + if (get_Cookie_magic(ec)!=COOKIE_MAGIC_EDITCOOKIE) + return TF_E_NOLOCK; + + if (!This->pITextStoreACP) + { + FIXME("Context does not have a ITextStoreACP\n"); + return E_NOTIMPL; + } + + cookie = get_Cookie_data(ec); + + if (ulIndex == TF_DEFAULT_SELECTION) + count = 1; + else + count = ulCount; + + for (i = 0; i < count; i++) + { + DWORD fetched; + TS_SELECTION_ACP acps; + + hr = ITextStoreACP_GetSelection(This->pITextStoreACP, ulIndex + i, + 1, &acps, &fetched); + + if (hr == TS_E_NOLOCK) + return TF_E_NOLOCK; + else if (SUCCEEDED(hr)) + { + pSelection[totalFetched].style.ase = acps.style.ase; + pSelection[totalFetched].style.fInterimChar = acps.style.fInterimChar; + Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, acps.acpStart, acps.acpEnd, &pSelection[totalFetched].range); + totalFetched ++; + } + else + break; + } + + *pcFetched = totalFetched; + + return hr; } static HRESULT WINAPI Context_SetSelection (ITfContext *iface, diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c index f488e82..5884a30 100644 --- a/dlls/msctf/tests/inputprocessor.c +++ b/dlls/msctf/tests/inputprocessor.c @@ -58,6 +58,7 @@ static INT test_ACP_AdviseSink = SINK_UNEXPECTED; static INT test_ACP_GetStatus = SINK_UNEXPECTED; static INT test_ACP_RequestLock = SINK_UNEXPECTED; static INT test_ACP_GetEndACP = SINK_UNEXPECTED; +static INT test_ACP_GetSelection = SINK_UNEXPECTED; static INT test_DoEditSession = SINK_UNEXPECTED; @@ -171,7 +172,15 @@ static HRESULT WINAPI TextStoreACP_QueryInsert(ITextStoreACP *iface, static HRESULT WINAPI TextStoreACP_GetSelection(ITextStoreACP *iface, ULONG ulIndex, ULONG ulCount, TS_SELECTION_ACP *pSelection, ULONG *pcFetched) { - trace("\n"); + ok(test_ACP_GetSelection == SINK_EXPECTED, "Unexpected TextStoreACP_GetSelection\n"); + test_ACP_GetSelection = SINK_FIRED; + + pSelection->acpStart = 10; + pSelection->acpEnd = 20; + pSelection->style.fInterimChar = 0; + pSelection->style.ase = TS_AE_NONE; + *pcFetched = 1; + return S_OK; } static HRESULT WINAPI TextStoreACP_SetSelection(ITextStoreACP *iface, @@ -1378,6 +1387,8 @@ TfEditCookie ec) ITfContext *cxt; ITfDocumentMgr *dm; ITfRange *range; + TF_SELECTION selection; + ULONG fetched; HRESULT hr; ok(test_DoEditSession == SINK_EXPECTED, "Unexpected DoEditSession\n"); @@ -1416,6 +1427,16 @@ TfEditCookie ec) ok(test_ACP_GetEndACP == SINK_FIRED, "GetEndACP not fired as expected\n"); ITfRange_Release(range); + + selection.range = NULL; + test_ACP_GetSelection = SINK_EXPECTED; + hr = ITfContext_GetSelection(cxt, ec, TF_DEFAULT_SELECTION, 1, &selection, &fetched); + ok(SUCCEEDED(hr),"ITfContext_GetSelection failed\n"); + ok(fetched == 1,"fetched incorrect\n"); + ok(selection.range != NULL,"NULL range\n"); + ok(test_ACP_GetSelection == SINK_FIRED," expected ACP_GetSepection not fired\n"); + ITfRange_Release(selection.range); + ITfContext_Release(cxt); ITfDocumentMgr_Release(dm); return 0xdeadcafe; diff --git a/include/textstor.idl b/include/textstor.idl index 262dc53..2e79e3c 100644 --- a/include/textstor.idl +++ b/include/textstor.idl @@ -21,6 +21,8 @@ import "oaidl.idl"; #endif cpp_quote("#define TS_E_READONLY MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0209)") +cpp_quote("#define TS_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)") + const ULONG TS_DEFAULT_SELECTION = ~0u;
1
0
0
0
Aric Stewart : msctf: Beginning implementation of ITfContext::GetEnd.
by Alexandre Julliard
22 May '09
22 May '09
Module: wine Branch: master Commit: 7fa47cd3f50faf4c871c7a6a0e2c6f4651ffe76d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7fa47cd3f50faf4c871c7a6a0…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Thu May 21 13:45:36 2009 -0500 msctf: Beginning implementation of ITfContext::GetEnd. --- dlls/msctf/context.c | 27 +++++++++++++++++++++++++-- dlls/msctf/tests/inputprocessor.c | 20 +++++++++++++++++++- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c index ce5463f..8c83798 100644 --- a/dlls/msctf/context.c +++ b/dlls/msctf/context.c @@ -321,8 +321,31 @@ static HRESULT WINAPI Context_GetEnd (ITfContext *iface, TfEditCookie ec, ITfRange **ppEnd) { Context *This = (Context *)iface; - FIXME("STUB:(%p)\n",This); - return E_NOTIMPL; + EditCookie *cookie; + LONG end; + TRACE("(%p) %i %p\n",This,ec,ppEnd); + + if (!ppEnd) + return E_INVALIDARG; + + *ppEnd = NULL; + + if (!This->connected) + return TF_E_DISCONNECTED; + + if (get_Cookie_magic(ec)!=COOKIE_MAGIC_EDITCOOKIE) + return TF_E_NOLOCK; + + if (!This->pITextStoreACP) + { + FIXME("Context does not have a ITextStoreACP\n"); + return E_NOTIMPL; + } + + cookie = get_Cookie_data(ec); + ITextStoreACP_GetEndACP(This->pITextStoreACP,&end); + + return Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, end, end, ppEnd); } static HRESULT WINAPI Context_GetActiveView (ITfContext *iface, diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c index 2fff504..f488e82 100644 --- a/dlls/msctf/tests/inputprocessor.c +++ b/dlls/msctf/tests/inputprocessor.c @@ -57,6 +57,7 @@ static INT test_KEV_OnSetFocus = SINK_UNEXPECTED; static INT test_ACP_AdviseSink = SINK_UNEXPECTED; static INT test_ACP_GetStatus = SINK_UNEXPECTED; static INT test_ACP_RequestLock = SINK_UNEXPECTED; +static INT test_ACP_GetEndACP = SINK_UNEXPECTED; static INT test_DoEditSession = SINK_UNEXPECTED; @@ -269,7 +270,8 @@ static HRESULT WINAPI TextStoreACP_RetrieveRequestedAttrs(ITextStoreACP *iface, static HRESULT WINAPI TextStoreACP_GetEndACP(ITextStoreACP *iface, LONG *pacp) { - trace("\n"); + ok(test_ACP_GetEndACP == SINK_EXPECTED,"Unexpected TextStoreACP_GetEndACP\n"); + test_ACP_GetEndACP = SINK_FIRED; return S_OK; } static HRESULT WINAPI TextStoreACP_GetActiveView(ITextStoreACP *iface, @@ -1398,6 +1400,22 @@ TfEditCookie ec) ok(range != NULL,"Range set to NULL\n"); ITfRange_Release(range); + + hr = ITfContext_GetEnd(cxt,ec,NULL); + ok(hr == E_INVALIDARG,"Unexpected return code %x\n",hr); + + range = (ITfRange*)0xdeaddead; + hr = ITfContext_GetEnd(cxt,0xdeadcafe,&range); + ok(hr == TF_E_NOLOCK,"Unexpected return code %x\n",hr); + ok(range == NULL,"Range not set to NULL\n"); + + test_ACP_GetEndACP = SINK_EXPECTED; + hr = ITfContext_GetEnd(cxt,ec,&range); + ok(SUCCEEDED(hr),"Unexpected return code %x\n",hr); + ok(range != NULL,"Range set to NULL\n"); + ok(test_ACP_GetEndACP == SINK_FIRED, "GetEndACP not fired as expected\n"); + + ITfRange_Release(range); ITfContext_Release(cxt); ITfDocumentMgr_Release(dm); return 0xdeadcafe;
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
80
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
Results per page:
10
25
50
100
200