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
January 2012
----- 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
972 discussions
Start a n
N
ew thread
Nikolay Sivov : wshom.ocx: Implement IWshShortcut_put_WorkingDirectory().
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 033c18fce9efe649e201a5afc01b6af641cfbd86 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=033c18fce9efe649e201a5afc…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jan 2 15:11:15 2012 +0300 wshom.ocx: Implement IWshShortcut_put_WorkingDirectory(). --- dlls/wshom.ocx/shell.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 0ab5080..7686284 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -490,8 +490,8 @@ static HRESULT WINAPI WshShortcut_get_WorkingDirectory(IWshShortcut *iface, BSTR static HRESULT WINAPI WshShortcut_put_WorkingDirectory(IWshShortcut *iface, BSTR WorkingDirectory) { WshShortcut *This = impl_from_IWshShortcut(iface); - FIXME("(%p)->(%s): stub\n", This, debugstr_w(WorkingDirectory)); - return E_NOTIMPL; + TRACE("(%p)->(%s): stub\n", This, debugstr_w(WorkingDirectory)); + return IShellLinkW_SetWorkingDirectory(This->link, WorkingDirectory); } static HRESULT WINAPI WshShortcut_Load(IWshShortcut *iface, BSTR PathLink)
1
0
0
0
Nikolay Sivov : wshom.ocx: Implement IWshShortcut_put_Description().
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 9e7c1bd163cda52eda9627c6e4955ba4c7065f90 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e7c1bd163cda52eda9627c6e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jan 2 15:10:43 2012 +0300 wshom.ocx: Implement IWshShortcut_put_Description(). --- dlls/wshom.ocx/shell.c | 27 +++++++++++++++++++++++---- 1 files changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 949707d..0ab5080 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -70,6 +70,9 @@ typedef struct { IWshShortcut IWshShortcut_iface; LONG ref; + + IShellLinkW *link; + BSTR path_link; } WshShortcut; static inline WshCollection *impl_from_IWshCollection( IWshCollection *iface ) @@ -315,7 +318,11 @@ static ULONG WINAPI WshShortcut_Release(IWshShortcut *iface) TRACE("(%p) ref = %d\n", This, ref); if (!ref) + { + SysFreeString(This->path_link); + IShellLinkW_Release(This->link); HeapFree(GetProcessHeap(), 0, This); + } return ref; } @@ -406,8 +413,8 @@ static HRESULT WINAPI WshShortcut_get_Description(IWshShortcut *iface, BSTR *Des static HRESULT WINAPI WshShortcut_put_Description(IWshShortcut *iface, BSTR Description) { WshShortcut *This = impl_from_IWshShortcut(iface); - FIXME("(%p)->(%s): stub\n", This, debugstr_w(Description)); - return E_NOTIMPL; + TRACE("(%p)->(%s)\n", This, debugstr_w(Description)); + return IShellLinkW_SetDescription(This->link, Description); } static HRESULT WINAPI WshShortcut_get_Hotkey(IWshShortcut *iface, BSTR *Hotkey) @@ -529,9 +536,12 @@ static const IWshShortcutVtbl WshShortcutVtbl = { WshShortcut_Save }; -static HRESULT WshShortcut_Create(IDispatch **shortcut) +static HRESULT WshShortcut_Create(const WCHAR *path, IDispatch **shortcut) { WshShortcut *This; + HRESULT hr; + + *shortcut = NULL; This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); if (!This) return E_OUTOFMEMORY; @@ -539,6 +549,15 @@ static HRESULT WshShortcut_Create(IDispatch **shortcut) This->IWshShortcut_iface.lpVtbl = &WshShortcutVtbl; This->ref = 1; + hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + &IID_IShellLinkW, (void**)&This->link); + if (FAILED(hr)) + { + HeapFree(GetProcessHeap(), 0, This); + return hr; + } + + This->path_link = SysAllocString(path); *shortcut = (IDispatch*)&This->IWshShortcut_iface; return S_OK; @@ -654,7 +673,7 @@ static HRESULT WINAPI WshShell3_Popup(IWshShell3 *iface, BSTR Text, VARIANT* Sec static HRESULT WINAPI WshShell3_CreateShortcut(IWshShell3 *iface, BSTR PathLink, IDispatch** Shortcut) { TRACE("(%s %p)\n", debugstr_w(PathLink), Shortcut); - return WshShortcut_Create(Shortcut); + return WshShortcut_Create(PathLink, Shortcut); } static HRESULT WINAPI WshShell3_ExpandEnvironmentStrings(IWshShell3 *iface, BSTR Src, BSTR* out_Dst)
1
0
0
0
Nikolay Sivov : wshom.ocx: Added IWshShortcut stub.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 23fe903d9aded30f4f94165c1a212969ff32af88 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23fe903d9aded30f4f94165c1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jan 2 15:09:52 2012 +0300 wshom.ocx: Added IWshShortcut stub. --- dlls/wshom.ocx/shell.c | 285 +++++++++++++++++++++++++++++++++++++++- dlls/wshom.ocx/tests/wshom.c | 17 ++- dlls/wshom.ocx/tests/wshom.idl | 62 +++++++++ dlls/wshom.ocx/wshom.idl | 62 +++++++++ dlls/wshom.ocx/wshom_main.c | 3 +- dlls/wshom.ocx/wshom_private.h | 1 + 6 files changed, 422 insertions(+), 8 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=23fe903d9aded30f4f941…
1
0
0
0
Nikolay Sivov : wshom.ocx: Implement IWshCollection::Item() for common programs folders.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 7f2d4f2933345aeac7d5c5d419bc5ed6610fe28a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f2d4f2933345aeac7d5c5d41…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Dec 31 00:56:37 2011 +0300 wshom.ocx: Implement IWshCollection::Item() for common programs folders. --- dlls/wshom.ocx/shell.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index bd5cb26..c2959e7 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -171,6 +171,7 @@ static HRESULT WINAPI WshCollection_Item(IWshCollection *iface, VARIANT *index, { WshCollection *This = impl_from_IWshCollection(iface); static const WCHAR allusersdesktopW[] = {'A','l','l','U','s','e','r','s','D','e','s','k','t','o','p',0}; + static const WCHAR allusersprogramsW[] = {'A','l','l','U','s','e','r','s','P','r','o','g','r','a','m','s',0}; static const WCHAR desktopW[] = {'D','e','s','k','t','o','p',0}; PIDLIST_ABSOLUTE pidl; WCHAR pathW[MAX_PATH]; @@ -191,6 +192,8 @@ static HRESULT WINAPI WshCollection_Item(IWshCollection *iface, VARIANT *index, kind = CSIDL_DESKTOP; else if (!strcmpiW(folder, allusersdesktopW)) kind = CSIDL_COMMON_DESKTOPDIRECTORY; + else if (!strcmpiW(folder, allusersprogramsW)) + kind = CSIDL_COMMON_PROGRAMS; else { FIXME("folder kind %s not supported\n", debugstr_w(folder));
1
0
0
0
Nikolay Sivov : wshom.ocx: Implement IWshCollection::Item() for public desktop case.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: aa707ec270b825e7bee24f94ed1c63c6a01f36ac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa707ec270b825e7bee24f94e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Dec 31 00:51:30 2011 +0300 wshom.ocx: Implement IWshCollection::Item() for public desktop case. --- dlls/wshom.ocx/shell.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 2bd6a08..bd5cb26 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -170,6 +170,7 @@ static HRESULT WINAPI WshCollection_Invoke(IWshCollection *iface, DISPID dispIdM static HRESULT WINAPI WshCollection_Item(IWshCollection *iface, VARIANT *index, VARIANT *value) { WshCollection *This = impl_from_IWshCollection(iface); + static const WCHAR allusersdesktopW[] = {'A','l','l','U','s','e','r','s','D','e','s','k','t','o','p',0}; static const WCHAR desktopW[] = {'D','e','s','k','t','o','p',0}; PIDLIST_ABSOLUTE pidl; WCHAR pathW[MAX_PATH]; @@ -188,6 +189,8 @@ static HRESULT WINAPI WshCollection_Item(IWshCollection *iface, VARIANT *index, folder = V_BSTR(index); if (!strcmpiW(folder, desktopW)) kind = CSIDL_DESKTOP; + else if (!strcmpiW(folder, allusersdesktopW)) + kind = CSIDL_COMMON_DESKTOPDIRECTORY; else { FIXME("folder kind %s not supported\n", debugstr_w(folder));
1
0
0
0
Nikolay Sivov : wshom.ocx: Implement IWshCollection::Item() for Desktop folder case.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 4a068c64d041cbdc11bd2a7ba44c67f5f6ec460e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4a068c64d041cbdc11bd2a7ba…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Dec 31 00:46:43 2011 +0300 wshom.ocx: Implement IWshCollection::Item() for Desktop folder case. --- dlls/wshom.ocx/Makefile.in | 2 +- dlls/wshom.ocx/shell.c | 44 ++++++++++++++++++++++++++++++++++++- dlls/wshom.ocx/tests/Makefile.in | 2 +- dlls/wshom.ocx/tests/wshom.c | 32 +++++++++++++++++++++++++- 4 files changed, 74 insertions(+), 6 deletions(-) diff --git a/dlls/wshom.ocx/Makefile.in b/dlls/wshom.ocx/Makefile.in index 385fe73..6635e5d 100644 --- a/dlls/wshom.ocx/Makefile.in +++ b/dlls/wshom.ocx/Makefile.in @@ -1,5 +1,5 @@ MODULE = wshom.ocx -IMPORTS = uuid oleaut32 +IMPORTS = uuid oleaut32 ole32 shell32 C_SRCS = \ shell.c \ diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 525ee7f..2bd6a08 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -19,7 +19,10 @@ #include "wshom_private.h" #include "wshom.h" +#include "shlobj.h" + #include "wine/debug.h" +#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(wshom); @@ -167,8 +170,45 @@ static HRESULT WINAPI WshCollection_Invoke(IWshCollection *iface, DISPID dispIdM static HRESULT WINAPI WshCollection_Item(IWshCollection *iface, VARIANT *index, VARIANT *value) { WshCollection *This = impl_from_IWshCollection(iface); - FIXME("(%p)->(%s %p): stub\n", This, debugstr_variant(index), value); - return E_NOTIMPL; + static const WCHAR desktopW[] = {'D','e','s','k','t','o','p',0}; + PIDLIST_ABSOLUTE pidl; + WCHAR pathW[MAX_PATH]; + int kind = 0; + BSTR folder; + HRESULT hr; + + TRACE("(%p)->(%s %p)\n", This, debugstr_variant(index), value); + + if (V_VT(index) != VT_BSTR) + { + FIXME("only BSTR index supported, got %d\n", V_VT(index)); + return E_NOTIMPL; + } + + folder = V_BSTR(index); + if (!strcmpiW(folder, desktopW)) + kind = CSIDL_DESKTOP; + else + { + FIXME("folder kind %s not supported\n", debugstr_w(folder)); + return E_NOTIMPL; + } + + hr = SHGetSpecialFolderLocation(NULL, kind, &pidl); + if (hr != S_OK) return hr; + + if (SHGetPathFromIDListW(pidl, pathW)) + { + V_VT(value) = VT_BSTR; + V_BSTR(value) = SysAllocString(pathW); + hr = V_BSTR(value) ? S_OK : E_OUTOFMEMORY; + } + else + hr = E_FAIL; + + CoTaskMemFree(pidl); + + return hr; } static HRESULT WINAPI WshCollection_Count(IWshCollection *iface, LONG *count) diff --git a/dlls/wshom.ocx/tests/Makefile.in b/dlls/wshom.ocx/tests/Makefile.in index e062b3c..1580050 100644 --- a/dlls/wshom.ocx/tests/Makefile.in +++ b/dlls/wshom.ocx/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = wshom.ocx -IMPORTS = ole32 +IMPORTS = oleaut32 ole32 C_SRCS = \ wshom.c diff --git a/dlls/wshom.ocx/tests/wshom.c b/dlls/wshom.ocx/tests/wshom.c index 414378f..2c2af45 100644 --- a/dlls/wshom.ocx/tests/wshom.c +++ b/dlls/wshom.ocx/tests/wshom.c @@ -26,11 +26,14 @@ #include "wshom.h" #include "wine/test.h" +DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); + #define EXPECT_HR(hr,hr_exp) \ ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) static void test_wshshell(void) { + static const WCHAR desktopW[] = {'D','e','s','k','t','o','p',0}; IWshShell3 *sh3; IDispatchEx *dispex; IWshCollection *coll; @@ -40,6 +43,11 @@ static void test_wshshell(void) ITypeInfo *ti; HRESULT hr; TYPEATTR *tattr; + DISPPARAMS dp; + EXCEPINFO ei; + VARIANT arg, res; + BSTR str; + UINT err; hr = CoCreateInstance(&CLSID_WshShell, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IDispatch, (void**)&disp); @@ -72,11 +80,31 @@ static void test_wshshell(void) hr = ITypeInfo_GetTypeAttr(ti, &tattr); EXPECT_HR(hr, S_OK); - ok(IsEqualIID(&tattr->guid, &IID_IWshCollection), "got \n"); + ok(IsEqualIID(&tattr->guid, &IID_IWshCollection), "got wrong type guid\n"); ITypeInfo_ReleaseTypeAttr(ti, tattr); - IWshShell3_Release(sh3); + /* try to call Item() with normal IDispatch procedure */ + str = SysAllocString(desktopW); + V_VT(&arg) = VT_BSTR; + V_BSTR(&arg) = str; + dp.rgvarg = &arg; + dp.rgdispidNamedArgs = NULL; + dp.cArgs = 1; + dp.cNamedArgs = 0; + hr = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 1033, DISPATCH_PROPERTYGET, &dp, &res, &ei, &err); + EXPECT_HR(hr, DISP_E_MEMBERNOTFOUND); + + /* try Item() directly, it returns directory path apparently */ + V_VT(&res) = VT_EMPTY; + hr = IWshCollection_Item(coll, &arg, &res); + EXPECT_HR(hr, S_OK); + SysFreeString(str); + ok(V_VT(&res) == VT_BSTR, "got res type %d\n", V_VT(&res)); + VariantClear(&res); + IWshCollection_Release(coll); + IDispatch_Release(disp); + IWshShell3_Release(sh3); IUnknown_Release(shell); }
1
0
0
0
Nikolay Sivov : wshom.ocx: Dump VARIANT parameters, fix instance leak.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 3149386b86e0b910ed01f97e89c6259a0eb1d2b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3149386b86e0b910ed01f97e8…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Dec 30 22:00:00 2011 +0300 wshom.ocx: Dump VARIANT parameters, fix instance leak. --- dlls/wshom.ocx/shell.c | 49 ++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 43 insertions(+), 6 deletions(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 4e76a4c..525ee7f 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -23,6 +23,38 @@ WINE_DEFAULT_DEBUG_CHANNEL(wshom); +const char *debugstr_variant(const VARIANT *v) +{ + if(!v) + return "(null)"; + + switch(V_VT(v)) { + case VT_EMPTY: + return "{VT_EMPTY}"; + case VT_NULL: + return "{VT_NULL}"; + case VT_I4: + return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v)); + case VT_R8: + return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v)); + case VT_BSTR: + return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v))); + case VT_DISPATCH: + return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v)); + case VT_BOOL: + return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v)); + case VT_UNKNOWN: + return wine_dbg_sprintf("{VT_UNKNOWN: %p}", V_UNKNOWN(v)); + case VT_UINT: + return wine_dbg_sprintf("{VT_UINT: %u}", V_UINT(v)); + case VT_BSTR|VT_BYREF: + return wine_dbg_sprintf("{VT_BSTR|VT_BYREF: ptr %p, data %s}", + V_BSTRREF(v), debugstr_w(V_BSTRREF(v) ? *V_BSTRREF(v) : NULL)); + default: + return wine_dbg_sprintf("{vt %d}", V_VT(v)); + } +} + static IWshShell3 WshShell3; typedef struct @@ -70,6 +102,10 @@ static ULONG WINAPI WshCollection_Release(IWshCollection *iface) WshCollection *This = impl_from_IWshCollection(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref = %d\n", This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + return ref; } @@ -131,7 +167,7 @@ static HRESULT WINAPI WshCollection_Invoke(IWshCollection *iface, DISPID dispIdM static HRESULT WINAPI WshCollection_Item(IWshCollection *iface, VARIANT *index, VARIANT *value) { WshCollection *This = impl_from_IWshCollection(iface); - FIXME("(%p)->(%p %p): stub\n", This, index, value); + FIXME("(%p)->(%s %p): stub\n", This, debugstr_variant(index), value); return E_NOTIMPL; } @@ -281,13 +317,14 @@ static HRESULT WINAPI WshShell3_get_Environment(IWshShell3 *iface, VARIANT *Type static HRESULT WINAPI WshShell3_Run(IWshShell3 *iface, BSTR Command, VARIANT *WindowStyle, VARIANT *WaitOnReturn, int *out_ExitCode) { - FIXME("(%p %p %p): stub\n", WindowStyle, WaitOnReturn, out_ExitCode); + FIXME("(%s %s %p): stub\n", debugstr_variant(WindowStyle), debugstr_variant(WaitOnReturn), out_ExitCode); return E_NOTIMPL; } static HRESULT WINAPI WshShell3_Popup(IWshShell3 *iface, BSTR Text, VARIANT* SecondsToWait, VARIANT *Title, VARIANT *Type, int *button) { - FIXME("(%s %p %p %p %p): stub\n", debugstr_w(Text), SecondsToWait, Title, Type, button); + FIXME("(%s %s %s %s %p): stub\n", debugstr_w(Text), debugstr_variant(SecondsToWait), + debugstr_variant(Title), debugstr_variant(Type), button); return E_NOTIMPL; } @@ -311,7 +348,7 @@ static HRESULT WINAPI WshShell3_RegRead(IWshShell3 *iface, BSTR Name, VARIANT* o static HRESULT WINAPI WshShell3_RegWrite(IWshShell3 *iface, BSTR Name, VARIANT *Value, VARIANT *Type) { - FIXME("(%s %p %p): stub\n", debugstr_w(Name), Value, Type); + FIXME("(%s %s %s): stub\n", debugstr_w(Name), debugstr_variant(Value), debugstr_variant(Type)); return E_NOTIMPL; } @@ -323,13 +360,13 @@ static HRESULT WINAPI WshShell3_RegDelete(IWshShell3 *iface, BSTR Name) static HRESULT WINAPI WshShell3_LogEvent(IWshShell3 *iface, VARIANT *Type, BSTR Message, BSTR Target, VARIANT_BOOL *out_Success) { - FIXME("(%p %s %s %p): stub\n", Type, debugstr_w(Message), debugstr_w(Target), out_Success); + FIXME("(%s %s %s %p): stub\n", debugstr_variant(Type), debugstr_w(Message), debugstr_w(Target), out_Success); return E_NOTIMPL; } static HRESULT WINAPI WshShell3_AppActivate(IWshShell3 *iface, VARIANT *App, VARIANT *Wait, VARIANT_BOOL *out_Success) { - FIXME("(%p %p %p): stub\n", App, Wait, out_Success); + FIXME("(%s %s %p): stub\n", debugstr_variant(App), debugstr_variant(Wait), out_Success); return E_NOTIMPL; }
1
0
0
0
Jacek Caban : jscript: Use 0 as an invalid label value.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 4f59ab4ab78cb0479a1f465f6e5d66889a4a9615 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f59ab4ab78cb0479a1f465f6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jan 2 11:46:33 2012 +0100 jscript: Use 0 as an invalid label value. --- dlls/jscript/compile.c | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 73540ad..4cdd2ed 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -328,14 +328,14 @@ static unsigned alloc_label(compiler_ctx_t *ctx) if(!ctx->labels_size) { ctx->labels = heap_alloc(8 * sizeof(*ctx->labels)); if(!ctx->labels) - return -1; + return 0; ctx->labels_size = 8; }else if(ctx->labels_size == ctx->labels_cnt) { unsigned *new_labels; new_labels = heap_realloc(ctx->labels, 2*ctx->labels_size*sizeof(*ctx->labels)); if(!new_labels) - return -1; + return 0; ctx->labels = new_labels; ctx->labels_size *= 2; @@ -1042,11 +1042,11 @@ static HRESULT compile_while_statement(compiler_ctx_t *ctx, while_statement_t *s HRESULT hres; stat_ctx.break_label = alloc_label(ctx); - if(stat_ctx.break_label == -1) + if(!stat_ctx.break_label) return E_OUTOFMEMORY; stat_ctx.continue_label = alloc_label(ctx); - if(stat_ctx.continue_label == -1) + if(!stat_ctx.continue_label) return E_OUTOFMEMORY; if(!stat->do_while) { @@ -1118,11 +1118,11 @@ static HRESULT compile_for_statement(compiler_ctx_t *ctx, for_statement_t *stat) } stat_ctx.break_label = alloc_label(ctx); - if(stat_ctx.break_label == -1) + if(!stat_ctx.break_label) return E_OUTOFMEMORY; stat_ctx.continue_label = alloc_label(ctx); - if(stat_ctx.continue_label == -1) + if(!stat_ctx.continue_label) return E_OUTOFMEMORY; /* FIXME: avoid */ @@ -1182,11 +1182,11 @@ static HRESULT compile_forin_statement(compiler_ctx_t *ctx, forin_statement_t *s } stat_ctx.break_label = alloc_label(ctx); - if(stat_ctx.break_label == -1) + if(!stat_ctx.break_label) return E_OUTOFMEMORY; stat_ctx.continue_label = alloc_label(ctx); - if(stat_ctx.continue_label == -1) + if(!stat_ctx.continue_label) return E_OUTOFMEMORY; hres = compile_expression(ctx, stat->in_expr); @@ -1267,7 +1267,7 @@ static HRESULT compile_continue_statement(compiler_ctx_t *ctx, branch_statement_ HRESULT hres; for(pop_ctx = ctx->stat_ctx; pop_ctx; pop_ctx = pop_ctx->next) { - if(pop_ctx->continue_label != -1) + if(pop_ctx->continue_label) break; } @@ -1296,7 +1296,7 @@ static HRESULT compile_break_statement(compiler_ctx_t *ctx, branch_statement_t * HRESULT hres; for(pop_ctx = ctx->stat_ctx; pop_ctx; pop_ctx = pop_ctx->next) { - if(pop_ctx->break_label != -1) + if(pop_ctx->break_label) break; } @@ -1339,7 +1339,7 @@ static HRESULT compile_return_statement(compiler_ctx_t *ctx, expression_statemen /* ECMA-262 3rd Edition 12.10 */ static HRESULT compile_with_statement(compiler_ctx_t *ctx, with_statement_t *stat) { - statement_ctx_t stat_ctx = {0, TRUE, FALSE, -1, -1}; + statement_ctx_t stat_ctx = {0, TRUE, FALSE}; HRESULT hres; hres = compile_expression(ctx, stat->expr); @@ -1362,7 +1362,7 @@ static HRESULT compile_with_statement(compiler_ctx_t *ctx, with_statement_t *sta /* ECMA-262 3rd Edition 12.13 */ static HRESULT compile_switch_statement(compiler_ctx_t *ctx, switch_statement_t *stat) { - statement_ctx_t stat_ctx = {0, FALSE, FALSE, -1, -1}; + statement_ctx_t stat_ctx = {0, FALSE, FALSE}; unsigned case_cnt = 0, *case_jmps, i, default_jmp; BOOL have_default = FALSE; statement_t *stat_iter; @@ -1374,7 +1374,7 @@ static HRESULT compile_switch_statement(compiler_ctx_t *ctx, switch_statement_t return hres; stat_ctx.break_label = alloc_label(ctx); - if(stat_ctx.break_label == -1) + if(!stat_ctx.break_label) return E_OUTOFMEMORY; for(iter = stat->case_list; iter; iter = iter->next) { @@ -1470,8 +1470,8 @@ static HRESULT compile_throw_statement(compiler_ctx_t *ctx, expression_statement /* ECMA-262 3rd Edition 12.14 */ static HRESULT compile_try_statement(compiler_ctx_t *ctx, try_statement_t *stat) { - statement_ctx_t try_ctx = {0, FALSE, TRUE, -1, -1}, catch_ctx = {0, TRUE, FALSE, -1, -1}; - statement_ctx_t finally_ctx = {2, FALSE, FALSE, -1, -1}; + statement_ctx_t try_ctx = {0, FALSE, TRUE}, catch_ctx = {0, TRUE, FALSE}; + statement_ctx_t finally_ctx = {2, FALSE, FALSE}; unsigned push_except; BSTR ident; HRESULT hres;
1
0
0
0
Jacek Caban : jscript: Get rid of instr_off from expression_t.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 9752df99afd44a2229c299062a151f50a1d088d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9752df99afd44a2229c299062…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jan 2 11:46:21 2012 +0100 jscript: Get rid of instr_off from expression_t. --- dlls/jscript/engine.h | 1 - dlls/jscript/parser.y | 1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 386f448..4afec15 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -481,7 +481,6 @@ typedef enum { struct _expression_t { expression_type_t type; - unsigned instr_off; }; struct _parameter_t { diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 6311e65..7938968 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -1342,7 +1342,6 @@ static void *new_expression(parser_ctx_t *ctx, expression_type_t type, size_t si expression_t *ret = parser_alloc(ctx, size ? size : sizeof(*ret)); ret->type = type; - ret->instr_off = 0; return ret; }
1
0
0
0
Jacek Caban : jscript: Make 0 an invalid code offset.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 708c83e2087dd985506b418ceaffc08a7da60c22 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=708c83e2087dd985506b418ce…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jan 2 11:46:11 2012 +0100 jscript: Make 0 an invalid code offset. --- dlls/jscript/compile.c | 143 ++++++++++++++++++++++++------------------------ dlls/jscript/engine.c | 2 +- dlls/jscript/parser.y | 4 +- 3 files changed, 75 insertions(+), 74 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=708c83e2087dd985506b4…
1
0
0
0
← Newer
1
...
93
94
95
96
97
98
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
90
91
92
93
94
95
96
97
98
Results per page:
10
25
50
100
200