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
July
June
May
April
March
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 2015
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
428 discussions
Start a n
N
ew thread
Ken Thomases : winemac: Don' t process WM_EXITSIZEMOVE through filters in macdrv_window_drag_begin().
by Alexandre Julliard
12 May '15
12 May '15
Module: wine Branch: master Commit: eea6ba9ae9353b512c3ac5d08376968211666ccf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eea6ba9ae9353b512c3ac5d08…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Mon May 11 21:17:45 2015 -0500 winemac: Don't process WM_EXITSIZEMOVE through filters in macdrv_window_drag_begin(). --- dlls/winemac.drv/window.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 7a777e6..c67ccd0 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -2193,14 +2193,18 @@ void macdrv_window_drag_begin(HWND hwnd) while (GetMessageW(&msg, 0, 0, 0)) { + if (msg.message == WM_EXITSIZEMOVE) + { + SendMessageW(hwnd, WM_EXITSIZEMOVE, 0, 0); + break; + } + if (!CallMsgFilterW(&msg, MSGF_SIZE) && msg.message != WM_KEYDOWN && msg.message != WM_MOUSEMOVE && msg.message != WM_LBUTTONDOWN && msg.message != WM_LBUTTONUP) { TranslateMessage(&msg); DispatchMessageW(&msg); } - - if (msg.message == WM_EXITSIZEMOVE) break; } TRACE("done\n");
1
0
0
0
Mark Harmstone : uxtheme: Stub out buffered animation functions.
by Alexandre Julliard
12 May '15
12 May '15
Module: wine Branch: master Commit: a88722ab9a0b6eb69b5bf3e0da82b74d0a564e8d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a88722ab9a0b6eb69b5bf3e0d…
Author: Mark Harmstone <hellas(a)burntcomma.com> Date: Mon May 11 23:36:41 2015 +0100 uxtheme: Stub out buffered animation functions. --- dlls/uxtheme/buffer.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ dlls/uxtheme/uxtheme.spec | 4 ++++ 2 files changed, 48 insertions(+) diff --git a/dlls/uxtheme/buffer.c b/dlls/uxtheme/buffer.c index 8955a0d..8583f1a 100644 --- a/dlls/uxtheme/buffer.c +++ b/dlls/uxtheme/buffer.c @@ -136,3 +136,47 @@ HRESULT WINAPI GetBufferedPaintTargetRect(HPAINTBUFFER hBufferedPaint, RECT *prc FIXME("Stub (%p %p)\n", hBufferedPaint, prc); return E_NOTIMPL; } + +/*********************************************************************** + * BeginBufferedAnimation (UXTHEME.@) + */ +HANIMATIONBUFFER WINAPI BeginBufferedAnimation(HWND hwnd, HDC hdcTarget, const RECT *rcTarget, + BP_BUFFERFORMAT dwFormat, BP_PAINTPARAMS *pPaintParams, + BP_ANIMATIONPARAMS *pAnimationParams, HDC *phdcFrom, + HDC *phdcTo) +{ + FIXME("Stub (%p %p %p %u %p %p %p %p)\n", hwnd, hdcTarget, rcTarget, dwFormat, + pPaintParams, pAnimationParams, phdcFrom, phdcTo); + + return NULL; +} + +/*********************************************************************** + * BufferedPaintRenderAnimation (UXTHEME.@) + */ +BOOL WINAPI BufferedPaintRenderAnimation(HWND hwnd, HDC hdcTarget) +{ + FIXME("Stub (%p %p)\n", hwnd, hdcTarget); + + return FALSE; +} + +/*********************************************************************** + * BufferedPaintStopAllAnimations (UXTHEME.@) + */ +HRESULT WINAPI BufferedPaintStopAllAnimations(HWND hwnd) +{ + FIXME("Stub (%p)\n", hwnd); + + return E_NOTIMPL; +} + +/*********************************************************************** + * EndBufferedAnimation (UXTHEME.@) + */ +HRESULT WINAPI EndBufferedAnimation(HANIMATIONBUFFER hbpAnimation, BOOL fUpdateTarget) +{ + FIXME("Stub (%p %u)\n", hbpAnimation, fUpdateTarget); + + return E_NOTIMPL; +} diff --git a/dlls/uxtheme/uxtheme.spec b/dlls/uxtheme/uxtheme.spec index 3f8e89a..7a0e7e4 100644 --- a/dlls/uxtheme/uxtheme.spec +++ b/dlls/uxtheme/uxtheme.spec @@ -43,10 +43,13 @@ 63 stub -noname MarkSelection # Standard functions +@ stdcall BeginBufferedAnimation(ptr ptr ptr long ptr ptr ptr ptr) @ stdcall BeginBufferedPaint(ptr ptr long ptr ptr) @ stdcall BufferedPaintClear(ptr ptr) @ stdcall BufferedPaintInit() +@ stdcall BufferedPaintRenderAnimation(ptr ptr) @ stdcall BufferedPaintSetAlpha(ptr ptr long) +@ stdcall BufferedPaintStopAllAnimations(ptr) @ stdcall BufferedPaintUnInit() @ stdcall CloseThemeData(ptr) @ stdcall DrawThemeBackground(ptr ptr long long ptr ptr) @@ -57,6 +60,7 @@ @ stdcall DrawThemeText(ptr ptr long long wstr long long long ptr) @ stdcall EnableThemeDialogTexture(ptr long) @ stdcall EnableTheming(long) +@ stdcall EndBufferedAnimation(ptr long) @ stdcall EndBufferedPaint(ptr long) @ stdcall GetBufferedPaintBits(ptr ptr ptr) @ stdcall GetBufferedPaintDC(ptr)
1
0
0
0
Mark Harmstone : kernel32: Add GetFileMUIInfo stub.
by Alexandre Julliard
12 May '15
12 May '15
Module: wine Branch: master Commit: e468f15d20f4bb6ce6996458e022bb502ef3e8ea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e468f15d20f4bb6ce6996458e…
Author: Mark Harmstone <hellas(a)burntcomma.com> Date: Mon May 11 22:30:57 2015 +0100 kernel32: Add GetFileMUIInfo stub. --- .../api-ms-win-core-localization-l1-2-0.spec | 2 +- .../api-ms-win-core-localization-l1-2-1.spec | 2 +- dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/locale.c | 12 ++++++++++++ include/winnls.h | 17 +++++++++++++++++ 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/dlls/api-ms-win-core-localization-l1-2-0/api-ms-win-core-localization-l1-2-0.spec b/dlls/api-ms-win-core-localization-l1-2-0/api-ms-win-core-localization-l1-2-0.spec index d5daa65..60da5fe 100644 --- a/dlls/api-ms-win-core-localization-l1-2-0/api-ms-win-core-localization-l1-2-0.spec +++ b/dlls/api-ms-win-core-localization-l1-2-0/api-ms-win-core-localization-l1-2-0.spec @@ -11,7 +11,7 @@ @ stdcall GetCPInfoExW(long long ptr) kernel32.GetCPInfoExW @ stdcall GetCalendarInfoEx(wstr long ptr long ptr long ptr) kernel32.GetCalendarInfoEx @ stdcall GetCalendarInfoW(long long long ptr long ptr) kernel32.GetCalendarInfoW -@ stub GetFileMUIInfo +@ stdcall GetFileMUIInfo(long wstr ptr ptr) kernel32.GetFileMUIInfo @ stdcall GetFileMUIPath(long wstr wstr ptr ptr ptr ptr) kernel32.GetFileMUIPath @ stdcall GetGeoInfoW(long long ptr long long) kernel32.GetGeoInfoW @ stdcall GetLocaleInfoA(long long ptr long) kernel32.GetLocaleInfoA diff --git a/dlls/api-ms-win-core-localization-l1-2-1/api-ms-win-core-localization-l1-2-1.spec b/dlls/api-ms-win-core-localization-l1-2-1/api-ms-win-core-localization-l1-2-1.spec index 50e113e..3a29cb7 100644 --- a/dlls/api-ms-win-core-localization-l1-2-1/api-ms-win-core-localization-l1-2-1.spec +++ b/dlls/api-ms-win-core-localization-l1-2-1/api-ms-win-core-localization-l1-2-1.spec @@ -12,7 +12,7 @@ @ stdcall GetCPInfoExW(long long ptr) kernel32.GetCPInfoExW @ stdcall GetCalendarInfoEx(wstr long ptr long ptr long ptr) kernel32.GetCalendarInfoEx @ stdcall GetCalendarInfoW(long long long ptr long ptr) kernel32.GetCalendarInfoW -@ stub GetFileMUIInfo +@ stdcall GetFileMUIInfo(long wstr ptr ptr) kernel32.GetFileMUIInfo @ stdcall GetFileMUIPath(long wstr wstr ptr ptr ptr ptr) kernel32.GetFileMUIPath @ stdcall GetGeoInfoW(long long ptr long long) kernel32.GetGeoInfoW @ stdcall GetLocaleInfoA(long long ptr long) kernel32.GetLocaleInfoA diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index bb72041..0809761 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -676,7 +676,7 @@ # @ stub GetFileBandwidthReservation @ stdcall GetFileInformationByHandle(long ptr) @ stdcall GetFileInformationByHandleEx(long long ptr long) -# @ stub GetFileMUIInfo +@ stdcall GetFileMUIInfo(long wstr ptr ptr) @ stdcall GetFileMUIPath(long wstr wstr ptr ptr ptr ptr) @ stdcall GetFileSize(long ptr) @ stdcall GetFileSizeEx(long ptr) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 9896872..bcdcdba 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -5315,3 +5315,15 @@ BOOL WINAPI GetFileMUIPath(DWORD flags, PCWSTR filepath, PWSTR language, PULONG return FALSE; } + +/****************************************************************************** + * GetFileMUIInfo (KERNEL32.@) + */ + +BOOL WINAPI GetFileMUIInfo(DWORD flags, PCWSTR path, FILEMUIINFO *info, DWORD *size) +{ + FIXME("stub: %u, %s, %p, %p\n", flags, debugstr_w(path), info, size); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} diff --git a/include/winnls.h b/include/winnls.h index b1ce0cd..7e9bfa5 100644 --- a/include/winnls.h +++ b/include/winnls.h @@ -604,6 +604,22 @@ static const WCHAR LOCALE_NAME_SYSTEM_DEFAULT[] = {'!','s','y','s','-','d','e',' #define MUI_LANGUAGE_INSTALLED 0x20 #define MUI_LANGUAGE_LICENSED 0x40 +typedef struct _FILEMUIINFO { + DWORD dwSize; + DWORD dwVersion; + DWORD dwFileType; + BYTE pChecksum[16]; + BYTE pServiceChecksum[16]; + DWORD dwLanguageNameOffset; + DWORD dwTypeIDMainSize; + DWORD dwTypeIDMainOffset; + DWORD dwTypeNameMainOffset; + DWORD dwTypeIDMUISize; + DWORD dwTypeIDMUIOffset; + DWORD dwTypeNameMUIOffset; + BYTE abBuffer[8]; +} FILEMUIINFO, *PFILEMUIINFO; + /* Types */ @@ -860,6 +876,7 @@ WINBASEAPI INT WINAPI GetDateFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR WINBASEAPI INT WINAPI GetDateFormatEx(LPCWSTR,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,INT,LPCWSTR); WINBASEAPI INT WINAPI GetDateFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,INT); #define GetDateFormat WINELIB_NAME_AW(GetDateFormat) +WINBASEAPI BOOL WINAPI GetFileMUIInfo(DWORD,PCWSTR,PFILEMUIINFO,DWORD*); WINBASEAPI INT WINAPI GetGeoInfoA(GEOID,GEOTYPE,LPSTR,INT,LANGID); WINBASEAPI INT WINAPI GetGeoInfoW(GEOID,GEOTYPE,LPWSTR,INT,LANGID); #define GetGeoInfo WINELIB_NAME_AW(GetGeoInfo)
1
0
0
0
André Hentschel : Add WWn 390
by Jeremy Newman
11 May '15
11 May '15
Module: website Branch: master Commit: 13ca0af3c5283c101ae184b43e2068e64201f422 URL:
http://source.winehq.org/git/website.git/?a=commit;h=13ca0af3c5283c101ae184…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sat May 9 15:38:42 2015 +0200 Add WWn 390 --- news/de/2015050901.xml | 11 + news/en/2015050901.xml | 11 + wwn/en/wn20150509_390.xml | 654 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 676 insertions(+) Diff:
http://source.winehq.org/git/website.git/?a=commitdiff;h=13ca0af3c5283c101a…
1
0
0
0
Nikolay Sivov : po: Update Russian translation.
by Alexandre Julliard
11 May '15
11 May '15
Module: wine Branch: master Commit: 6d323d81b2a604b89c612928a573b290c945df75 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6d323d81b2a604b89c612928a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon May 11 13:41:39 2015 +0300 po: Update Russian translation. --- po/ru.po | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/po/ru.po b/po/ru.po index 988679c..7c80b4a 100644 --- a/po/ru.po +++ b/po/ru.po @@ -8546,7 +8546,7 @@ msgstr "По&вторить" #: user32.rc:88 msgid "&Continue" -msgstr "П&роложить" +msgstr "П&родолжить" #: user32.rc:94 msgid "Select Window" @@ -8565,10 +8565,8 @@ msgid "Duplex:" msgstr "Двухсторонняя печать:" #: wineps.rc:50 -#, fuzzy -#| msgid "&Setup" msgid "Setup" -msgstr "Сво&йства" +msgstr "Настройка" #: wininet.rc:42 wininet.rc:62 msgid "Realm"
1
0
0
0
Alex Henrie : po: Update Catalan translation.
by Alexandre Julliard
11 May '15
11 May '15
Module: wine Branch: master Commit: 4894bfcc068ccf26e72132e7a1a4e433fb2d0c12 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4894bfcc068ccf26e72132e7a…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu May 7 23:56:09 2015 -0600 po: Update Catalan translation. --- po/ca.po | 4818 ++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 2334 insertions(+), 2484 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4894bfcc068ccf26e7213…
1
0
0
0
Nikolay Sivov : shell32: Implement FolderItemVerbs::Item().
by Alexandre Julliard
11 May '15
11 May '15
Module: wine Branch: master Commit: bf41160c656b351a750a9e765b36bbe17276c66c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bf41160c656b351a750a9e765…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 10 22:45:52 2015 +0300 shell32: Implement FolderItemVerbs::Item(). --- dlls/shell32/shelldispatch.c | 100 +++++++++++++++++++++++++++++++------ dlls/shell32/tests/shelldispatch.c | 39 ++++++++++++++- 2 files changed, 121 insertions(+), 18 deletions(-) diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c index 650b7d3..f5eca28 100644 --- a/dlls/shell32/shelldispatch.c +++ b/dlls/shell32/shelldispatch.c @@ -74,13 +74,17 @@ typedef struct { FolderItemVerbs FolderItemVerbs_iface; LONG ref; - IContextMenu *menu; + IContextMenu *contextmenu; + HMENU hMenu; LONG count; } FolderItemVerbsImpl; typedef struct { FolderItemVerb FolderItemVerb_iface; LONG ref; + + IContextMenu *contextmenu; + BSTR name; } FolderItemVerbImpl; static inline ShellDispatch *impl_from_IShellDispatch6(IShellDispatch6 *iface) @@ -209,7 +213,11 @@ static ULONG WINAPI FolderItemVerbImpl_Release(FolderItemVerb *iface) TRACE("(%p), new refcount=%i\n", iface, ref); if (!ref) + { + IContextMenu_Release(This->contextmenu); + SysFreeString(This->name); HeapFree(GetProcessHeap(), 0, This); + } return ref; } @@ -280,8 +288,12 @@ static HRESULT WINAPI FolderItemVerbImpl_get_Parent(FolderItemVerb *iface, IDisp static HRESULT WINAPI FolderItemVerbImpl_get_Name(FolderItemVerb *iface, BSTR *name) { - FIXME("(%p, %p)\n", iface, name); - return E_NOTIMPL; + FolderItemVerbImpl *This = impl_from_FolderItemVerb(iface); + + TRACE("(%p, %p)\n", iface, name); + + *name = SysAllocString(This->name); + return *name ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI FolderItemVerbImpl_DoIt(FolderItemVerb *iface) @@ -304,11 +316,11 @@ static FolderItemVerbVtbl folderitemverbvtbl = { FolderItemVerbImpl_DoIt }; -static HRESULT FolderItemVerb_Constructor(FolderItemVerb **verb) +static HRESULT FolderItemVerb_Constructor(IContextMenu *contextmenu, BSTR name, FolderItemVerb **verb) { FolderItemVerbImpl *This; - *verb = NULL; + TRACE("%p, %s\n", contextmenu, debugstr_w(name)); This = HeapAlloc(GetProcessHeap(), 0, sizeof(FolderItemVerbImpl)); if (!This) @@ -316,6 +328,9 @@ static HRESULT FolderItemVerb_Constructor(FolderItemVerb **verb) This->FolderItemVerb_iface.lpVtbl = &folderitemverbvtbl; This->ref = 1; + This->contextmenu = contextmenu; + IContextMenu_AddRef(contextmenu); + This->name = name; *verb = &This->FolderItemVerb_iface; return S_OK; @@ -365,7 +380,8 @@ static ULONG WINAPI FolderItemVerbsImpl_Release(FolderItemVerbs *iface) if (!ref) { - IContextMenu_Release(This->menu); + IContextMenu_Release(This->contextmenu); + DestroyMenu(This->hMenu); HeapFree(GetProcessHeap(), 0, This); } @@ -430,6 +446,9 @@ static HRESULT WINAPI FolderItemVerbsImpl_get_Count(FolderItemVerbs *iface, LONG TRACE("(%p, %p)\n", iface, count); + if (!count) + return E_INVALIDARG; + *count = This->count; return S_OK; } @@ -448,8 +467,56 @@ static HRESULT WINAPI FolderItemVerbsImpl_get_Parent(FolderItemVerbs *iface, IDi static HRESULT WINAPI FolderItemVerbsImpl_Item(FolderItemVerbs *iface, VARIANT index, FolderItemVerb **verb) { - FIXME("(%p, %s, %p)\n", iface, debugstr_variant(&index), verb); - return FolderItemVerb_Constructor(verb); + FolderItemVerbsImpl *This = impl_from_FolderItemVerbs(iface); + MENUITEMINFOW info; + HRESULT hr; + VARIANT v; + BSTR name; + + TRACE("(%p, %s, %p)\n", iface, debugstr_variant(&index), verb); + + if (!verb) + return E_INVALIDARG; + + *verb = NULL; + + VariantInit(&v); + VariantCopyInd(&v, &index); + + hr = VariantChangeType(&v, &v, 0, VT_I4); + if (FAILED(hr)) + { + FIXME("failed to coerce to VT_I4, %s\n", debugstr_variant(&v)); + return hr; + } + + if (V_I4(&v) > This->count) + return S_OK; + + if (V_I4(&v) == This->count) + name = SysAllocStringLen(NULL, 0); + else + { + /* get item name */ + memset(&info, 0, sizeof(info)); + info.cbSize = sizeof(info); + info.fMask = MIIM_STRING; + if (!GetMenuItemInfoW(This->hMenu, V_I4(&v), TRUE, &info)) + return E_FAIL; + + name = SysAllocStringLen(NULL, info.cch); + if (name) + { + info.dwTypeData = name; + info.cch++; + GetMenuItemInfoW(This->hMenu, V_I4(&v), TRUE, &info); + } + } + + if (!name) + return E_OUTOFMEMORY; + + return FolderItemVerb_Constructor(This->contextmenu, name, verb); } static HRESULT WINAPI FolderItemVerbsImpl__NewEnum(FolderItemVerbs *iface, IUnknown **ret) @@ -480,7 +547,6 @@ static HRESULT FolderItemVerbs_Constructor(BSTR path, FolderItemVerbs **verbs) LPCITEMIDLIST child; LPITEMIDLIST pidl; HRESULT hr; - HMENU menu; This = HeapAlloc(GetProcessHeap(), 0, sizeof(FolderItemVerbsImpl)); if (!This) @@ -488,7 +554,6 @@ static HRESULT FolderItemVerbs_Constructor(BSTR path, FolderItemVerbs **verbs) This->FolderItemVerbs_iface.lpVtbl = &folderitemverbsvtbl; This->ref = 1; - This->count = 0; /* build context menu for this path */ hr = SHParseDisplayName(path, NULL, &pidl, 0, NULL); @@ -500,17 +565,20 @@ static HRESULT FolderItemVerbs_Constructor(BSTR path, FolderItemVerbs **verbs) if (FAILED(hr)) goto failed; - hr = IShellFolder_GetUIObjectOf(folder, NULL, 1, &child, &IID_IContextMenu, NULL, (void**)&This->menu); + hr = IShellFolder_GetUIObjectOf(folder, NULL, 1, &child, &IID_IContextMenu, NULL, (void**)&This->contextmenu); IShellFolder_Release(folder); if (FAILED(hr)) goto failed; - menu = CreatePopupMenu(); - hr = IContextMenu_QueryContextMenu(This->menu, menu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, CMF_NORMAL); - if (SUCCEEDED(hr)) - This->count = GetMenuItemCount(menu); - DestroyMenu(menu); + This->hMenu = CreatePopupMenu(); + hr = IContextMenu_QueryContextMenu(This->contextmenu, This->hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, CMF_NORMAL); + if (FAILED(hr)) + { + FolderItemVerbs_Release(&This->FolderItemVerbs_iface); + return hr; + } + This->count = GetMenuItemCount(This->hMenu); *verbs = &This->FolderItemVerbs_iface; return S_OK; diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index 167972b..f9d92ee 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -747,13 +747,15 @@ static void test_Verbs(void) { FolderItemVerbs *verbs; WCHAR pathW[MAX_PATH]; + FolderItemVerb *verb; IShellDispatch *sd; FolderItem *item; Folder2 *folder2; Folder *folder; HRESULT hr; - LONG count; + LONG count, i; VARIANT v; + BSTR str; hr = CoCreateInstance(&CLSID_Shell, NULL, CLSCTX_INPROC_SERVER, &IID_IShellDispatch, (void**)&sd); @@ -778,15 +780,48 @@ if (0) { /* crashes on some systems */ hr = FolderItem_Verbs(item, NULL); ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); } - hr = FolderItem_Verbs(item, &verbs); ok(hr == S_OK, "got 0x%08x\n", hr); +if (0) { /* crashes on winxp/win2k3 */ + hr = FolderItemVerbs_get_Count(verbs, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); +} count = 0; hr = FolderItemVerbs_get_Count(verbs, &count); ok(hr == S_OK, "got 0x%08x\n", hr); ok(count > 0, "got count %d\n", count); +if (0) { /* crashes on winxp/win2k3 */ + V_VT(&v) = VT_I4; + V_I4(&v) = 0; + hr = FolderItemVerbs_Item(verbs, v, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); +} + /* there's always one item more, so you can access [0,count], + instead of actual [0,count) */ + for (i = 0; i <= count; i++) { + V_VT(&v) = VT_I4; + V_I4(&v) = i; + hr = FolderItemVerbs_Item(verbs, v, &verb); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = FolderItemVerb_get_Name(verb, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(str != NULL, "%d: name %s\n", i, wine_dbgstr_w(str)); + if (i == count) + ok(str[0] == 0, "%d: got teminating item %s\n", i, wine_dbgstr_w(str)); + + SysFreeString(str); + FolderItemVerb_Release(verb); + } + + V_VT(&v) = VT_I4; + V_I4(&v) = count+1; + verb = NULL; + hr = FolderItemVerbs_Item(verbs, v, &verb); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(verb == NULL, "got %p\n", verb); + FolderItem_Release(item); IShellDispatch_Release(sd); }
1
0
0
0
Nikolay Sivov : shell32: Added FolderItemVerb stub.
by Alexandre Julliard
11 May '15
11 May '15
Module: wine Branch: master Commit: 8f72117f19d8966b2543897df243474e6dda0aed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f72117f19d8966b2543897df…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 10 21:37:00 2015 +0300 shell32: Added FolderItemVerb stub. --- dlls/shell32/shell32_main.h | 1 + dlls/shell32/shelldispatch.c | 168 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 168 insertions(+), 1 deletion(-) diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h index 938387b..492f79f 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h @@ -235,6 +235,7 @@ enum tid_t { IShellFolderViewDual3_tid, Folder3_tid, FolderItem2_tid, + FolderItemVerb_tid, FolderItemVerbs_tid, LAST_tid }; diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c index 66603ad..650b7d3 100644 --- a/dlls/shell32/shelldispatch.c +++ b/dlls/shell32/shelldispatch.c @@ -48,6 +48,7 @@ static const IID * const tid_ids[] = &IID_IShellFolderViewDual3, &IID_Folder3, &IID_FolderItem2, + &IID_FolderItemVerb, &IID_FolderItemVerbs }; static ITypeInfo *typeinfos[LAST_tid]; @@ -77,6 +78,11 @@ typedef struct { LONG count; } FolderItemVerbsImpl; +typedef struct { + FolderItemVerb FolderItemVerb_iface; + LONG ref; +} FolderItemVerbImpl; + static inline ShellDispatch *impl_from_IShellDispatch6(IShellDispatch6 *iface) { return CONTAINING_RECORD(iface, ShellDispatch, IShellDispatch6_iface); @@ -97,6 +103,11 @@ static inline FolderItemVerbsImpl *impl_from_FolderItemVerbs(FolderItemVerbs *if return CONTAINING_RECORD(iface, FolderItemVerbsImpl, FolderItemVerbs_iface); } +static inline FolderItemVerbImpl *impl_from_FolderItemVerb(FolderItemVerb *iface) +{ + return CONTAINING_RECORD(iface, FolderItemVerbImpl, FolderItemVerb_iface); +} + static HRESULT load_typelib(void) { ITypeLib *tl; @@ -155,6 +166,161 @@ HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo) return S_OK; } +/* FolderItemVerb */ +static HRESULT WINAPI FolderItemVerbImpl_QueryInterface(FolderItemVerb *iface, + REFIID riid, void **ppv) +{ + FolderItemVerbImpl *This = impl_from_FolderItemVerb(iface); + + TRACE("(%p,%p,%p)\n", iface, riid, ppv); + + *ppv = NULL; + + if (IsEqualIID(&IID_IUnknown, riid) || + IsEqualIID(&IID_IDispatch, riid) || + IsEqualIID(&IID_FolderItemVerb, riid)) + *ppv = &This->FolderItemVerb_iface; + else + { + FIXME("not implemented for %s\n", shdebugstr_guid(riid)); + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI FolderItemVerbImpl_AddRef(FolderItemVerb *iface) +{ + FolderItemVerbImpl *This = impl_from_FolderItemVerb(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p), new refcount=%i\n", iface, ref); + + return ref; +} + +static ULONG WINAPI FolderItemVerbImpl_Release(FolderItemVerb *iface) +{ + FolderItemVerbImpl *This = impl_from_FolderItemVerb(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p), new refcount=%i\n", iface, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +static HRESULT WINAPI FolderItemVerbImpl_GetTypeInfoCount(FolderItemVerb *iface, UINT *pctinfo) +{ + TRACE("(%p,%p)\n", iface, pctinfo); + *pctinfo = 1; + return S_OK; +} + +static HRESULT WINAPI FolderItemVerbImpl_GetTypeInfo(FolderItemVerb *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + HRESULT hr; + + TRACE("(%p,%u,%d,%p)\n", iface, iTInfo, lcid, ppTInfo); + + hr = get_typeinfo(FolderItemVerb_tid, ppTInfo); + if (SUCCEEDED(hr)) + ITypeInfo_AddRef(*ppTInfo); + return hr; +} + +static HRESULT WINAPI FolderItemVerbImpl_GetIDsOfNames(FolderItemVerb *iface, + REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) +{ + ITypeInfo *ti; + HRESULT hr; + + TRACE("(%p,%p,%p,%u,%d,%p)\n", iface, riid, rgszNames, cNames, lcid, + rgDispId); + + hr = get_typeinfo(FolderItemVerb_tid, &ti); + if (SUCCEEDED(hr)) + hr = ITypeInfo_GetIDsOfNames(ti, rgszNames, cNames, rgDispId); + return hr; +} + +static HRESULT WINAPI FolderItemVerbImpl_Invoke(FolderItemVerb *iface, + DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, + DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, + UINT *puArgErr) +{ + ITypeInfo *ti; + HRESULT hr; + + TRACE("(%p,%d,%p,%d,%u,%p,%p,%p,%p)\n", iface, dispIdMember, riid, lcid, + wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + + hr = get_typeinfo(FolderItemVerb_tid, &ti); + if (SUCCEEDED(hr)) + hr = ITypeInfo_Invoke(ti, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + return hr; +} + +static HRESULT WINAPI FolderItemVerbImpl_get_Application(FolderItemVerb *iface, IDispatch **disp) +{ + FIXME("(%p, %p)\n", iface, disp); + return E_NOTIMPL; +} + +static HRESULT WINAPI FolderItemVerbImpl_get_Parent(FolderItemVerb *iface, IDispatch **disp) +{ + FIXME("(%p, %p)\n", iface, disp); + return E_NOTIMPL; +} + +static HRESULT WINAPI FolderItemVerbImpl_get_Name(FolderItemVerb *iface, BSTR *name) +{ + FIXME("(%p, %p)\n", iface, name); + return E_NOTIMPL; +} + +static HRESULT WINAPI FolderItemVerbImpl_DoIt(FolderItemVerb *iface) +{ + FIXME("(%p)\n", iface); + return E_NOTIMPL; +} + +static FolderItemVerbVtbl folderitemverbvtbl = { + FolderItemVerbImpl_QueryInterface, + FolderItemVerbImpl_AddRef, + FolderItemVerbImpl_Release, + FolderItemVerbImpl_GetTypeInfoCount, + FolderItemVerbImpl_GetTypeInfo, + FolderItemVerbImpl_GetIDsOfNames, + FolderItemVerbImpl_Invoke, + FolderItemVerbImpl_get_Application, + FolderItemVerbImpl_get_Parent, + FolderItemVerbImpl_get_Name, + FolderItemVerbImpl_DoIt +}; + +static HRESULT FolderItemVerb_Constructor(FolderItemVerb **verb) +{ + FolderItemVerbImpl *This; + + *verb = NULL; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(FolderItemVerbImpl)); + if (!This) + return E_OUTOFMEMORY; + + This->FolderItemVerb_iface.lpVtbl = &folderitemverbvtbl; + This->ref = 1; + + *verb = &This->FolderItemVerb_iface; + return S_OK; +} + /* FolderItemVerbs */ static HRESULT WINAPI FolderItemVerbsImpl_QueryInterface(FolderItemVerbs *iface, REFIID riid, void **ppv) @@ -283,7 +449,7 @@ static HRESULT WINAPI FolderItemVerbsImpl_get_Parent(FolderItemVerbs *iface, IDi static HRESULT WINAPI FolderItemVerbsImpl_Item(FolderItemVerbs *iface, VARIANT index, FolderItemVerb **verb) { FIXME("(%p, %s, %p)\n", iface, debugstr_variant(&index), verb); - return E_NOTIMPL; + return FolderItemVerb_Constructor(verb); } static HRESULT WINAPI FolderItemVerbsImpl__NewEnum(FolderItemVerbs *iface, IUnknown **ret)
1
0
0
0
Nikolay Sivov : shell32: Implement FolderItemVerbs_get_Count().
by Alexandre Julliard
11 May '15
11 May '15
Module: wine Branch: master Commit: 77c2892d87cef744203d9fc6ef4b8b16e331dd14 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77c2892d87cef744203d9fc6e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 10 21:34:58 2015 +0300 shell32: Implement FolderItemVerbs_get_Count(). --- dlls/shell32/shelldispatch.c | 62 ++++++++++++++++++++++++++++++++++---- dlls/shell32/tests/shelldispatch.c | 2 -- 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c index 2b4342f..66603ad 100644 --- a/dlls/shell32/shelldispatch.c +++ b/dlls/shell32/shelldispatch.c @@ -72,6 +72,9 @@ typedef struct { typedef struct { FolderItemVerbs FolderItemVerbs_iface; LONG ref; + + IContextMenu *menu; + LONG count; } FolderItemVerbsImpl; static inline ShellDispatch *impl_from_IShellDispatch6(IShellDispatch6 *iface) @@ -195,7 +198,10 @@ static ULONG WINAPI FolderItemVerbsImpl_Release(FolderItemVerbs *iface) TRACE("(%p), new refcount=%i\n", iface, ref); if (!ref) + { + IContextMenu_Release(This->menu); HeapFree(GetProcessHeap(), 0, This); + } return ref; } @@ -254,8 +260,12 @@ static HRESULT WINAPI FolderItemVerbsImpl_Invoke(FolderItemVerbs *iface, static HRESULT WINAPI FolderItemVerbsImpl_get_Count(FolderItemVerbs *iface, LONG *count) { - FIXME("(%p, %p)\n", iface, count); - return E_NOTIMPL; + FolderItemVerbsImpl *This = impl_from_FolderItemVerbs(iface); + + TRACE("(%p, %p)\n", iface, count); + + *count = This->count; + return S_OK; } static HRESULT WINAPI FolderItemVerbsImpl_get_Application(FolderItemVerbs *iface, IDispatch **disp) @@ -297,11 +307,14 @@ static FolderItemVerbsVtbl folderitemverbsvtbl = { FolderItemVerbsImpl__NewEnum }; -static HRESULT FolderItemVerbs_Constructor(FolderItemVerbs **verbs) +static HRESULT FolderItemVerbs_Constructor(BSTR path, FolderItemVerbs **verbs) { FolderItemVerbsImpl *This; - - *verbs = NULL; + IShellFolder *folder; + LPCITEMIDLIST child; + LPITEMIDLIST pidl; + HRESULT hr; + HMENU menu; This = HeapAlloc(GetProcessHeap(), 0, sizeof(FolderItemVerbsImpl)); if (!This) @@ -309,9 +322,35 @@ static HRESULT FolderItemVerbs_Constructor(FolderItemVerbs **verbs) This->FolderItemVerbs_iface.lpVtbl = &folderitemverbsvtbl; This->ref = 1; + This->count = 0; + + /* build context menu for this path */ + hr = SHParseDisplayName(path, NULL, &pidl, 0, NULL); + if (FAILED(hr)) + goto failed; + + hr = SHBindToParent(pidl, &IID_IShellFolder, (void**)&folder, &child); + CoTaskMemFree(pidl); + if (FAILED(hr)) + goto failed; + + hr = IShellFolder_GetUIObjectOf(folder, NULL, 1, &child, &IID_IContextMenu, NULL, (void**)&This->menu); + IShellFolder_Release(folder); + if (FAILED(hr)) + goto failed; + + menu = CreatePopupMenu(); + hr = IContextMenu_QueryContextMenu(This->menu, menu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, CMF_NORMAL); + if (SUCCEEDED(hr)) + This->count = GetMenuItemCount(menu); + DestroyMenu(menu); *verbs = &This->FolderItemVerbs_iface; return S_OK; + +failed: + HeapFree(GetProcessHeap(), 0, This); + return hr; } static HRESULT WINAPI FolderItemImpl_QueryInterface(FolderItem2 *iface, @@ -570,12 +609,23 @@ static HRESULT WINAPI FolderItemImpl_get_Type(FolderItem2 *iface, BSTR *pbs) static HRESULT WINAPI FolderItemImpl_Verbs(FolderItem2 *iface, FolderItemVerbs **verbs) { + HRESULT hr; + BSTR path; + TRACE("(%p, %p)\n", iface, verbs); if (!verbs) return E_INVALIDARG; - return FolderItemVerbs_Constructor(verbs); + *verbs = NULL; + + hr = FolderItem2_get_Path(iface, &path); + if (FAILED(hr)) + return hr; + + hr = FolderItemVerbs_Constructor(path, verbs); + SysFreeString(path); + return hr; } static HRESULT WINAPI FolderItemImpl_InvokeVerb(FolderItem2 *iface, diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index 4295311..167972b 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -784,10 +784,8 @@ if (0) { /* crashes on some systems */ count = 0; hr = FolderItemVerbs_get_Count(verbs, &count); -todo_wine { ok(hr == S_OK, "got 0x%08x\n", hr); ok(count > 0, "got count %d\n", count); -} FolderItem_Release(item); IShellDispatch_Release(sd);
1
0
0
0
Nikolay Sivov : shell32: Added FolderItemVerbs stub.
by Alexandre Julliard
11 May '15
11 May '15
Module: wine Branch: master Commit: 540171bc91908a4d059a1038662111340ca49586 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=540171bc91908a4d059a10386…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 10 21:02:55 2015 +0300 shell32: Added FolderItemVerbs stub. --- dlls/shell32/shell32_main.h | 1 + dlls/shell32/shelldispatch.c | 186 +++++++++++++++++++++++++++++++++++-- dlls/shell32/tests/shelldispatch.c | 51 ++++++++++ 3 files changed, 232 insertions(+), 6 deletions(-) diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h index 18503eb..938387b 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h @@ -235,6 +235,7 @@ enum tid_t { IShellFolderViewDual3_tid, Folder3_tid, FolderItem2_tid, + FolderItemVerbs_tid, LAST_tid }; diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c index 6e13123..2b4342f 100644 --- a/dlls/shell32/shelldispatch.c +++ b/dlls/shell32/shelldispatch.c @@ -47,7 +47,8 @@ static const IID * const tid_ids[] = &IID_IShellDispatch6, &IID_IShellFolderViewDual3, &IID_Folder3, - &IID_FolderItem2 + &IID_FolderItem2, + &IID_FolderItemVerbs }; static ITypeInfo *typeinfos[LAST_tid]; @@ -68,6 +69,11 @@ typedef struct { VARIANT dir; } FolderItemImpl; +typedef struct { + FolderItemVerbs FolderItemVerbs_iface; + LONG ref; +} FolderItemVerbsImpl; + static inline ShellDispatch *impl_from_IShellDispatch6(IShellDispatch6 *iface) { return CONTAINING_RECORD(iface, ShellDispatch, IShellDispatch6_iface); @@ -83,6 +89,11 @@ static inline FolderItemImpl *impl_from_FolderItem(FolderItem2 *iface) return CONTAINING_RECORD(iface, FolderItemImpl, FolderItem2_iface); } +static inline FolderItemVerbsImpl *impl_from_FolderItemVerbs(FolderItemVerbs *iface) +{ + return CONTAINING_RECORD(iface, FolderItemVerbsImpl, FolderItemVerbs_iface); +} + static HRESULT load_typelib(void) { ITypeLib *tl; @@ -141,6 +152,168 @@ HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo) return S_OK; } +/* FolderItemVerbs */ +static HRESULT WINAPI FolderItemVerbsImpl_QueryInterface(FolderItemVerbs *iface, + REFIID riid, void **ppv) +{ + FolderItemVerbsImpl *This = impl_from_FolderItemVerbs(iface); + + TRACE("(%p,%p,%p)\n", iface, riid, ppv); + + *ppv = NULL; + + if (IsEqualIID(&IID_IUnknown, riid) || + IsEqualIID(&IID_IDispatch, riid) || + IsEqualIID(&IID_FolderItemVerbs, riid)) + *ppv = &This->FolderItemVerbs_iface; + else + { + FIXME("not implemented for %s\n", shdebugstr_guid(riid)); + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI FolderItemVerbsImpl_AddRef(FolderItemVerbs *iface) +{ + FolderItemVerbsImpl *This = impl_from_FolderItemVerbs(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p), new refcount=%i\n", iface, ref); + + return ref; +} + +static ULONG WINAPI FolderItemVerbsImpl_Release(FolderItemVerbs *iface) +{ + FolderItemVerbsImpl *This = impl_from_FolderItemVerbs(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p), new refcount=%i\n", iface, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +static HRESULT WINAPI FolderItemVerbsImpl_GetTypeInfoCount(FolderItemVerbs *iface, UINT *pctinfo) +{ + TRACE("(%p,%p)\n", iface, pctinfo); + *pctinfo = 1; + return S_OK; +} + +static HRESULT WINAPI FolderItemVerbsImpl_GetTypeInfo(FolderItemVerbs *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + HRESULT hr; + + TRACE("(%p,%u,%d,%p)\n", iface, iTInfo, lcid, ppTInfo); + + hr = get_typeinfo(FolderItemVerbs_tid, ppTInfo); + if (SUCCEEDED(hr)) + ITypeInfo_AddRef(*ppTInfo); + return hr; +} + +static HRESULT WINAPI FolderItemVerbsImpl_GetIDsOfNames(FolderItemVerbs *iface, + REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) +{ + ITypeInfo *ti; + HRESULT hr; + + TRACE("(%p,%p,%p,%u,%d,%p)\n", iface, riid, rgszNames, cNames, lcid, + rgDispId); + + hr = get_typeinfo(FolderItemVerbs_tid, &ti); + if (SUCCEEDED(hr)) + hr = ITypeInfo_GetIDsOfNames(ti, rgszNames, cNames, rgDispId); + return hr; +} + +static HRESULT WINAPI FolderItemVerbsImpl_Invoke(FolderItemVerbs *iface, + DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, + DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, + UINT *puArgErr) +{ + ITypeInfo *ti; + HRESULT hr; + + TRACE("(%p,%d,%p,%d,%u,%p,%p,%p,%p)\n", iface, dispIdMember, riid, lcid, + wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + + hr = get_typeinfo(FolderItemVerbs_tid, &ti); + if (SUCCEEDED(hr)) + hr = ITypeInfo_Invoke(ti, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + return hr; +} + +static HRESULT WINAPI FolderItemVerbsImpl_get_Count(FolderItemVerbs *iface, LONG *count) +{ + FIXME("(%p, %p)\n", iface, count); + return E_NOTIMPL; +} + +static HRESULT WINAPI FolderItemVerbsImpl_get_Application(FolderItemVerbs *iface, IDispatch **disp) +{ + FIXME("(%p, %p)\n", iface, disp); + return E_NOTIMPL; +} + +static HRESULT WINAPI FolderItemVerbsImpl_get_Parent(FolderItemVerbs *iface, IDispatch **disp) +{ + FIXME("(%p, %p)\n", iface, disp); + return E_NOTIMPL; +} + +static HRESULT WINAPI FolderItemVerbsImpl_Item(FolderItemVerbs *iface, VARIANT index, FolderItemVerb **verb) +{ + FIXME("(%p, %s, %p)\n", iface, debugstr_variant(&index), verb); + return E_NOTIMPL; +} + +static HRESULT WINAPI FolderItemVerbsImpl__NewEnum(FolderItemVerbs *iface, IUnknown **ret) +{ + FIXME("(%p, %p)\n", iface, ret); + return E_NOTIMPL; +} + +static FolderItemVerbsVtbl folderitemverbsvtbl = { + FolderItemVerbsImpl_QueryInterface, + FolderItemVerbsImpl_AddRef, + FolderItemVerbsImpl_Release, + FolderItemVerbsImpl_GetTypeInfoCount, + FolderItemVerbsImpl_GetTypeInfo, + FolderItemVerbsImpl_GetIDsOfNames, + FolderItemVerbsImpl_Invoke, + FolderItemVerbsImpl_get_Count, + FolderItemVerbsImpl_get_Application, + FolderItemVerbsImpl_get_Parent, + FolderItemVerbsImpl_Item, + FolderItemVerbsImpl__NewEnum +}; + +static HRESULT FolderItemVerbs_Constructor(FolderItemVerbs **verbs) +{ + FolderItemVerbsImpl *This; + + *verbs = NULL; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(FolderItemVerbsImpl)); + if (!This) + return E_OUTOFMEMORY; + + This->FolderItemVerbs_iface.lpVtbl = &folderitemverbsvtbl; + This->ref = 1; + + *verbs = &This->FolderItemVerbs_iface; + return S_OK; +} + static HRESULT WINAPI FolderItemImpl_QueryInterface(FolderItem2 *iface, REFIID riid, LPVOID *ppv) { @@ -395,13 +568,14 @@ static HRESULT WINAPI FolderItemImpl_get_Type(FolderItem2 *iface, BSTR *pbs) return E_NOTIMPL; } -static HRESULT WINAPI FolderItemImpl_Verbs(FolderItem2 *iface, - FolderItemVerbs **ppfic) +static HRESULT WINAPI FolderItemImpl_Verbs(FolderItem2 *iface, FolderItemVerbs **verbs) { - FIXME("(%p,%p)\n", iface, ppfic); + TRACE("(%p, %p)\n", iface, verbs); - *ppfic = NULL; - return E_NOTIMPL; + if (!verbs) + return E_INVALIDARG; + + return FolderItemVerbs_Constructor(verbs); } static HRESULT WINAPI FolderItemImpl_InvokeVerb(FolderItem2 *iface, diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index 851d775..4295311 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -743,6 +743,56 @@ static void test_ParseName(void) IShellDispatch_Release(sd); } +static void test_Verbs(void) +{ + FolderItemVerbs *verbs; + WCHAR pathW[MAX_PATH]; + IShellDispatch *sd; + FolderItem *item; + Folder2 *folder2; + Folder *folder; + HRESULT hr; + LONG count; + VARIANT v; + + hr = CoCreateInstance(&CLSID_Shell, NULL, CLSCTX_INPROC_SERVER, + &IID_IShellDispatch, (void**)&sd); + ok(hr == S_OK, "got 0x%08x\n", hr); + + GetTempPathW(sizeof(pathW)/sizeof(pathW[0]), pathW); + V_VT(&v) = VT_BSTR; + V_BSTR(&v) = SysAllocString(pathW); + hr = IShellDispatch_NameSpace(sd, v, &folder); + ok(hr == S_OK, "got 0x%08x\n", hr); + VariantClear(&v); + + hr = Folder_QueryInterface(folder, &IID_Folder2, (void**)&folder2); + ok(hr == S_OK, "got 0x%08x\n", hr); + Folder_Release(folder); + + hr = Folder2_get_Self(folder2, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + Folder2_Release(folder2); + +if (0) { /* crashes on some systems */ + hr = FolderItem_Verbs(item, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); +} + + hr = FolderItem_Verbs(item, &verbs); + ok(hr == S_OK, "got 0x%08x\n", hr); + + count = 0; + hr = FolderItemVerbs_get_Count(verbs, &count); +todo_wine { + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(count > 0, "got count %d\n", count); +} + + FolderItem_Release(item); + IShellDispatch_Release(sd); +} + START_TEST(shelldispatch) { HRESULT r; @@ -758,6 +808,7 @@ START_TEST(shelldispatch) test_ShellFolderViewDual(); test_ShellWindows(); test_ParseName(); + test_Verbs(); CoUninitialize(); }
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
43
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
Results per page:
10
25
50
100
200