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
April 2011
----- 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
937 discussions
Start a n
N
ew thread
David Hedberg : comdlg32: Fetch rectangle from the correct control.
by Alexandre Julliard
04 Apr '11
04 Apr '11
Module: wine Branch: master Commit: 0efd552b5be6d0a0bd0fde93f13a65b9b2ac5074 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0efd552b5be6d0a0bd0fde93f…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Mon Apr 4 11:01:50 2011 +0200 comdlg32: Fetch rectangle from the correct control. --- dlls/comdlg32/itemdlg.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 35910c3..f447828 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -354,6 +354,7 @@ static SIZE update_layout(FileDialogImpl *This) } /* Open/Save button */ + hwnd = GetDlgItem(This->dlg_hwnd, IDOK); if(hwnd) { int open_width, open_height;
1
0
0
0
Andrew Nguyen : dxdiagn: Add operating system string properties to the DxDiag_SystemInfo container.
by Alexandre Julliard
04 Apr '11
04 Apr '11
Module: wine Branch: master Commit: 097a31bb215de0350065415f7d12bc5479a9091d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=097a31bb215de0350065415f7…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Sun Apr 3 20:56:07 2011 -0500 dxdiagn: Add operating system string properties to the DxDiag_SystemInfo container. --- dlls/dxdiagn/provider.c | 32 ++++++++++++++++++++++++++++++++ dlls/dxdiagn/tests/container.c | 12 ++++++++++++ 2 files changed, 44 insertions(+), 0 deletions(-) diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 1252272..459f8e9 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -511,6 +511,34 @@ static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node) return S_OK; } +static HRESULT fill_os_string_information(IDxDiagContainerImpl_Container *node, OSVERSIONINFOW *info) +{ + static const WCHAR winxpW[] = {'W','i','n','d','o','w','s',' ','X','P',' ','P','r','o','f','e','s','s','i','o','n','a','l',0}; + static const WCHAR szOSLocalized[] = {'s','z','O','S','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szOSExLocalized[] = {'s','z','O','S','E','x','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szOSExLongLocalized[] = {'s','z','O','S','E','x','L','o','n','g','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szOSEnglish[] = {'s','z','O','S','E','n','g','l','i','s','h',0}; + static const WCHAR szOSExEnglish[] = {'s','z','O','S','E','x','E','n','g','l','i','s','h',0}; + static const WCHAR szOSExLongEnglish[] = {'s','z','O','S','E','x','L','o','n','g','E','n','g','l','i','s','h',0}; + + static const WCHAR *prop_list[] = {szOSLocalized, szOSExLocalized, szOSExLongLocalized, + szOSEnglish, szOSExEnglish, szOSExLongEnglish}; + + size_t i; + HRESULT hr; + + /* FIXME: OS detection should be performed, and localized OS strings + * should contain translated versions of the "build" phrase. */ + for (i = 0; i < sizeof(prop_list)/sizeof(prop_list[0]); i++) + { + hr = add_bstr_property(node, prop_list[i], winxpW); + if (FAILED(hr)) + return hr; + } + + return S_OK; +} + static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) { static const WCHAR dwDirectXVersionMajor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','a','j','o','r',0}; @@ -665,6 +693,10 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) if (FAILED(hr)) return hr; + hr = fill_os_string_information(node, &info); + if (FAILED(hr)) + return hr; + return S_OK; } diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c index 2b8d6f6..6de80e7 100644 --- a/dlls/dxdiagn/tests/container.c +++ b/dlls/dxdiagn/tests/container.c @@ -791,6 +791,12 @@ static void test_DxDiag_SystemInfo(void) static const WCHAR szPhysicalMemoryEnglish[] = {'s','z','P','h','y','s','i','c','a','l','M','e','m','o','r','y','E','n','g','l','i','s','h',0}; static const WCHAR szPageFileLocalized[] = {'s','z','P','a','g','e','F','i','l','e','L','o','c','a','l','i','z','e','d',0}; static const WCHAR szPageFileEnglish[] = {'s','z','P','a','g','e','F','i','l','e','E','n','g','l','i','s','h',0}; + static const WCHAR szOSLocalized[] = {'s','z','O','S','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szOSExLocalized[] = {'s','z','O','S','E','x','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szOSExLongLocalized[] = {'s','z','O','S','E','x','L','o','n','g','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szOSEnglish[] = {'s','z','O','S','E','n','g','l','i','s','h',0}; + static const WCHAR szOSExEnglish[] = {'s','z','O','S','E','x','E','n','g','l','i','s','h',0}; + static const WCHAR szOSExLongEnglish[] = {'s','z','O','S','E','x','L','o','n','g','E','n','g','l','i','s','h',0}; static const struct { @@ -824,6 +830,12 @@ static void test_DxDiag_SystemInfo(void) {szPhysicalMemoryEnglish, VT_BSTR}, {szPageFileLocalized, VT_BSTR}, {szPageFileEnglish, VT_BSTR}, + {szOSLocalized, VT_BSTR}, + {szOSExLocalized, VT_BSTR}, + {szOSExLongLocalized, VT_BSTR}, + {szOSEnglish, VT_BSTR}, + {szOSExEnglish, VT_BSTR}, + {szOSExLongEnglish, VT_BSTR}, }; HRESULT hr;
1
0
0
0
Andrew Nguyen : dxdiagn: Add paged memory display string properties to the DxDiag_SystemInfo container .
by Alexandre Julliard
04 Apr '11
04 Apr '11
Module: wine Branch: master Commit: ca854b82cfc0f70f5dac819f590fe1ce6d9bfa1d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca854b82cfc0f70f5dac819f5…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Sun Apr 3 20:56:02 2011 -0500 dxdiagn: Add paged memory display string properties to the DxDiag_SystemInfo container. --- dlls/dxdiagn/dxdiagn.rc | 1 + dlls/dxdiagn/provider.c | 22 ++++++++++++++++++++-- dlls/dxdiagn/resource.h | 1 + dlls/dxdiagn/tests/container.c | 4 ++++ po/ar.po | 4 ++++ po/bg.po | 4 ++++ po/ca.po | 4 ++++ po/cs.po | 4 ++++ po/da.po | 4 ++++ po/de.po | 4 ++++ po/el.po | 4 ++++ po/en.po | 4 ++++ po/en_US.po | 4 ++++ po/eo.po | 4 ++++ po/es.po | 4 ++++ po/fa.po | 4 ++++ po/fi.po | 4 ++++ po/fr.po | 4 ++++ po/he.po | 4 ++++ po/hi.po | 4 ++++ po/hu.po | 4 ++++ po/it.po | 4 ++++ po/ja.po | 4 ++++ po/ko.po | 4 ++++ po/lt.po | 4 ++++ po/ml.po | 4 ++++ po/nb_NO.po | 4 ++++ po/nl.po | 4 ++++ po/or.po | 4 ++++ po/pa.po | 4 ++++ po/pl.po | 4 ++++ po/pt_BR.po | 4 ++++ po/pt_PT.po | 4 ++++ po/rm.po | 4 ++++ po/ro.po | 4 ++++ po/ru.po | 4 ++++ po/sk.po | 4 ++++ po/sl.po | 4 ++++ po/sr_RS(a)cyrillic.po | 4 ++++ po/sr_RS(a)latin.po | 4 ++++ po/sv.po | 4 ++++ po/te.po | 4 ++++ po/th.po | 4 ++++ po/tr.po | 4 ++++ po/uk.po | 4 ++++ po/wa.po | 4 ++++ po/wine.pot | 4 ++++ po/zh_CN.po | 4 ++++ po/zh_TW.po | 4 ++++ 49 files changed, 206 insertions(+), 2 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ca854b82cfc0f70f5dac8…
1
0
0
0
Andrew Nguyen : dxdiagn: Add a physical memory display string property to the DxDiag_SystemInfo container .
by Alexandre Julliard
04 Apr '11
04 Apr '11
Module: wine Branch: master Commit: 791aa5383917d4c8c592892a4f74856e9d756cee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=791aa5383917d4c8c592892a4…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Sun Apr 3 20:55:58 2011 -0500 dxdiagn: Add a physical memory display string property to the DxDiag_SystemInfo container. --- dlls/dxdiagn/provider.c | 11 ++++++++++- dlls/dxdiagn/tests/container.c | 2 ++ 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 0004d0f..88e6260 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -533,14 +533,17 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) static const WCHAR dwOSBuildNumber[] = {'d','w','O','S','B','u','i','l','d','N','u','m','b','e','r',0}; static const WCHAR dwOSPlatformID[] = {'d','w','O','S','P','l','a','t','f','o','r','m','I','D',0}; static const WCHAR szCSDVersion[] = {'s','z','C','S','D','V','e','r','s','i','o','n',0}; + static const WCHAR szPhysicalMemoryEnglish[] = {'s','z','P','h','y','s','i','c','a','l','M','e','m','o','r','y','E','n','g','l','i','s','h',0}; static const WCHAR szMachineNameLocalized[] = {'s','z','M','a','c','h','i','n','e','N','a','m','e','L','o','c','a','l','i','z','e','d',0}; static const WCHAR szMachineNameEnglish[] = {'s','z','M','a','c','h','i','n','e','N','a','m','e','E','n','g','l','i','s','h',0}; + static const WCHAR physmem_fmtW[] = {'%','u','M','B',' ','R','A','M',0}; + HRESULT hr; MEMORYSTATUSEX msex; OSVERSIONINFOW info; DWORD count; - WCHAR buffer[MAX_PATH], computer_name[MAX_COMPUTERNAME_LENGTH + 1]; + WCHAR buffer[MAX_PATH], computer_name[MAX_COMPUTERNAME_LENGTH + 1], print_buf[200]; hr = add_ui4_property(node, dwDirectXVersionMajor, 9); if (FAILED(hr)) @@ -612,6 +615,12 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) if (FAILED(hr)) return hr; + /* FIXME: Roundoff should not be done with truncated division. */ + snprintfW(print_buf, sizeof(print_buf)/sizeof(WCHAR), physmem_fmtW, (DWORD)(msex.ullTotalPhys / (1024 * 1024))); + hr = add_bstr_property(node, szPhysicalMemoryEnglish, print_buf); + if (FAILED(hr)) + return hr; + GetWindowsDirectoryW(buffer, MAX_PATH); hr = add_bstr_property(node, szWindowsDir, buffer); diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c index 6c6928c..5430a44 100644 --- a/dlls/dxdiagn/tests/container.c +++ b/dlls/dxdiagn/tests/container.c @@ -788,6 +788,7 @@ static void test_DxDiag_SystemInfo(void) static const WCHAR szLanguagesEnglish[] = {'s','z','L','a','n','g','u','a','g','e','s','E','n','g','l','i','s','h',0}; static const WCHAR szTimeLocalized[] = {'s','z','T','i','m','e','L','o','c','a','l','i','z','e','d',0}; static const WCHAR szTimeEnglish[] = {'s','z','T','i','m','e','E','n','g','l','i','s','h',0}; + static const WCHAR szPhysicalMemoryEnglish[] = {'s','z','P','h','y','s','i','c','a','l','M','e','m','o','r','y','E','n','g','l','i','s','h',0}; static const struct { @@ -818,6 +819,7 @@ static void test_DxDiag_SystemInfo(void) {szLanguagesEnglish, VT_BSTR}, {szTimeLocalized, VT_BSTR}, {szTimeEnglish, VT_BSTR}, + {szPhysicalMemoryEnglish, VT_BSTR}, }; HRESULT hr;
1
0
0
0
Andrew Nguyen : dxdiagn: Add date and time properties to the DxDiag_SystemInfo container.
by Alexandre Julliard
04 Apr '11
04 Apr '11
Module: wine Branch: master Commit: bd7ad13bb38a31136c671bbc739fb8fa3c3d6515 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd7ad13bb38a31136c671bbc7…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Sun Apr 3 20:55:53 2011 -0500 dxdiagn: Add date and time properties to the DxDiag_SystemInfo container. --- dlls/dxdiagn/provider.c | 41 ++++++++++++++++++++++++++++++++++++++++ dlls/dxdiagn/tests/container.c | 4 +++ 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 537db4e..0004d0f 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -474,6 +474,43 @@ static HRESULT fill_language_information(IDxDiagContainerImpl_Container *node) return S_OK; } +static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node) +{ + static const WCHAR date_fmtW[] = {'M','\'','/','\'','d','\'','/','\'','y','y','y','y',0}; + static const WCHAR time_fmtW[] = {'H','H','\'',':','\'','m','m','\'',':','\'','s','s',0}; + static const WCHAR datetime_fmtW[] = {'%','s',',',' ','%','s',0}; + static const WCHAR szTimeLocalized[] = {'s','z','T','i','m','e','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szTimeEnglish[] = {'s','z','T','i','m','e','E','n','g','l','i','s','h',0}; + + SYSTEMTIME curtime; + WCHAR date_str[80], time_str[80], datetime_str[200]; + HRESULT hr; + + GetLocalTime(&curtime); + + GetTimeFormatW(LOCALE_NEUTRAL, 0, &curtime, time_fmtW, time_str, sizeof(time_str)/sizeof(WCHAR)); + + /* szTimeLocalized */ + GetDateFormatW(LOCALE_USER_DEFAULT, DATE_LONGDATE, &curtime, NULL, date_str, sizeof(date_str)/sizeof(WCHAR)); + + snprintfW(datetime_str, sizeof(datetime_str)/sizeof(WCHAR), datetime_fmtW, date_str, time_str); + + hr = add_bstr_property(node, szTimeLocalized, datetime_str); + if (FAILED(hr)) + return hr; + + /* szTimeEnglish */ + GetDateFormatW(LOCALE_NEUTRAL, 0, &curtime, date_fmtW, date_str, sizeof(date_str)/sizeof(WCHAR)); + + snprintfW(datetime_str, sizeof(datetime_str)/sizeof(WCHAR), datetime_fmtW, date_str, time_str); + + hr = add_bstr_property(node, szTimeEnglish, datetime_str); + if (FAILED(hr)) + return hr; + + return S_OK; +} + static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) { static const WCHAR dwDirectXVersionMajor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','a','j','o','r',0}; @@ -597,6 +634,10 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) if (FAILED(hr)) return hr; + hr = fill_datetime_information(node); + if (FAILED(hr)) + return hr; + return S_OK; } diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c index 8df4cb3..6c6928c 100644 --- a/dlls/dxdiagn/tests/container.c +++ b/dlls/dxdiagn/tests/container.c @@ -786,6 +786,8 @@ static void test_DxDiag_SystemInfo(void) static const WCHAR szMachineNameEnglish[] = {'s','z','M','a','c','h','i','n','e','N','a','m','e','E','n','g','l','i','s','h',0}; static const WCHAR szLanguagesLocalized[] = {'s','z','L','a','n','g','u','a','g','e','s','L','o','c','a','l','i','z','e','d',0}; static const WCHAR szLanguagesEnglish[] = {'s','z','L','a','n','g','u','a','g','e','s','E','n','g','l','i','s','h',0}; + static const WCHAR szTimeLocalized[] = {'s','z','T','i','m','e','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szTimeEnglish[] = {'s','z','T','i','m','e','E','n','g','l','i','s','h',0}; static const struct { @@ -814,6 +816,8 @@ static void test_DxDiag_SystemInfo(void) {szMachineNameEnglish, VT_BSTR}, {szLanguagesLocalized, VT_BSTR}, {szLanguagesEnglish, VT_BSTR}, + {szTimeLocalized, VT_BSTR}, + {szTimeEnglish, VT_BSTR}, }; HRESULT hr;
1
0
0
0
Andrew Nguyen : dxdiagn/tests: Add tests for some DxDiag_SystemInfo properties.
by Alexandre Julliard
04 Apr '11
04 Apr '11
Module: wine Branch: master Commit: 35d313c4d453eab28f277c4382949029cb517ce2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=35d313c4d453eab28f277c438…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Sun Apr 3 20:55:48 2011 -0500 dxdiagn/tests: Add tests for some DxDiag_SystemInfo properties. --- dlls/dxdiagn/tests/container.c | 124 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 123 insertions(+), 1 deletions(-) diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c index ac3229d..8df4cb3 100644 --- a/dlls/dxdiagn/tests/container.c +++ b/dlls/dxdiagn/tests/container.c @@ -28,6 +28,37 @@ static IDxDiagProvider *pddp; static IDxDiagContainer *pddc; +static const WCHAR DxDiag_SystemInfo[] = {'D','x','D','i','a','g','_','S','y','s','t','e','m','I','n','f','o',0}; + +/* Based on debugstr_variant in dlls/jscript/jsutils.c. */ +static const char *debugstr_variant(const VARIANT *var) +{ + static char buf[400]; + + if (!var) + return "(null)"; + + switch (V_VT(var)) + { + case VT_EMPTY: + return "{VT_EMPTY}"; + case VT_BSTR: + sprintf(buf, "{VT_BSTR: %s}", wine_dbgstr_w(V_BSTR(var))); + break; + case VT_BOOL: + sprintf(buf, "{VT_BOOL: %x}", V_BOOL(var)); + break; + case VT_UI4: + sprintf(buf, "{VT_UI4: %u}", V_UI4(var)); + break; + default: + sprintf(buf, "{vt %d}", V_VT(var)); + break; + } + + return buf; +} + static BOOL create_root_IDxDiagContainer(void) { HRESULT hr; @@ -658,7 +689,6 @@ cleanup: static void test_root_children(void) { - static const WCHAR DxDiag_SystemInfo[] = {'D','x','D','i','a','g','_','S','y','s','t','e','m','I','n','f','o',0}; static const WCHAR DxDiag_DisplayDevices[] = {'D','x','D','i','a','g','_','D','i','s','p','l','a','y','D','e','v','i','c','e','s',0}; static const WCHAR DxDiag_DirectSound[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','S','o','u','n','d',0}; static const WCHAR DxDiag_DirectMusic[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','M','u','s','i','c',0}; @@ -733,6 +763,97 @@ cleanup: IDxDiagProvider_Release(pddp); } +static void test_DxDiag_SystemInfo(void) +{ + static const WCHAR dwOSMajorVersion[] = {'d','w','O','S','M','a','j','o','r','V','e','r','s','i','o','n',0}; + static const WCHAR dwOSMinorVersion[] = {'d','w','O','S','M','i','n','o','r','V','e','r','s','i','o','n',0}; + static const WCHAR dwOSBuildNumber[] = {'d','w','O','S','B','u','i','l','d','N','u','m','b','e','r',0}; + static const WCHAR dwOSPlatformID[] = {'d','w','O','S','P','l','a','t','f','o','r','m','I','D',0}; + static const WCHAR dwDirectXVersionMajor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','a','j','o','r',0}; + static const WCHAR dwDirectXVersionMinor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','i','n','o','r',0}; + static const WCHAR szDirectXVersionLetter[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','e','t','t','e','r',0}; + static const WCHAR bDebug[] = {'b','D','e','b','u','g',0}; + static const WCHAR bNECPC98[] = {'b','N','E','C','P','C','9','8',0}; + static const WCHAR ullPhysicalMemory[] = {'u','l','l','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0}; + static const WCHAR ullUsedPageFile[] = {'u','l','l','U','s','e','d','P','a','g','e','F','i','l','e',0}; + static const WCHAR ullAvailPageFile[] = {'u','l','l','A','v','a','i','l','P','a','g','e','F','i','l','e',0}; + static const WCHAR szWindowsDir[] = {'s','z','W','i','n','d','o','w','s','D','i','r',0}; + static const WCHAR szCSDVersion[] = {'s','z','C','S','D','V','e','r','s','i','o','n',0}; + static const WCHAR szDirectXVersionEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','E','n','g','l','i','s','h',0}; + static const WCHAR szDirectXVersionLongEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','o','n','g','E','n','g','l','i','s','h',0}; + static const WCHAR bNetMeetingRunning[] = {'b','N','e','t','M','e','e','t','i','n','g','R','u','n','n','i','n','g',0}; + static const WCHAR szMachineNameLocalized[] = {'s','z','M','a','c','h','i','n','e','N','a','m','e','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szMachineNameEnglish[] = {'s','z','M','a','c','h','i','n','e','N','a','m','e','E','n','g','l','i','s','h',0}; + static const WCHAR szLanguagesLocalized[] = {'s','z','L','a','n','g','u','a','g','e','s','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szLanguagesEnglish[] = {'s','z','L','a','n','g','u','a','g','e','s','E','n','g','l','i','s','h',0}; + + static const struct + { + const WCHAR *prop; + VARTYPE vt; + } property_tests[] = + { + {dwOSMajorVersion, VT_UI4}, + {dwOSMinorVersion, VT_UI4}, + {dwOSBuildNumber, VT_UI4}, + {dwOSPlatformID, VT_UI4}, + {dwDirectXVersionMajor, VT_UI4}, + {dwDirectXVersionMinor, VT_UI4}, + {szDirectXVersionLetter, VT_BSTR}, + {bDebug, VT_BOOL}, + {bNECPC98, VT_BOOL}, + {ullPhysicalMemory, VT_BSTR}, + {ullUsedPageFile, VT_BSTR}, + {ullAvailPageFile, VT_BSTR}, + {szWindowsDir, VT_BSTR}, + {szCSDVersion, VT_BSTR}, + {szDirectXVersionEnglish, VT_BSTR}, + {szDirectXVersionLongEnglish, VT_BSTR}, + {bNetMeetingRunning, VT_BOOL}, + {szMachineNameLocalized, VT_BSTR}, + {szMachineNameEnglish, VT_BSTR}, + {szLanguagesLocalized, VT_BSTR}, + {szLanguagesEnglish, VT_BSTR}, + }; + + HRESULT hr; + IDxDiagContainer *child = NULL; + VARIANT var; + + if (!create_root_IDxDiagContainer()) + { + skip("Unable to create the root IDxDiagContainer\n"); + return; + } + + hr = IDxDiagContainer_GetChildContainer(pddc, DxDiag_SystemInfo, &child); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + + if (hr == S_OK) + { + int i; + + /* Examine the variant types of obtained property values. */ + for (i = 0; i < sizeof(property_tests)/sizeof(property_tests[0]); i++) + { + hr = IDxDiagContainer_GetProp(child, property_tests[i].prop, &var); + ok(hr == S_OK, "[%d] Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", i, hr); + + if (hr == S_OK) + { + ok(V_VT(&var) == property_tests[i].vt, + "[%d] Expected variant type %d, got %d\n", i, property_tests[i].vt, V_VT(&var)); + trace("%s = %s\n", wine_dbgstr_w(property_tests[i].prop), debugstr_variant(&var)); + VariantClear(&var); + } + } + } + + IDxDiagContainer_Release(child); + IDxDiagContainer_Release(pddc); + IDxDiagProvider_Release(pddp); +} + START_TEST(container) { CoInitialize(NULL); @@ -745,5 +866,6 @@ START_TEST(container) test_GetProp(); test_root_children(); + test_DxDiag_SystemInfo(); CoUninitialize(); }
1
0
0
0
Andrew Nguyen : dxdiagn: Add a NECPC98 property to the DxDiag_SystemInfo container for completeness .
by Alexandre Julliard
04 Apr '11
04 Apr '11
Module: wine Branch: master Commit: 96c3db6829f118448bce328bb63734fad919e5fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=96c3db6829f118448bce328bb…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Sun Apr 3 20:55:43 2011 -0500 dxdiagn: Add a NECPC98 property to the DxDiag_SystemInfo container for completeness. --- dlls/dxdiagn/provider.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 058f5a6..537db4e 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -481,6 +481,7 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) static const WCHAR szDirectXVersionLetter[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','e','t','t','e','r',0}; static const WCHAR szDirectXVersionLetter_v[] = {'c',0}; static const WCHAR bDebug[] = {'b','D','e','b','u','g',0}; + static const WCHAR bNECPC98[] = {'b','N','E','C','P','C','9','8',0}; static const WCHAR szDirectXVersionEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','E','n','g','l','i','s','h',0}; static const WCHAR szDirectXVersionEnglish_v[] = {'4','.','0','9','.','0','0','0','0','.','0','9','0','4',0}; static const WCHAR szDirectXVersionLongEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','o','n','g','E','n','g','l','i','s','h',0}; @@ -528,6 +529,10 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) if (FAILED(hr)) return hr; + hr = add_bool_property(node, bNECPC98, FALSE); + if (FAILED(hr)) + return hr; + msex.dwLength = sizeof(msex); GlobalMemoryStatusEx(&msex);
1
0
0
0
Andrew Nguyen : dxdiagn: Add a NetMeeting detection property to the DxDiag_SystemInfo container.
by Alexandre Julliard
04 Apr '11
04 Apr '11
Module: wine Branch: master Commit: 9e3fd163068ec43638fc2f82aa8cae1db98c03da URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e3fd163068ec43638fc2f82a…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Sun Apr 3 20:55:39 2011 -0500 dxdiagn: Add a NetMeeting detection property to the DxDiag_SystemInfo container. --- dlls/dxdiagn/Makefile.in | 2 +- dlls/dxdiagn/provider.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletions(-) diff --git a/dlls/dxdiagn/Makefile.in b/dlls/dxdiagn/Makefile.in index 12dd8be..b522547 100644 --- a/dlls/dxdiagn/Makefile.in +++ b/dlls/dxdiagn/Makefile.in @@ -1,5 +1,5 @@ MODULE = dxdiagn.dll -IMPORTS = strmiids dxguid uuid ddraw version ole32 oleaut32 user32 advapi32 +IMPORTS = strmiids dxguid uuid ddraw version ole32 oleaut32 psapi user32 advapi32 C_SRCS = \ container.c \ diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 5281981..058f5a6 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -2,6 +2,7 @@ * IDxDiagProvider Implementation * * Copyright 2004-2005 Raphael Junqueira + * Copyright 2010 Andrew Nguyen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -36,6 +37,7 @@ #include "strmif.h" #include "initguid.h" #include "fil_data.h" +#include "psapi.h" #include "wine/debug.h" @@ -346,6 +348,98 @@ static inline HRESULT add_ull_as_bstr_property(IDxDiagContainerImpl_Container *n return S_OK; } +/* Copied from programs/taskkill/taskkill.c. */ +static DWORD *enumerate_processes(DWORD *list_count) +{ + DWORD *pid_list, alloc_bytes = 1024 * sizeof(*pid_list), needed_bytes; + + pid_list = HeapAlloc(GetProcessHeap(), 0, alloc_bytes); + if (!pid_list) + return NULL; + + for (;;) + { + DWORD *realloc_list; + + if (!EnumProcesses(pid_list, alloc_bytes, &needed_bytes)) + { + HeapFree(GetProcessHeap(), 0, pid_list); + return NULL; + } + + /* EnumProcesses can't signal an insufficient buffer condition, so the + * only way to possibly determine whether a larger buffer is required + * is to see whether the written number of bytes is the same as the + * buffer size. If so, the buffer will be reallocated to twice the + * size. */ + if (alloc_bytes != needed_bytes) + break; + + alloc_bytes *= 2; + realloc_list = HeapReAlloc(GetProcessHeap(), 0, pid_list, alloc_bytes); + if (!realloc_list) + { + HeapFree(GetProcessHeap(), 0, pid_list); + return NULL; + } + pid_list = realloc_list; + } + + *list_count = needed_bytes / sizeof(*pid_list); + return pid_list; +} + +/* Copied from programs/taskkill/taskkill.c. */ +static BOOL get_process_name_from_pid(DWORD pid, WCHAR *buf, DWORD chars) +{ + HANDLE process; + HMODULE module; + DWORD required_size; + + process = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid); + if (!process) + return FALSE; + + if (!EnumProcessModules(process, &module, sizeof(module), &required_size)) + { + CloseHandle(process); + return FALSE; + } + + if (!GetModuleBaseNameW(process, module, buf, chars)) + { + CloseHandle(process); + return FALSE; + } + + CloseHandle(process); + return TRUE; +} + +/* dxdiagn's detection scheme is simply to look for a process called conf.exe. */ +static BOOL is_netmeeting_running(void) +{ + static const WCHAR conf_exe[] = {'c','o','n','f','.','e','x','e',0}; + + DWORD list_count; + DWORD *pid_list = enumerate_processes(&list_count); + + if (pid_list) + { + DWORD i; + WCHAR process_name[MAX_PATH]; + + for (i = 0; i < list_count; i++) + { + if (get_process_name_from_pid(pid_list[i], process_name, sizeof(process_name)/sizeof(WCHAR)) && + !lstrcmpW(conf_exe, process_name)) + return TRUE; + } + } + + return FALSE; +} + static HRESULT fill_language_information(IDxDiagContainerImpl_Container *node) { static const WCHAR regional_setting_engW[] = {'R','e','g','i','o','n','a','l',' ','S','e','t','t','i','n','g',0}; @@ -394,6 +488,7 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) static const WCHAR ullPhysicalMemory[] = {'u','l','l','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0}; static const WCHAR ullUsedPageFile[] = {'u','l','l','U','s','e','d','P','a','g','e','F','i','l','e',0}; static const WCHAR ullAvailPageFile[] = {'u','l','l','A','v','a','i','l','P','a','g','e','F','i','l','e',0}; + static const WCHAR bNetMeetingRunning[] = {'b','N','e','t','M','e','e','t','i','n','g','R','u','n','n','i','n','g',0}; static const WCHAR szWindowsDir[] = {'s','z','W','i','n','d','o','w','s','D','i','r',0}; static const WCHAR dwOSMajorVersion[] = {'d','w','O','S','M','a','j','o','r','V','e','r','s','i','o','n',0}; static const WCHAR dwOSMinorVersion[] = {'d','w','O','S','M','i','n','o','r','V','e','r','s','i','o','n',0}; @@ -448,6 +543,10 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) if (FAILED(hr)) return hr; + hr = add_bool_property(node, bNetMeetingRunning, is_netmeeting_running()); + if (FAILED(hr)) + return hr; + info.dwOSVersionInfoSize = sizeof(info); GetVersionExW(&info);
1
0
0
0
Andrew Nguyen : dxdiagn: Add language properties to the DxDiag_SystemInfo container.
by Alexandre Julliard
04 Apr '11
04 Apr '11
Module: wine Branch: master Commit: f9c8e4651762da298d94d522ca02ff4b3b5915b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9c8e4651762da298d94d522c…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Sun Apr 3 20:55:32 2011 -0500 dxdiagn: Add language properties to the DxDiag_SystemInfo container. --- configure | 2 +- configure.ac | 2 +- dlls/dxdiagn/Makefile.in | 3 +- dlls/dxdiagn/dxdiag_private.h | 1 + dlls/dxdiagn/{version.rc => dxdiagn.rc} | 9 +++++++ dlls/dxdiagn/provider.c | 38 +++++++++++++++++++++++++++++++ dlls/dxdiagn/{version.rc => resource.h} | 13 ++++------ po/ar.po | 4 +++ po/bg.po | 5 ++++ po/ca.po | 4 +++ po/cs.po | 5 ++++ po/da.po | 5 ++++ po/de.po | 5 ++++ po/el.po | 4 +++ po/en.po | 4 +++ po/en_US.po | 4 +++ po/eo.po | 5 ++++ po/es.po | 5 ++++ po/fa.po | 4 +++ po/fi.po | 5 ++++ po/fr.po | 5 ++++ po/he.po | 5 ++++ po/hi.po | 4 +++ po/hu.po | 5 ++++ po/it.po | 5 ++++ po/ja.po | 5 ++++ po/ko.po | 5 ++++ po/lt.po | 5 ++++ po/ml.po | 4 +++ po/nb_NO.po | 5 ++++ po/nl.po | 5 ++++ po/or.po | 4 +++ po/pa.po | 4 +++ po/pl.po | 5 ++++ po/pt_BR.po | 5 ++++ po/pt_PT.po | 5 ++++ po/rm.po | 5 ++++ po/ro.po | 5 ++++ po/ru.po | 5 ++++ po/sk.po | 5 ++++ po/sl.po | 5 ++++ po/sr_RS(a)cyrillic.po | 5 ++++ po/sr_RS(a)latin.po | 5 ++++ po/sv.po | 5 ++++ po/te.po | 4 +++ po/th.po | 4 +++ po/tr.po | 5 ++++ po/uk.po | 5 ++++ po/wa.po | 5 ++++ po/wine.pot | 4 +++ po/zh_CN.po | 5 ++++ po/zh_TW.po | 5 ++++ 52 files changed, 269 insertions(+), 11 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f9c8e4651762da298d94d…
1
0
0
0
Andrew Nguyen : dxdiagn: Broaden the scope of the DLL instance handle.
by Alexandre Julliard
04 Apr '11
04 Apr '11
Module: wine Branch: master Commit: 8aaf3233db10ae6f21007f3d299c3399cf012b31 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8aaf3233db10ae6f21007f3d2…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Sun Apr 3 20:55:26 2011 -0500 dxdiagn: Broaden the scope of the DLL instance handle. --- dlls/dxdiagn/dxdiag_main.c | 8 ++++---- dlls/dxdiagn/dxdiag_private.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/dxdiagn/dxdiag_main.c b/dlls/dxdiagn/dxdiag_main.c index 6a8eecb..2d8b0ea 100644 --- a/dlls/dxdiagn/dxdiag_main.c +++ b/dlls/dxdiagn/dxdiag_main.c @@ -34,7 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dxdiag); -static HINSTANCE instance; +HINSTANCE dxdiagn_instance = 0; LONG DXDIAGN_refCount = 0; @@ -43,7 +43,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("%p,%x,%p\n", hInstDLL, fdwReason, lpvReserved); if (fdwReason == DLL_PROCESS_ATTACH) { - instance = hInstDLL; + dxdiagn_instance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); } return TRUE; @@ -143,7 +143,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) */ HRESULT WINAPI DllRegisterServer(void) { - return __wine_register_resources( instance, NULL ); + return __wine_register_resources( dxdiagn_instance, NULL ); } /*********************************************************************** @@ -151,5 +151,5 @@ HRESULT WINAPI DllRegisterServer(void) */ HRESULT WINAPI DllUnregisterServer(void) { - return __wine_unregister_resources( instance, NULL ); + return __wine_unregister_resources( dxdiagn_instance, NULL ); } diff --git a/dlls/dxdiagn/dxdiag_private.h b/dlls/dxdiagn/dxdiag_private.h index 76d6058..a670c3c 100644 --- a/dlls/dxdiagn/dxdiag_private.h +++ b/dlls/dxdiagn/dxdiag_private.h @@ -100,4 +100,6 @@ extern LONG DXDIAGN_refCount; static inline void DXDIAGN_LockModule(void) { InterlockedIncrement( &DXDIAGN_refCount ); } static inline void DXDIAGN_UnlockModule(void) { InterlockedDecrement( &DXDIAGN_refCount ); } +extern HINSTANCE dxdiagn_instance; + #endif
1
0
0
0
← Newer
1
...
84
85
86
87
88
89
90
...
94
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
Results per page:
10
25
50
100
200