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
June 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
3 participants
827 discussions
Start a n
N
ew thread
Piotr Caban : msvcp90: Fix basic_ios<char>::imbue implementation.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: ef2b4d74326b9f1c5479b510b4341bb08dd3e208 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef2b4d74326b9f1c5479b510b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jun 20 13:15:45 2012 +0200 msvcp90: Fix basic_ios<char>::imbue implementation. --- dlls/msvcp90/ios.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 2b43123..6bafa95 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -3174,11 +3174,12 @@ locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const { TRACE("(%p %p %p)\n", this, ret, loc); - if(this->strbuf) - return basic_streambuf_char_pubimbue(this->strbuf, ret, loc); + if(this->strbuf) { + basic_streambuf_char_pubimbue(this->strbuf, ret, loc); + locale_dtor(ret); + } - locale_copy_ctor(ret, loc); - return ret; + return ios_base_imbue(&this->base, ret, loc); } /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
1
0
0
0
Piotr Caban : msvcp90: Added _Stoullx implementation.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: bb6bb0e3944064f0c4ababbbfa5e4f9087f8ff8a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb6bb0e3944064f0c4ababbbf…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jun 20 13:15:29 2012 +0200 msvcp90: Added _Stoullx implementation. --- dlls/msvcp90/locale.c | 38 ++++++++++++++++++++++++++++++++++++++ dlls/msvcp90/msvcp90.spec | 8 ++++---- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index ac44e1a..9147092 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -3936,6 +3936,44 @@ LONG __cdecl _Stolx(const char *buf, char **buf_end, int base, int *err) return i; } +unsigned __int64 __cdecl _Stoull(const char *buf, char **buf_end, int base) +{ + return _strtoui64(buf, buf_end, base); +} + +unsigned __int64 __cdecl _Stoullx(const char *buf, char **buf_end, int base, int *err) +{ + unsigned __int64 ret; + + *err = *_errno(); + *_errno() = 0; + ret = _strtoui64(buf, buf_end, base); + if(*_errno()) { + *err = *_errno(); + }else { + *_errno() = *err; + *err = 0; + } + return ret; +} + +ULONG __cdecl _Stoul(const char *buf, char **buf_end, int base) +{ + int err; + unsigned __int64 i = _Stoullx(buf[0]=='-' ? buf+1 : buf, buf_end, base, &err); + if(!err && i!=(unsigned __int64)((ULONG)i)) + *_errno() = ERANGE; + return buf[0]=='-' ? -i : i; +} + +ULONG __cdecl _Stoulx(const char *buf, char **buf_end, int base, int *err) +{ + unsigned __int64 i = _Stoullx(buf[0]=='-' ? buf+1 : buf, buf_end, base, err); + if(!*err && i!=(unsigned __int64)((ULONG)i)) + *err = ERANGE; + return buf[0]=='-' ? -i : i; +} + /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */ locale_id num_get_wchar_id = {0}; /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index d8bf44f..cd46d9b 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5792,10 +5792,10 @@ @ cdecl -ret64 _Stoll(ptr ptr long) @ cdecl -ret64 _Stollx(ptr ptr long ptr) @ cdecl _Stolx(ptr ptr long ptr) -@ stub _Stoul -@ stub _Stoull -@ stub _Stoullx -@ stub _Stoulx +@ cdecl _Stoul(ptr ptr long) +@ cdecl -ret64 _Stoull(ptr ptr long) +@ cdecl -ret64 _Stoullx(ptr ptr long ptr) +@ cdecl _Stoulx(ptr ptr long ptr) @ cdecl _Strcoll(ptr ptr ptr ptr ptr) @ stub _Strxfrm @ cdecl _Tolower(long ptr)
1
0
0
0
Piotr Caban : msvcp90: Added _Stollx implementation.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: d1b67cea3b56cf32c8130ca020d53a8f18876e68 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1b67cea3b56cf32c8130ca02…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jun 20 13:15:11 2012 +0200 msvcp90: Added _Stollx implementation. --- dlls/msvcp90/locale.c | 29 +++++++++++++++++++++++++++++ dlls/msvcp90/msvcp90.spec | 6 +++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index fc682a1..ac44e1a 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -3907,6 +3907,35 @@ float __cdecl _Stofx(const char *buf, char **buf_end, LONG exp, int *err) return _Stodx(buf, buf_end, exp, err); } +__int64 __cdecl _Stoll(const char *buf, char **buf_end, int base) +{ + return _strtoi64(buf, buf_end, base); +} + +__int64 __cdecl _Stollx(const char *buf, char **buf_end, int base, int *err) +{ + __int64 ret; + + *err = *_errno(); + *_errno() = 0; + ret = _strtoi64(buf, buf_end, base); + if(*_errno()) { + *err = *_errno(); + }else { + *_errno() = *err; + *err = 0; + } + return ret; +} + +LONG __cdecl _Stolx(const char *buf, char **buf_end, int base, int *err) +{ + __int64 i = _Stollx(buf, buf_end, base, err); + if(!*err && i!=(__int64)((LONG)i)) + *err = ERANGE; + return i; +} + /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */ locale_id num_get_wchar_id = {0}; /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index 827f7a7..d8bf44f 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5789,9 +5789,9 @@ @ cdecl _Stofx(ptr ptr long ptr) @ cdecl _Stold(ptr ptr long) _Stod @ cdecl _Stoldx(ptr ptr long ptr) _Stodx -@ stub _Stoll -@ stub _Stollx -@ stub _Stolx +@ cdecl -ret64 _Stoll(ptr ptr long) +@ cdecl -ret64 _Stollx(ptr ptr long ptr) +@ cdecl _Stolx(ptr ptr long ptr) @ stub _Stoul @ stub _Stoull @ stub _Stoullx
1
0
0
0
Piotr Caban : msvcp90: Added _Stofx implementation.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: dc4e950009c890b82e5630e52d1001fbcdebf93e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc4e950009c890b82e5630e52…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jun 20 13:14:55 2012 +0200 msvcp90: Added _Stofx implementation. --- dlls/msvcp90/locale.c | 10 ++++++++++ dlls/msvcp90/msvcp90.spec | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 1330d17..fc682a1 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -3897,6 +3897,16 @@ double __cdecl _Stodx(const char *buf, char **buf_end, LONG exp, int *err) return ret; } +float __cdecl _Stof(const char *buf, char **buf_end, LONG exp) +{ + return _Stod(buf, buf_end, exp); +} + +float __cdecl _Stofx(const char *buf, char **buf_end, LONG exp, int *err) +{ + return _Stodx(buf, buf_end, exp, err); +} + /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */ locale_id num_get_wchar_id = {0}; /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index 3d15518..827f7a7 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5785,8 +5785,8 @@ @ extern _Snan @ cdecl _Stod(ptr ptr long) @ cdecl _Stodx(ptr ptr long ptr) -@ stub _Stof -@ stub _Stofx +@ cdecl _Stof(ptr ptr long) +@ cdecl _Stofx(ptr ptr long ptr) @ cdecl _Stold(ptr ptr long) _Stod @ cdecl _Stoldx(ptr ptr long ptr) _Stodx @ stub _Stoll
1
0
0
0
Piotr Caban : msvcp90: Added _Stodx implementation.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: 1e4d0c4fbf17513a83f4e405cf59d879d8aca212 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1e4d0c4fbf17513a83f4e405c…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jun 20 13:14:37 2012 +0200 msvcp90: Added _Stodx implementation. --- dlls/msvcp90/locale.c | 26 ++++++++++++++++++++++++++ dlls/msvcp90/msvcp90.spec | 8 ++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index e415807..1330d17 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -24,6 +24,7 @@ #include "locale.h" #include "errno.h" #include "limits.h" +#include "math.h" #include "wine/list.h" @@ -3871,6 +3872,31 @@ basic_string_wchar* __thiscall numpunct_wchar_truename(const numpunct_wchar *thi return call_numpunct_wchar_do_truename(this, ret); } +double __cdecl _Stod(const char *buf, char **buf_end, LONG exp) +{ + double ret = strtod(buf, buf_end); + + if(exp) + ret *= pow(10, exp); + return ret; +} + +double __cdecl _Stodx(const char *buf, char **buf_end, LONG exp, int *err) +{ + double ret; + + *err = *_errno(); + *_errno() = 0; + ret = _Stod(buf, buf_end, exp); + if(*_errno()) { + *err = *_errno(); + }else { + *_errno() = *err; + *err = 0; + } + return ret; +} + /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */ locale_id num_get_wchar_id = {0}; /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index a5976e1..3d15518 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5783,12 +5783,12 @@ # extern _Rteps @ stub _Sinh @ extern _Snan -@ stub _Stod -@ stub _Stodx +@ cdecl _Stod(ptr ptr long) +@ cdecl _Stodx(ptr ptr long ptr) @ stub _Stof @ stub _Stofx -@ stub _Stold -@ stub _Stoldx +@ cdecl _Stold(ptr ptr long) _Stod +@ cdecl _Stoldx(ptr ptr long ptr) _Stodx @ stub _Stoll @ stub _Stollx @ stub _Stolx
1
0
0
0
Hans Leidekker : wbemprox: Implement Win32_Process. CommandLine for the current process.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: 0e184898313181830b89877c3e96dc1238858337 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e184898313181830b89877c3…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jun 20 12:07:02 2012 +0200 wbemprox: Implement Win32_Process.CommandLine for the current process. --- dlls/wbemprox/builtin.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 5c6a4fe..0c88ad5 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -46,6 +46,8 @@ static const WCHAR class_processorW[] = static const WCHAR prop_captionW[] = {'C','a','p','t','i','o','n',0}; +static const WCHAR prop_commandlineW[] = + {'C','o','m','m','a','n','d','L','i','n','e',0}; static const WCHAR prop_descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0}; static const WCHAR prop_handleW[] = @@ -88,6 +90,7 @@ static const struct column col_os[] = static const struct column col_process[] = { { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_commandlineW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_handleW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, { prop_pprocessidW, CIM_UINT32 }, @@ -144,6 +147,7 @@ struct record_operatingsystem struct record_process { const WCHAR *caption; + const WCHAR *commandline; const WCHAR *description; const WCHAR *handle; UINT32 pprocess_id; @@ -169,6 +173,12 @@ static const struct record_processor data_processor[] = { processor_manufacturerW } }; +static WCHAR *get_cmdline( DWORD process_id ) +{ + if (process_id == GetCurrentProcessId()) return heap_strdupW( GetCommandLineW() ); + return NULL; /* FIXME handle different process case */ +} + static void fill_process( struct table *table ) { static const WCHAR fmtW[] = {'%','u',0}; @@ -196,6 +206,7 @@ static void fill_process( struct table *table ) } rec = (struct record_process *)(table->data + offset); rec->caption = heap_strdupW( entry.szExeFile ); + rec->commandline = get_cmdline( entry.th32ProcessID ); rec->description = heap_strdupW( entry.szExeFile ); sprintfW( handle, fmtW, entry.th32ProcessID ); rec->handle = heap_strdupW( handle );
1
0
0
0
Hans Leidekker : wbemprox: Append key properties to the class path.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: 2ea3258c5467643804803d8b26098c567e036242 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ea3258c5467643804803d8b2…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jun 20 12:06:40 2012 +0200 wbemprox: Append key properties to the class path. --- dlls/wbemprox/query.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 111 insertions(+), 1 deletions(-) diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index afb419c..7a2b545 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -118,6 +118,49 @@ static HRESULT get_value( const struct table *table, UINT row, UINT column, INT_ return S_OK; } +static BSTR get_value_bstr( const struct table *table, UINT row, UINT column ) +{ + static const WCHAR fmt_signedW[] = {'%','d',0}; + static const WCHAR fmt_unsignedW[] = {'%','u',0}; + static const WCHAR fmt_strW[] = {'\"','%','s','\"',0}; + INT_PTR val; + BSTR ret; + WCHAR number[12]; + UINT len; + + if (table->columns[column].type & CIM_FLAG_ARRAY) + { + FIXME("array to string conversion not handled\n"); + return NULL; + } + if (get_value( table, row, column, &val ) != S_OK) return NULL; + + switch (table->columns[column].type & COL_TYPE_MASK) + { + case CIM_DATETIME: + case CIM_STRING: + len = strlenW( (const WCHAR *)val ) + 2; + if (!(ret = SysAllocStringLen( NULL, len ))) return NULL; + sprintfW( ret, fmt_strW, (const WCHAR *)val ); + return ret; + + case CIM_SINT16: + case CIM_SINT32: + sprintfW( number, fmt_signedW, val ); + return SysAllocString( number ); + + case CIM_UINT16: + case CIM_UINT32: + sprintfW( number, fmt_unsignedW, val ); + return SysAllocString( number ); + + default: + FIXME("unhandled column type %u\n", table->columns[column].type & COL_TYPE_MASK); + break; + } + return NULL; +} + HRESULT create_view( const struct property *proplist, const WCHAR *class, const struct expr *cond, struct view **ret ) { @@ -416,10 +459,77 @@ static BSTR build_namespace( const struct view *view ) return SysAllocString( cimv2W ); } +static BSTR build_proplist( const struct view *view, UINT index, UINT count, UINT *len ) +{ + static const WCHAR fmtW[] = {'%','s','=','%','s',0}; + UINT i, j, offset, row = view->result[index]; + BSTR *values, ret = NULL; + + if (!(values = heap_alloc( count * sizeof(BSTR) ))) return NULL; + + *len = j = 0; + for (i = 0; i < view->table->num_cols; i++) + { + if (view->table->columns[i].type & COL_FLAG_KEY) + { + const WCHAR *name = view->table->columns[i].name; + + values[j] = get_value_bstr( view->table, row, i ); + *len += strlenW( fmtW ) + strlenW( name ) + strlenW( values[j] ); + j++; + } + } + if ((ret = SysAllocStringLen( NULL, *len ))) + { + offset = j = 0; + for (i = 0; i < view->table->num_cols; i++) + { + if (view->table->columns[i].type & COL_FLAG_KEY) + { + const WCHAR *name = view->table->columns[i].name; + + offset += sprintfW( ret + offset, fmtW, name, values[j] ); + if (j < count - 1) ret[offset++] = ','; + j++; + } + } + } + for (i = 0; i < count; i++) SysFreeString( values[i] ); + heap_free( values ); + return ret; +} + +static UINT count_key_columns( const struct view *view ) +{ + UINT i, num_keys = 0; + + for (i = 0; i < view->table->num_cols; i++) + { + if (view->table->columns[i].type & COL_FLAG_KEY) num_keys++; + } + return num_keys; +} + static BSTR build_relpath( const struct view *view, UINT index, const WCHAR *name ) { + static const WCHAR fmtW[] = {'%','s','.','%','s',0}; + BSTR class, proplist, ret = NULL; + UINT num_keys, len; + if (view->proplist) return NULL; - return build_classname( view ); /* FIXME: append list of key properties */ + + if (!(class = build_classname( view ))) return NULL; + if (!(num_keys = count_key_columns( view ))) return class; + if (!(proplist = build_proplist( view, index, num_keys, &len ))) goto done; + + len += strlenW( fmtW ) + SysStringLen( class ); + if (!(ret = SysAllocStringLen( NULL, len ))) goto done; + sprintfW( ret, fmtW, class, proplist ); + +done: + SysFreeString( class ); + SysFreeString( proplist ); + return ret; } static BSTR build_path( const struct view *view, UINT index, const WCHAR *name )
1
0
0
0
Hans Leidekker : wbemprox: Implement Win32_Process.Handle.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: b39d0c1bdca4a4ef36c34f61e3c3432e287e9925 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b39d0c1bdca4a4ef36c34f61e…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jun 20 12:06:17 2012 +0200 wbemprox: Implement Win32_Process.Handle. --- dlls/wbemprox/builtin.c | 8 ++++++++ dlls/wbemprox/wbemprox_private.h | 1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index a1ef65e..5c6a4fe 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -48,6 +48,8 @@ static const WCHAR prop_captionW[] = {'C','a','p','t','i','o','n',0}; static const WCHAR prop_descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0}; +static const WCHAR prop_handleW[] = + {'H','a','n','d','l','e',0}; static const WCHAR prop_manufacturerW[] = {'M','a','n','u','f','a','c','t','u','r','e','r',0}; static const WCHAR prop_modelW[] = @@ -87,6 +89,7 @@ static const struct column col_process[] = { { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_handleW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, { prop_pprocessidW, CIM_UINT32 }, { prop_processidW, CIM_UINT32 }, { prop_threadcountW, CIM_UINT32 } @@ -142,6 +145,7 @@ struct record_process { const WCHAR *caption; const WCHAR *description; + const WCHAR *handle; UINT32 pprocess_id; UINT32 process_id; UINT32 thread_count; @@ -167,6 +171,8 @@ static const struct record_processor data_processor[] = static void fill_process( struct table *table ) { + static const WCHAR fmtW[] = {'%','u',0}; + WCHAR handle[11]; struct record_process *rec; PROCESSENTRY32W entry; HANDLE snap; @@ -191,6 +197,8 @@ static void fill_process( struct table *table ) rec = (struct record_process *)(table->data + offset); rec->caption = heap_strdupW( entry.szExeFile ); rec->description = heap_strdupW( entry.szExeFile ); + sprintfW( handle, fmtW, entry.th32ProcessID ); + rec->handle = heap_strdupW( handle ); rec->process_id = entry.th32ProcessID; rec->pprocess_id = entry.th32ParentProcessID; rec->thread_count = entry.cntThreads; diff --git a/dlls/wbemprox/wbemprox_private.h b/dlls/wbemprox/wbemprox_private.h index 30aecca..779d43d 100644 --- a/dlls/wbemprox/wbemprox_private.h +++ b/dlls/wbemprox/wbemprox_private.h @@ -23,6 +23,7 @@ #define COL_TYPE_MASK 0x0000ffff #define COL_FLAG_DYNAMIC 0x00010000 +#define COL_FLAG_KEY 0x00020000 struct column {
1
0
0
0
Hans Leidekker : wbemprox: Add support for retrieving system properties.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: d444e1ab1a6ae094486858dd889913178b04d640 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d444e1ab1a6ae094486858dd8…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jun 20 12:05:59 2012 +0200 wbemprox: Add support for retrieving system properties. --- dlls/wbemprox/query.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++++ include/wbemcli.idl | 6 ++ 2 files changed, 142 insertions(+), 0 deletions(-) diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index 9e03544..afb419c 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -386,12 +386,148 @@ static BOOL is_selected_prop( const struct view *view, const WCHAR *name ) return FALSE; } +static BOOL is_system_prop( const WCHAR *name ) +{ + return (name[0] == '_' && name[1] == '_'); +} + +static BSTR build_servername( const struct view *view ) +{ + WCHAR server[MAX_COMPUTERNAME_LENGTH + 1], *p; + DWORD len = sizeof(server)/sizeof(server[0]); + + if (view->proplist) return NULL; + + if (!(GetComputerNameW( server, &len ))) return NULL; + for (p = server; *p; p++) *p = toupperW( *p ); + return SysAllocString( server ); +} + +static BSTR build_classname( const struct view *view ) +{ + return SysAllocString( view->table->name ); +} + +static BSTR build_namespace( const struct view *view ) +{ + static const WCHAR cimv2W[] = {'R','O','O','T','\\','C','I','M','V','2',0}; + + if (view->proplist) return NULL; + return SysAllocString( cimv2W ); +} + +static BSTR build_relpath( const struct view *view, UINT index, const WCHAR *name ) +{ + if (view->proplist) return NULL; + return build_classname( view ); /* FIXME: append list of key properties */ +} + +static BSTR build_path( const struct view *view, UINT index, const WCHAR *name ) +{ + static const WCHAR fmtW[] = {'\\','\\','%','s','\\','%','s',':','%','s',0}; + BSTR server, namespace = NULL, relpath = NULL, ret = NULL; + UINT len; + + if (view->proplist) return NULL; + + if (!(server = build_servername( view ))) return NULL; + if (!(namespace = build_namespace( view ))) goto done; + if (!(relpath = build_relpath( view, index, name ))) goto done; + + len = strlenW( fmtW ) + SysStringLen( server ) + SysStringLen( namespace ) + SysStringLen( relpath ); + if (!(ret = SysAllocStringLen( NULL, len ))) goto done; + sprintfW( ret, fmtW, server, namespace, relpath ); + +done: + SysFreeString( server ); + SysFreeString( namespace ); + SysFreeString( relpath ); + return ret; +} + +static UINT count_selected_props( const struct view *view ) +{ + const struct property *prop = view->proplist; + UINT count; + + if (!prop) return view->table->num_cols; + + count = 1; + while ((prop = prop->next)) count++; + return count; +} + +static HRESULT get_system_propval( const struct view *view, UINT index, const WCHAR *name, + VARIANT *ret, CIMTYPE *type ) +{ + static const WCHAR classW[] = {'_','_','C','L','A','S','S',0}; + static const WCHAR genusW[] = {'_','_','G','E','N','U','S',0}; + static const WCHAR pathW[] = {'_','_','P','A','T','H',0}; + static const WCHAR namespaceW[] = {'_','_','N','A','M','E','S','P','A','C','E',0}; + static const WCHAR propcountW[] = {'_','_','P','R','O','P','E','R','T','Y','_','C','O','U','N','T',0}; + static const WCHAR relpathW[] = {'_','_','R','E','L','P','A','T','H',0}; + static const WCHAR serverW[] = {'_','_','S','E','R','V','E','R',0}; + + if (!strcmpiW( name, classW )) + { + V_VT( ret ) = VT_BSTR; + V_BSTR( ret ) = build_classname( view ); + if (type) *type = CIM_STRING; + return S_OK; + } + if (!strcmpiW( name, genusW )) + { + V_VT( ret ) = VT_INT; + V_INT( ret ) = WBEM_GENUS_INSTANCE; /* FIXME */ + if (type) *type = CIM_SINT32; + return S_OK; + } + else if (!strcmpiW( name, namespaceW )) + { + V_VT( ret ) = VT_BSTR; + V_BSTR( ret ) = build_namespace( view ); + if (type) *type = CIM_STRING; + return S_OK; + } + else if (!strcmpiW( name, pathW )) + { + V_VT( ret ) = VT_BSTR; + V_BSTR( ret ) = build_path( view, index, name ); + if (type) *type = CIM_STRING; + return S_OK; + } + if (!strcmpiW( name, propcountW )) + { + V_VT( ret ) = VT_INT; + V_INT( ret ) = count_selected_props( view ); + if (type) *type = CIM_SINT32; + return S_OK; + } + else if (!strcmpiW( name, relpathW )) + { + V_VT( ret ) = VT_BSTR; + V_BSTR( ret ) = build_relpath( view, index, name ); + if (type) *type = CIM_STRING; + return S_OK; + } + else if (!strcmpiW( name, serverW )) + { + V_VT( ret ) = VT_BSTR; + V_BSTR( ret ) = build_servername( view ); + if (type) *type = CIM_STRING; + return S_OK; + } + FIXME("system property %s not implemented\n", debugstr_w(name)); + return WBEM_E_NOT_FOUND; +} + HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VARIANT *ret, CIMTYPE *type ) { HRESULT hr; UINT column, row = view->result[index]; INT_PTR val; + if (is_system_prop( name )) return get_system_propval( view, index, name, ret, type ); if (!is_selected_prop( view, name )) return WBEM_E_NOT_FOUND; hr = get_column_index( view->table, name, &column ); diff --git a/include/wbemcli.idl b/include/wbemcli.idl index b2d756b..1cd76eb 100644 --- a/include/wbemcli.idl +++ b/include/wbemcli.idl @@ -201,6 +201,12 @@ typedef [v1_enum] enum tag_WBEM_CONDITION_FLAG_TYPE WBEM_MASK_CLASS_CONDITION = 0x300 } WBEM_CONDITION_FLAG_TYPE; +typedef [v1_enum] enum tag_WBEM_GENUS_TYPE +{ + WBEM_GENUS_CLASS = 1, + WBEM_GENUS_INSTANCE = 2 +} WBEM_GENUS_TYPE; + typedef [v1_enum] enum tag_CIMTYPE_ENUMERATION { CIM_ILLEGAL = 0xfff,
1
0
0
0
Jacek Caban : jscript: Use INFINITY macro instead of ret_inf() hack.
by Alexandre Julliard
20 Jun '12
20 Jun '12
Module: wine Branch: master Commit: c7c8cd780ae74dd4e18bf2a0a644ab542e503271 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7c8cd780ae74dd4e18bf2a0a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jun 20 11:19:11 2012 +0200 jscript: Use INFINITY macro instead of ret_inf() hack. --- dlls/jscript/jscript.h | 7 ------- dlls/jscript/jsutils.c | 2 +- 2 files changed, 1 insertions(+), 8 deletions(-) diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 6207bbd..e27b829 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -447,13 +447,6 @@ static inline void num_set_inf(VARIANT *v, BOOL positive) #endif } -static inline DOUBLE ret_inf(void) -{ - VARIANT v; - num_set_inf(&v, TRUE); - return V_R8(&v); -} - static inline void var_set_jsdisp(VARIANT *v, jsdisp_t *jsdisp) { V_VT(v) = VT_DISPATCH; diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c index 6a36613..fbc82e7 100644 --- a/dlls/jscript/jsutils.c +++ b/dlls/jscript/jsutils.c @@ -351,7 +351,7 @@ static HRESULT str_to_number(BSTR str, double *ret) if(*ptr) *ret = NAN; else - *ret = neg ? -ret_inf() : ret_inf(); + *ret = neg ? -INFINITY : INFINITY; return S_OK; }
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
83
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
Results per page:
10
25
50
100
200