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
Jacek Caban : mshtml: Added separated types for outer and inner HTML windows.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 08964ede45f9ac9d787ba8dd7f8cf31ca7cf2324 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=08964ede45f9ac9d787ba8dd7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 25 14:04:59 2012 +0200 mshtml: Added separated types for outer and inner HTML windows. --- dlls/mshtml/binding.h | 12 +- dlls/mshtml/htmlanchor.c | 2 +- dlls/mshtml/htmldoc.c | 22 ++-- dlls/mshtml/htmlevent.c | 2 +- dlls/mshtml/htmlevent.h | 2 +- dlls/mshtml/htmlframe.c | 4 +- dlls/mshtml/htmlframebase.c | 8 +- dlls/mshtml/htmliframe.c | 2 +- dlls/mshtml/htmlimg.c | 2 +- dlls/mshtml/htmllocation.c | 2 +- dlls/mshtml/htmloption.c | 2 +- dlls/mshtml/htmlwindow.c | 369 ++++++++++++++++++++++++------------------ dlls/mshtml/mshtml_private.h | 75 +++++---- dlls/mshtml/mutation.c | 2 +- dlls/mshtml/navigate.c | 28 ++-- dlls/mshtml/npplugin.c | 8 +- dlls/mshtml/nsevents.c | 2 +- dlls/mshtml/nsio.c | 34 ++-- dlls/mshtml/nsservice.c | 4 +- dlls/mshtml/oleobj.c | 2 +- dlls/mshtml/persist.c | 12 +- dlls/mshtml/pluginhost.c | 2 +- dlls/mshtml/script.c | 22 ++-- 23 files changed, 340 insertions(+), 280 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=08964ede45f9ac9d787ba…
1
0
0
0
Jacek Caban : mshtml: Keep reference in node returned from get_node.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 7ebcb1820eda3c43c8de3eb28d7390c9e7c8184e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ebcb1820eda3c43c8de3eb28…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 25 14:04:40 2012 +0200 mshtml: Keep reference in node returned from get_node. --- dlls/mshtml/htmldoc.c | 16 +++++++++++----- dlls/mshtml/htmldoc3.c | 11 +++++++---- dlls/mshtml/htmlelem.c | 1 + dlls/mshtml/htmlelemcol.c | 3 +++ dlls/mshtml/htmlevent.c | 19 ++++++++++++++----- dlls/mshtml/htmlform.c | 1 - dlls/mshtml/htmlnode.c | 18 +++++++----------- dlls/mshtml/htmloption.c | 1 + dlls/mshtml/htmlselect.c | 1 - dlls/mshtml/mshtml_private.h | 5 +++++ dlls/mshtml/mutation.c | 1 + dlls/mshtml/nsembed.c | 1 + dlls/mshtml/pluginhost.c | 1 + dlls/mshtml/txtrange.c | 4 +++- 14 files changed, 55 insertions(+), 28 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7ebcb1820eda3c43c8de3…
1
0
0
0
Hans Leidekker : wbemprox: Parse the resource string in IWbemLocator:: ConnectServer.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 0588ba6939320718080f24654660e978f5e6da3c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0588ba6939320718080f24654…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Jun 25 11:20:21 2012 +0200 wbemprox: Parse the resource string in IWbemLocator::ConnectServer. --- dlls/wbemprox/services.c | 5 ++- dlls/wbemprox/tests/services.c | 87 ++++++++++++++++++++++++++++++++++++++ dlls/wbemprox/wbemlocator.c | 83 ++++++++++++++++++++++++++++++++++- dlls/wbemprox/wbemprox_private.h | 2 +- 4 files changed, 172 insertions(+), 5 deletions(-) diff --git a/dlls/wbemprox/services.c b/dlls/wbemprox/services.c index c2aaa3a..e33ff36 100644 --- a/dlls/wbemprox/services.c +++ b/dlls/wbemprox/services.c @@ -136,6 +136,7 @@ struct wbem_services { IWbemServices IWbemServices_iface; LONG refs; + WCHAR *namespace; }; static inline struct wbem_services *impl_from_IWbemServices( IWbemServices *iface ) @@ -158,6 +159,7 @@ static ULONG WINAPI wbem_services_Release( if (!refs) { TRACE("destroying %p\n", ws); + heap_free( ws->namespace ); heap_free( ws ); } return refs; @@ -486,7 +488,7 @@ static const IWbemServicesVtbl wbem_services_vtbl = wbem_services_ExecMethodAsync }; -HRESULT WbemServices_create( IUnknown *pUnkOuter, LPVOID *ppObj ) +HRESULT WbemServices_create( IUnknown *pUnkOuter, WCHAR *namespace, LPVOID *ppObj ) { struct wbem_services *ws; @@ -497,6 +499,7 @@ HRESULT WbemServices_create( IUnknown *pUnkOuter, LPVOID *ppObj ) ws->IWbemServices_iface.lpVtbl = &wbem_services_vtbl; ws->refs = 1; + ws->namespace = namespace; *ppObj = &ws->IWbemServices_iface; diff --git a/dlls/wbemprox/tests/services.c b/dlls/wbemprox/tests/services.c index 64be978..ff798a3 100644 --- a/dlls/wbemprox/tests/services.c +++ b/dlls/wbemprox/tests/services.c @@ -84,9 +84,96 @@ static void test_IClientSecurity(void) SysFreeString( path ); } +static void test_IWbemLocator(void) +{ + static const WCHAR path0W[] = {0}; + static const WCHAR path1W[] = {'\\',0}; + static const WCHAR path2W[] = {'\\','\\',0}; + static const WCHAR path3W[] = {'\\','\\','.',0}; + static const WCHAR path4W[] = {'\\','\\','.','\\',0}; + static const WCHAR path5W[] = {'\\','R','O','O','T',0}; + static const WCHAR path6W[] = {'\\','\\','R','O','O','T',0}; + static const WCHAR path7W[] = {'\\','\\','.','R','O','O','T',0}; + static const WCHAR path8W[] = {'\\','\\','.','\\','N','O','N','E',0}; + static const WCHAR path9W[] = {'\\','\\','.','\\','R','O','O','T',0}; + static const WCHAR path10W[] = {'\\','\\','\\','.','\\','R','O','O','T',0}; + static const WCHAR path11W[] = {'\\','/','.','\\','R','O','O','T',0}; + static const WCHAR path12W[] = {'/','/','.','\\','R','O','O','T',0}; + static const WCHAR path13W[] = {'\\','\\','.','/','R','O','O','T',0}; + static const WCHAR path14W[] = {'/','/','.','/','R','O','O','T',0}; + static const WCHAR path15W[] = {'N','O','N','E',0}; + static const WCHAR path16W[] = {'R','O','O','T',0}; + static const WCHAR path17W[] = {'R','O','O','T','\\','N','O','N','E',0}; + static const WCHAR path18W[] = {'R','O','O','T','\\','C','I','M','V','2',0}; + static const WCHAR path19W[] = {'R','O','O','T','\\','\\','C','I','M','V','2',0}; + static const WCHAR path20W[] = {'R','O','O','T','\\','C','I','M','V','2','\\',0}; + static const WCHAR path21W[] = {'R','O','O','T','/','C','I','M','V','2',0}; + static const struct + { + const WCHAR *path; + HRESULT result; + int todo; + HRESULT result_broken; + } + test[] = + { + { path0W, WBEM_E_INVALID_NAMESPACE }, + { path1W, WBEM_E_INVALID_NAMESPACE }, + { path2W, WBEM_E_INVALID_NAMESPACE }, + { path3W, WBEM_E_INVALID_NAMESPACE }, + { path4W, WBEM_E_INVALID_NAMESPACE, 0, WBEM_E_INVALID_PARAMETER }, + { path5W, WBEM_E_INVALID_NAMESPACE }, + { path6W, 0x800706ba, 1 }, + { path7W, 0x800706ba, 1 }, + { path8W, WBEM_E_INVALID_NAMESPACE }, + { path9W, S_OK }, + { path10W, WBEM_E_INVALID_PARAMETER }, + { path11W, S_OK }, + { path12W, S_OK }, + { path13W, S_OK }, + { path14W, S_OK }, + { path15W, WBEM_E_INVALID_NAMESPACE }, + { path16W, S_OK }, + { path17W, WBEM_E_INVALID_NAMESPACE }, + { path18W, S_OK }, + { path19W, WBEM_E_INVALID_NAMESPACE }, + { path20W, WBEM_E_INVALID_NAMESPACE }, + { path21W, S_OK } + }; + IWbemLocator *locator; + IWbemServices *services; + unsigned int i; + HRESULT hr; + BSTR resource; + + hr = CoCreateInstance( &CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, &IID_IWbemLocator, (void **)&locator ); + if (hr != S_OK) + { + win_skip("can't create instance of WbemLocator\n"); + return; + } + ok( hr == S_OK, "failed to create IWbemLocator interface %08x\n", hr ); + + for (i = 0; i < sizeof(test) / sizeof(test[0]); i++) + { + resource = SysAllocString( test[i].path ); + hr = IWbemLocator_ConnectServer( locator, resource, NULL, NULL, NULL, 0, NULL, NULL, &services ); + if (test[i].todo) todo_wine + ok( hr == test[i].result || broken(hr == test[i].result_broken), + "%u: expected %08x got %08x\n", i, test[i].result, hr ); + else + ok( hr == test[i].result || broken(hr == test[i].result_broken), + "%u: expected %08x got %08x\n", i, test[i].result, hr ); + SysFreeString( resource ); + if (hr == S_OK) IWbemServices_Release( services ); + } + IWbemLocator_Release( locator ); +} + START_TEST(services) { CoInitialize( NULL ); test_IClientSecurity(); + test_IWbemLocator(); CoUninitialize(); } diff --git a/dlls/wbemprox/wbemlocator.c b/dlls/wbemprox/wbemlocator.c index b80e080..87a4d01 100644 --- a/dlls/wbemprox/wbemlocator.c +++ b/dlls/wbemprox/wbemlocator.c @@ -86,6 +86,77 @@ static HRESULT WINAPI wbem_locator_QueryInterface( return S_OK; } +static BOOL is_local_machine( const WCHAR *server ) +{ + static const WCHAR dotW[] = {'.',0}; + WCHAR buffer[MAX_COMPUTERNAME_LENGTH + 1]; + DWORD len = sizeof(buffer) / sizeof(buffer[0]); + + if (!server || !strcmpW( server, dotW )) return TRUE; + if (GetComputerNameW( buffer, &len ) && !strcmpiW( server, buffer )) return TRUE; + return FALSE; +} + +static HRESULT parse_resource( const WCHAR *resource, WCHAR **server, WCHAR **namespace ) +{ + static const WCHAR rootW[] = {'R','O','O','T'}; + static const WCHAR cimv2W[] = {'C','I','M','V','2'}; + HRESULT hr = WBEM_E_INVALID_NAMESPACE; + const WCHAR *p, *q; + unsigned int len; + + *server = NULL; + *namespace = NULL; + p = q = resource; + if (*p == '\\' || *p == '/') + { + p++; + if (*p == '\\' || *p == '/') p++; + if (!*p) return WBEM_E_INVALID_NAMESPACE; + if (*p == '\\' || *p == '/') return WBEM_E_INVALID_PARAMETER; + q = p + 1; + while (*q && *q != '\\' && *q != '/') q++; + if (!*q) return WBEM_E_INVALID_NAMESPACE; + len = q - p; + if (!(*server = heap_alloc( (len + 1) * sizeof(WCHAR) ))) + { + hr = E_OUTOFMEMORY; + goto done; + } + memcpy( *server, p, len * sizeof(WCHAR) ); + (*server)[len] = 0; + q++; + } + if (!*q) goto done; + p = q; + while (*q && *q != '\\' && *q != '/') q++; + len = q - p; + if (len >= sizeof(rootW) / sizeof(rootW[0]) && memicmpW( rootW, p, len )) goto done; + if (!*q) + { + hr = S_OK; + goto done; + } + q++; + if ((len = strlenW( q )) != sizeof(cimv2W) / sizeof(cimv2W[0]) || memicmpW( q, cimv2W, len )) + goto done; + if (!(*namespace = heap_alloc( (len + 1) * sizeof(WCHAR) ))) hr = E_OUTOFMEMORY; + else + { + memcpy( *namespace, p, len * sizeof(WCHAR) ); + (*namespace)[len] = 0; + hr = S_OK; + } + +done: + if (hr != S_OK) + { + heap_free( *server ); + heap_free( *namespace ); + } + return hr; +} + static HRESULT WINAPI wbem_locator_ConnectServer( IWbemLocator *iface, const BSTR NetworkResource, @@ -98,14 +169,19 @@ static HRESULT WINAPI wbem_locator_ConnectServer( IWbemServices **ppNamespace) { HRESULT hr; + WCHAR *server, *namespace; TRACE("%p, %s, %s, %s, %s, 0x%08x, %s, %p, %p)\n", iface, debugstr_w(NetworkResource), debugstr_w(User), debugstr_w(Password), debugstr_w(Locale), SecurityFlags, debugstr_w(Authority), pCtx, ppNamespace); - if (((NetworkResource[0] == '\\' && NetworkResource[1] == '\\') || - (NetworkResource[0] == '/' && NetworkResource[1] == '/')) && NetworkResource[2] != '.') + hr = parse_resource( NetworkResource, &server, &namespace ); + if (hr != S_OK) return hr; + + if (!is_local_machine( server )) { FIXME("remote computer not supported\n"); + heap_free( server ); + heap_free( namespace ); return WBEM_E_TRANSPORT_FAILURE; } if (User || Password || Authority) @@ -115,10 +191,11 @@ static HRESULT WINAPI wbem_locator_ConnectServer( if (SecurityFlags) FIXME("unsupported flags\n"); - hr = WbemServices_create( NULL, (void **)ppNamespace ); + hr = WbemServices_create( NULL, namespace, (void **)ppNamespace ); if (SUCCEEDED( hr )) return WBEM_NO_ERROR; + heap_free( namespace ); return WBEM_E_FAILED; } diff --git a/dlls/wbemprox/wbemprox_private.h b/dlls/wbemprox/wbemprox_private.h index 779d43d..d0cdb76 100644 --- a/dlls/wbemprox/wbemprox_private.h +++ b/dlls/wbemprox/wbemprox_private.h @@ -121,7 +121,7 @@ HRESULT get_propval( const struct view *, UINT, const WCHAR *, VARIANT *, HRESULT get_properties( const struct view *, SAFEARRAY ** ) DECLSPEC_HIDDEN; HRESULT WbemLocator_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; -HRESULT WbemServices_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; +HRESULT WbemServices_create(IUnknown *, WCHAR *, LPVOID *) DECLSPEC_HIDDEN; HRESULT WbemClassObject_create(IUnknown *, IEnumWbemClassObject *, UINT, LPVOID *) DECLSPEC_HIDDEN; HRESULT EnumWbemClassObject_create(IUnknown *, struct query *, LPVOID *) DECLSPEC_HIDDEN;
1
0
0
0
Hans Leidekker : wbemprox: Add a partial Win32_NetworkAdapter class implementation.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 7b8c10f0b1041f5a42e3f7d59340c5f4128a013a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7b8c10f0b1041f5a42e3f7d59…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Jun 25 11:20:09 2012 +0200 wbemprox: Add a partial Win32_NetworkAdapter class implementation. --- dlls/wbemprox/Makefile.in | 2 +- dlls/wbemprox/builtin.c | 75 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletions(-) diff --git a/dlls/wbemprox/Makefile.in b/dlls/wbemprox/Makefile.in index 56e3d8f..bc82945 100644 --- a/dlls/wbemprox/Makefile.in +++ b/dlls/wbemprox/Makefile.in @@ -1,5 +1,5 @@ MODULE = wbemprox.dll -IMPORTS = dxgi oleaut32 ole32 advapi32 +IMPORTS = iphlpapi dxgi oleaut32 ole32 advapi32 C_SRCS = \ builtin.c \ diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index af913d4..6092173 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -26,6 +26,8 @@ #include "windef.h" #include "winbase.h" #include "wbemcli.h" +#include "winsock2.h" +#include "iphlpapi.h" #include "tlhelp32.h" #include "initguid.h" #include "d3d10.h" @@ -47,6 +49,8 @@ static const WCHAR class_processorW[] = {'W','i','n','3','2','_','P','r','o','c','e','s','s','o','r',0}; static const WCHAR class_videocontrollerW[] = {'W','i','n','3','2','_','V','i','d','e','o','C','o','n','t','r','o','l','l','e','r',0}; +static const WCHAR class_networkadapterW[] = + {'W','i','n','3','2','_','N','e','t','w','o','r','k','A','d','a','p','t','e','r',0}; static const WCHAR prop_adapterramW[] = {'A','d','a','p','t','e','r','R','A','M',0}; @@ -60,10 +64,14 @@ static const WCHAR prop_deviceidW[] = {'D','e','v','i','c','e','I','d',0}; static const WCHAR prop_handleW[] = {'H','a','n','d','l','e',0}; +static const WCHAR prop_interfaceindexW[] = + {'I','n','t','e','r','f','a','c','e','I','n','d','e','x',0}; static const WCHAR prop_manufacturerW[] = {'M','a','n','u','f','a','c','t','u','r','e','r',0}; static const WCHAR prop_modelW[] = {'M','o','d','e','l',0}; +static const WCHAR prop_netconnectionstatusW[] = + {'N','e','t','C','o','n','n','e','c','t','i','o','n','S','t','a','t','u','s',0}; static const WCHAR prop_osarchitectureW[] = {'O','S','A','r','c','h','i','t','e','c','t','u','r','e',0}; static const WCHAR prop_pprocessidW[] = @@ -90,6 +98,12 @@ static const struct column col_compsys[] = { prop_manufacturerW, CIM_STRING }, { prop_modelW, CIM_STRING } }; +static const struct column col_networkadapter[] = +{ + { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, + { prop_interfaceindexW, CIM_SINT32 }, + { prop_netconnectionstatusW, CIM_UINT16 } +}; static const struct column col_os[] = { { prop_captionW, CIM_STRING }, @@ -154,6 +168,12 @@ struct record_computersystem const WCHAR *manufacturer; const WCHAR *model; }; +struct record_networkadapter +{ + const WCHAR *device_id; + INT32 interface_index; + UINT16 netconnection_status; +}; struct record_operatingsystem { const WCHAR *caption; @@ -193,6 +213,60 @@ static const struct record_processor data_processor[] = { processor_manufacturerW } }; +static UINT16 get_connection_status( IF_OPER_STATUS status ) +{ + switch (status) + { + case IfOperStatusDown: + return 0; /* Disconnected */ + case IfOperStatusUp: + return 2; /* Connected */ + default: + ERR("unhandled status %u\n", status); + break; + } + return 0; +} + +static void fill_networkadapter( struct table *table ) +{ + static const WCHAR fmtW[] = {'%','u',0}; + WCHAR device_id[11]; + struct record_networkadapter *rec; + IP_ADAPTER_ADDRESSES *aa, *buffer; + UINT num_rows = 0, offset = 0; + DWORD size = 0, ret; + + ret = GetAdaptersAddresses( AF_UNSPEC, 0, NULL, NULL, &size ); + if (ret != ERROR_BUFFER_OVERFLOW) return; + + if (!(buffer = heap_alloc( size ))) return; + if (GetAdaptersAddresses( AF_UNSPEC, 0, NULL, buffer, &size )) + { + heap_free( buffer ); + return; + } + for (aa = buffer; aa; aa = aa->Next) num_rows++; + if (!(table->data = heap_alloc( sizeof(*rec) * num_rows ))) + { + heap_free( buffer ); + return; + } + for (aa = buffer; aa; aa = aa->Next) + { + rec = (struct record_networkadapter *)(table->data + offset); + sprintfW( device_id, fmtW, aa->u.s.IfIndex ); + rec->device_id = heap_strdupW( device_id ); + rec->interface_index = aa->u.s.IfIndex; + rec->netconnection_status = get_connection_status( aa->OperStatus ); + offset += sizeof(*rec); + } + TRACE("created %u rows\n", num_rows); + table->num_rows = num_rows; + + heap_free( buffer ); +} + static WCHAR *get_cmdline( DWORD process_id ) { if (process_id == GetCurrentProcessId()) return heap_strdupW( GetCommandLineW() ); @@ -301,6 +375,7 @@ static struct table classtable[] = { { class_biosW, SIZEOF(col_bios), col_bios, SIZEOF(data_bios), (BYTE *)data_bios, NULL }, { class_compsysW, SIZEOF(col_compsys), col_compsys, SIZEOF(data_compsys), (BYTE *)data_compsys, NULL }, + { class_networkadapterW, SIZEOF(col_networkadapter), col_networkadapter, 0, NULL, fill_networkadapter }, { class_osW, SIZEOF(col_os), col_os, 0, NULL, fill_os }, { class_processW, SIZEOF(col_process), col_process, 0, NULL, fill_process }, { class_processorW, SIZEOF(col_processor), col_processor, SIZEOF(data_processor), (BYTE *)data_processor, NULL },
1
0
0
0
Alexandre Julliard : gdi32: Remove OpenGL functions that don' t use an HDC from the driver entry points.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: ee21554893176c0a90f4017afe000de30bfd2029 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee21554893176c0a90f4017af…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 25 12:02:13 2012 +0200 gdi32: Remove OpenGL functions that don't use an HDC from the driver entry points. --- dlls/gdi32/dibdrv/dc.c | 5 -- dlls/gdi32/driver.c | 30 --------- dlls/gdi32/enhmfdrv/init.c | 5 -- dlls/gdi32/freetype.c | 5 -- dlls/gdi32/gdi32.spec | 7 -- dlls/gdi32/mfdrv/init.c | 5 -- dlls/gdi32/opengl.c | 148 +------------------------------------------- dlls/gdi32/path.c | 5 -- dlls/wineps.drv/init.c | 5 -- dlls/winex11.drv/init.c | 5 -- dlls/winex11.drv/opengl.c | 5 -- dlls/winex11.drv/xrender.c | 5 -- include/wine/gdi_driver.h | 7 +-- 13 files changed, 2 insertions(+), 235 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ee21554893176c0a90f40…
1
0
0
0
Alexandre Julliard : winex11: Move wglGetCurrentContext and wglGetCurrentDC to the internal OpenGL extension functions .
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 66a5995e119d9f91d33bf21cbe1a43e643c86c4e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66a5995e119d9f91d33bf21cb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 25 16:22:16 2012 +0200 winex11: Move wglGetCurrentContext and wglGetCurrentDC to the internal OpenGL extension functions. --- dlls/opengl32/wgl.c | 12 ++++++------ dlls/wined3d/directx.c | 4 ++++ dlls/wined3d/wined3d_gl.h | 2 -- dlls/winex11.drv/opengl.c | 24 +++++++++++++++++++++++- 4 files changed, 33 insertions(+), 9 deletions(-) diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index a3b5319..7a195be 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -50,9 +50,7 @@ static struct PROC (WINAPI *p_wglGetProcAddress)(LPCSTR lpszProc); BOOL (WINAPI *p_SetPixelFormat)(HDC hdc, INT iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd); BOOL (WINAPI *p_wglMakeCurrent)(HDC hdc, HGLRC hglrc); - HDC (WINAPI *p_wglGetCurrentDC)(void); HGLRC (WINAPI *p_wglCreateContext)(HDC hdc); - HGLRC (WINAPI *p_wglGetCurrentContext)(void); INT (WINAPI *p_ChoosePixelFormat)(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd); INT (WINAPI *p_DescribePixelFormat)(HDC hdc, INT iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd); INT (WINAPI *p_GetPixelFormat)(HDC hdc); @@ -60,9 +58,11 @@ static struct /* internal WGL functions */ BOOL (WINAPI *p_wglCopyContext)(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask); BOOL (WINAPI *p_wglDeleteContext)(HGLRC hglrc); - void (WINAPI *p_wglGetIntegerv)(GLenum pname, GLint* params); void (WINAPI *p_wglFinish)(void); void (WINAPI *p_wglFlush)(void); + HGLRC (WINAPI *p_wglGetCurrentContext)(void); + HDC (WINAPI *p_wglGetCurrentDC)(void); + void (WINAPI *p_wglGetIntegerv)(GLenum pname, GLint* params); BOOL (WINAPI *p_wglShareLists)(HGLRC hglrc1, HGLRC hglrc2); } wine_wgl; @@ -932,9 +932,7 @@ static BOOL process_attach(void) wine_wgl.p_wglGetProcAddress = (void *)GetProcAddress(mod_gdi32, "wglGetProcAddress"); wine_wgl.p_SetPixelFormat = (void *)GetProcAddress(mod_gdi32, "SetPixelFormat"); wine_wgl.p_wglMakeCurrent = (void *)GetProcAddress(mod_gdi32, "wglMakeCurrent"); - wine_wgl.p_wglGetCurrentDC = (void *)GetProcAddress(mod_gdi32, "wglGetCurrentDC"); wine_wgl.p_wglCreateContext = (void *)GetProcAddress(mod_gdi32, "wglCreateContext"); - wine_wgl.p_wglGetCurrentContext = (void *)GetProcAddress(mod_gdi32, "wglGetCurrentContext"); wine_wgl.p_ChoosePixelFormat = (void *)GetProcAddress(mod_gdi32, "ChoosePixelFormat"); wine_wgl.p_DescribePixelFormat = (void *)GetProcAddress(mod_gdi32, "DescribePixelFormat"); wine_wgl.p_GetPixelFormat = (void *)GetProcAddress(mod_gdi32, "GetPixelFormat"); @@ -942,9 +940,11 @@ static BOOL process_attach(void) /* internal WGL functions */ wine_wgl.p_wglCopyContext = (void *)wine_wgl.p_wglGetProcAddress("wglCopyContext"); wine_wgl.p_wglDeleteContext = (void *)wine_wgl.p_wglGetProcAddress("wglDeleteContext"); - wine_wgl.p_wglGetIntegerv = (void *)wine_wgl.p_wglGetProcAddress("wglGetIntegerv"); wine_wgl.p_wglFinish = (void *)wine_wgl.p_wglGetProcAddress("wglFinish"); wine_wgl.p_wglFlush = (void *)wine_wgl.p_wglGetProcAddress("wglFlush"); + wine_wgl.p_wglGetCurrentContext = (void *)wine_wgl.p_wglGetProcAddress("wglGetCurrentContext"); + wine_wgl.p_wglGetCurrentDC = (void *)wine_wgl.p_wglGetProcAddress("wglGetCurrentDC"); + wine_wgl.p_wglGetIntegerv = (void *)wine_wgl.p_wglGetProcAddress("wglGetIntegerv"); wine_wgl.p_wglShareLists = (void *)wine_wgl.p_wglGetProcAddress("wglShareLists"); if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\OpenGL", &hkey)) { diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 0647ae3..1d0407d 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -5360,11 +5360,15 @@ static BOOL InitAdapters(struct wined3d *wined3d) wglFinish = (void*)GetProcAddress(mod_gl, "glFinish"); wglFlush = (void*)GetProcAddress(mod_gl, "glFlush"); pwglDeleteContext = (void*)GetProcAddress(mod_gl, "wglDeleteContext"); + pwglGetCurrentContext = (void*)GetProcAddress(mod_gl, "wglGetCurrentContext"); + pwglGetCurrentDC = (void*)GetProcAddress(mod_gl, "wglGetCurrentDC"); pwglShareLists = (void*)GetProcAddress(mod_gl, "wglShareLists"); #else wglFinish = (void*)pwglGetProcAddress("wglFinish"); wglFlush = (void*)pwglGetProcAddress("wglFlush"); pwglDeleteContext = (void*)pwglGetProcAddress("wglDeleteContext"); + pwglGetCurrentContext = (void*)pwglGetProcAddress("wglGetCurrentContext"); + pwglGetCurrentDC = (void*)pwglGetProcAddress("wglGetCurrentDC"); pwglShareLists = (void*)pwglGetProcAddress("wglShareLists"); #endif diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index fa39de5..2ffb14b 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -1713,8 +1713,6 @@ BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN; #define WGL_FUNCS_GEN \ USE_WGL_FUNC(wglCreateContext) \ - USE_WGL_FUNC(wglGetCurrentContext) \ - USE_WGL_FUNC(wglGetCurrentDC) \ USE_WGL_FUNC(wglGetProcAddress) \ USE_WGL_FUNC(wglMakeCurrent) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 62802b85..d3118c2 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -2005,6 +2005,26 @@ static BOOL WINAPI X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) return FALSE; } +/*********************************************************************** + * X11DRV_wglGetCurrentContext + */ +static HGLRC WINAPI X11DRV_wglGetCurrentContext(void) +{ + return NtCurrentTeb()->glContext; +} + +/*********************************************************************** + * X11DRV_wglGetCurrentDC + */ +static HDC WINAPI X11DRV_wglGetCurrentDC(void) +{ + Wine_GLContext *ctx = NtCurrentTeb()->glContext; + + if (!ctx) return NULL; + TRACE("hdc %p\n", ctx->hdc); + return ctx->hdc; +} + /* WGL helper function which handles differences in glGetIntegerv from WGL and GLX */ static void WINAPI X11DRV_wglGetIntegerv(GLenum pname, GLint* params) { @@ -3251,9 +3271,11 @@ static const WineGLExtension WGL_internal_functions = { { "wglCopyContext", X11DRV_wglCopyContext }, { "wglDeleteContext", X11DRV_wglDeleteContext }, - { "wglGetIntegerv", X11DRV_wglGetIntegerv }, { "wglFinish", X11DRV_wglFinish }, { "wglFlush", X11DRV_wglFlush }, + { "wglGetCurrentContext", X11DRV_wglGetCurrentContext }, + { "wglGetCurrentDC", X11DRV_wglGetCurrentDC }, + { "wglGetIntegerv", X11DRV_wglGetIntegerv }, { "wglShareLists", X11DRV_wglShareLists }, } };
1
0
0
0
Alexandre Julliard : winex11: Move wglCopyContext and wglDeleteContext to the internal OpenGL extension functions .
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 08efea0218b94578c1b2dfea359fe9f06cc8d7f9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=08efea0218b94578c1b2dfea3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 25 12:21:18 2012 +0200 winex11: Move wglCopyContext and wglDeleteContext to the internal OpenGL extension functions. --- dlls/opengl32/wgl.c | 22 ++++++++++++++++------ dlls/wined3d/directx.c | 2 ++ dlls/wined3d/wined3d_gl.h | 1 - dlls/winex11.drv/opengl.c | 16 ++++++++-------- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index ca3fee2..a3b5319 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -49,8 +49,6 @@ static struct { PROC (WINAPI *p_wglGetProcAddress)(LPCSTR lpszProc); BOOL (WINAPI *p_SetPixelFormat)(HDC hdc, INT iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd); - BOOL (WINAPI *p_wglCopyContext)(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask); - BOOL (WINAPI *p_wglDeleteContext)(HGLRC hglrc); BOOL (WINAPI *p_wglMakeCurrent)(HDC hdc, HGLRC hglrc); HDC (WINAPI *p_wglGetCurrentDC)(void); HGLRC (WINAPI *p_wglCreateContext)(HDC hdc); @@ -60,6 +58,8 @@ static struct INT (WINAPI *p_GetPixelFormat)(HDC hdc); /* internal WGL functions */ + BOOL (WINAPI *p_wglCopyContext)(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask); + BOOL (WINAPI *p_wglDeleteContext)(HGLRC hglrc); void (WINAPI *p_wglGetIntegerv)(GLenum pname, GLint* params); void (WINAPI *p_wglFinish)(void); void (WINAPI *p_wglFlush)(void); @@ -104,7 +104,12 @@ BOOL WINAPI wglSetPixelFormat( HDC hdc, INT iPixelFormat, */ BOOL WINAPI wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) { - return wine_wgl.p_wglCopyContext(hglrcSrc, hglrcDst, mask); + if (!hglrcSrc || !hglrcDst) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + return wine_wgl.p_wglCopyContext(hglrcSrc, hglrcDst, mask); } /*********************************************************************** @@ -112,7 +117,12 @@ BOOL WINAPI wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) */ BOOL WINAPI wglDeleteContext(HGLRC hglrc) { - return wine_wgl.p_wglDeleteContext(hglrc); + if (!hglrc) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + return wine_wgl.p_wglDeleteContext(hglrc); } /*********************************************************************** @@ -921,8 +931,6 @@ static BOOL process_attach(void) wine_wgl.p_wglGetProcAddress = (void *)GetProcAddress(mod_gdi32, "wglGetProcAddress"); wine_wgl.p_SetPixelFormat = (void *)GetProcAddress(mod_gdi32, "SetPixelFormat"); - wine_wgl.p_wglCopyContext = (void *)GetProcAddress(mod_gdi32, "wglCopyContext"); - wine_wgl.p_wglDeleteContext = (void *)GetProcAddress(mod_gdi32, "wglDeleteContext"); wine_wgl.p_wglMakeCurrent = (void *)GetProcAddress(mod_gdi32, "wglMakeCurrent"); wine_wgl.p_wglGetCurrentDC = (void *)GetProcAddress(mod_gdi32, "wglGetCurrentDC"); wine_wgl.p_wglCreateContext = (void *)GetProcAddress(mod_gdi32, "wglCreateContext"); @@ -932,6 +940,8 @@ static BOOL process_attach(void) wine_wgl.p_GetPixelFormat = (void *)GetProcAddress(mod_gdi32, "GetPixelFormat"); /* internal WGL functions */ + wine_wgl.p_wglCopyContext = (void *)wine_wgl.p_wglGetProcAddress("wglCopyContext"); + wine_wgl.p_wglDeleteContext = (void *)wine_wgl.p_wglGetProcAddress("wglDeleteContext"); wine_wgl.p_wglGetIntegerv = (void *)wine_wgl.p_wglGetProcAddress("wglGetIntegerv"); wine_wgl.p_wglFinish = (void *)wine_wgl.p_wglGetProcAddress("wglFinish"); wine_wgl.p_wglFlush = (void *)wine_wgl.p_wglGetProcAddress("wglFlush"); diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 3e178db7..0647ae3 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -5359,10 +5359,12 @@ static BOOL InitAdapters(struct wined3d *wined3d) #ifdef USE_WIN32_OPENGL wglFinish = (void*)GetProcAddress(mod_gl, "glFinish"); wglFlush = (void*)GetProcAddress(mod_gl, "glFlush"); + pwglDeleteContext = (void*)GetProcAddress(mod_gl, "wglDeleteContext"); pwglShareLists = (void*)GetProcAddress(mod_gl, "wglShareLists"); #else wglFinish = (void*)pwglGetProcAddress("wglFinish"); wglFlush = (void*)pwglGetProcAddress("wglFlush"); + pwglDeleteContext = (void*)pwglGetProcAddress("wglDeleteContext"); pwglShareLists = (void*)pwglGetProcAddress("wglShareLists"); #endif diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index ee4a133..fa39de5 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -1713,7 +1713,6 @@ BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN; #define WGL_FUNCS_GEN \ USE_WGL_FUNC(wglCreateContext) \ - USE_WGL_FUNC(wglDeleteContext) \ USE_WGL_FUNC(wglGetCurrentContext) \ USE_WGL_FUNC(wglGetCurrentDC) \ USE_WGL_FUNC(wglGetProcAddress) \ diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 61f1791..62802b85 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1624,11 +1624,11 @@ static BOOL glxdrv_SetPixelFormat(PHYSDEV dev, int iPixelFormat, const PIXELFORM } /** - * glxdrv_wglCopyContext + * X11DRV_wglCopyContext * * For OpenGL32 wglCopyContext. */ -static BOOL glxdrv_wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) +static BOOL WINAPI X11DRV_wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) { Wine_GLContext *src = (Wine_GLContext*)hglrcSrc; Wine_GLContext *dst = (Wine_GLContext*)hglrcDst; @@ -1688,18 +1688,16 @@ static HGLRC glxdrv_wglCreateContext(PHYSDEV dev) } /** - * glxdrv_wglDeleteContext + * X11DRV_wglDeleteContext * * For OpenGL32 wglDeleteContext. */ -static BOOL glxdrv_wglDeleteContext(HGLRC hglrc) +static BOOL WINAPI X11DRV_wglDeleteContext(HGLRC hglrc) { Wine_GLContext *ctx = (Wine_GLContext *) hglrc; TRACE("(%p)\n", hglrc); - if (!has_opengl()) return 0; - if (!is_valid_context(ctx)) { WARN("Error deleting context !\n"); @@ -3251,6 +3249,8 @@ static const WineGLExtension WGL_internal_functions = { "", { + { "wglCopyContext", X11DRV_wglCopyContext }, + { "wglDeleteContext", X11DRV_wglDeleteContext }, { "wglGetIntegerv", X11DRV_wglGetIntegerv }, { "wglFinish", X11DRV_wglFinish }, { "wglFlush", X11DRV_wglFlush }, @@ -3755,10 +3755,10 @@ static const struct gdi_dc_funcs glxdrv_funcs = glxdrv_SwapBuffers, /* pSwapBuffers */ NULL, /* pUnrealizePalette */ NULL, /* pWidenPath */ - glxdrv_wglCopyContext, /* pwglCopyContext */ + NULL, /* pwglCopyContext */ glxdrv_wglCreateContext, /* pwglCreateContext */ glxdrv_wglCreateContextAttribsARB, /* pwglCreateContextAttribsARB */ - glxdrv_wglDeleteContext, /* pwglDeleteContext */ + NULL, /* pwglDeleteContext */ glxdrv_wglGetProcAddress, /* pwglGetProcAddress */ glxdrv_wglMakeContextCurrentARB, /* pwglMakeContextCurrentARB */ glxdrv_wglMakeCurrent, /* pwglMakeCurrent */
1
0
0
0
Alexandre Julliard : winex11: Move wglShareLists to the internal OpenGL extension functions.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: beeba895d3ff2b92366a29aa332a846548ff5f0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=beeba895d3ff2b92366a29aa3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 25 12:12:40 2012 +0200 winex11: Move wglShareLists to the internal OpenGL extension functions. --- dlls/opengl32/wgl.c | 15 ++++++++++----- dlls/wined3d/directx.c | 2 ++ dlls/wined3d/wined3d_gl.h | 3 +-- dlls/winex11.drv/opengl.c | 7 ++++--- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 7953275..ca3fee2 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -52,7 +52,6 @@ static struct BOOL (WINAPI *p_wglCopyContext)(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask); BOOL (WINAPI *p_wglDeleteContext)(HGLRC hglrc); BOOL (WINAPI *p_wglMakeCurrent)(HDC hdc, HGLRC hglrc); - BOOL (WINAPI *p_wglShareLists)(HGLRC hglrc1, HGLRC hglrc2); HDC (WINAPI *p_wglGetCurrentDC)(void); HGLRC (WINAPI *p_wglCreateContext)(HDC hdc); HGLRC (WINAPI *p_wglGetCurrentContext)(void); @@ -60,10 +59,11 @@ static struct INT (WINAPI *p_DescribePixelFormat)(HDC hdc, INT iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd); INT (WINAPI *p_GetPixelFormat)(HDC hdc); - /* Interal WGL function */ + /* internal WGL functions */ void (WINAPI *p_wglGetIntegerv)(GLenum pname, GLint* params); void (WINAPI *p_wglFinish)(void); void (WINAPI *p_wglFlush)(void); + BOOL (WINAPI *p_wglShareLists)(HGLRC hglrc1, HGLRC hglrc2); } wine_wgl; #ifdef SONAME_LIBGLU @@ -128,7 +128,12 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc) */ BOOL WINAPI wglShareLists(HGLRC hglrc1, HGLRC hglrc2) { - return wine_wgl.p_wglShareLists(hglrc1, hglrc2); + if (!hglrc1 || !hglrc2) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + return wine_wgl.p_wglShareLists(hglrc1, hglrc2); } /*********************************************************************** @@ -919,7 +924,6 @@ static BOOL process_attach(void) wine_wgl.p_wglCopyContext = (void *)GetProcAddress(mod_gdi32, "wglCopyContext"); wine_wgl.p_wglDeleteContext = (void *)GetProcAddress(mod_gdi32, "wglDeleteContext"); wine_wgl.p_wglMakeCurrent = (void *)GetProcAddress(mod_gdi32, "wglMakeCurrent"); - wine_wgl.p_wglShareLists = (void *)GetProcAddress(mod_gdi32, "wglShareLists"); wine_wgl.p_wglGetCurrentDC = (void *)GetProcAddress(mod_gdi32, "wglGetCurrentDC"); wine_wgl.p_wglCreateContext = (void *)GetProcAddress(mod_gdi32, "wglCreateContext"); wine_wgl.p_wglGetCurrentContext = (void *)GetProcAddress(mod_gdi32, "wglGetCurrentContext"); @@ -927,10 +931,11 @@ static BOOL process_attach(void) wine_wgl.p_DescribePixelFormat = (void *)GetProcAddress(mod_gdi32, "DescribePixelFormat"); wine_wgl.p_GetPixelFormat = (void *)GetProcAddress(mod_gdi32, "GetPixelFormat"); - /* Interal WGL function */ + /* internal WGL functions */ wine_wgl.p_wglGetIntegerv = (void *)wine_wgl.p_wglGetProcAddress("wglGetIntegerv"); wine_wgl.p_wglFinish = (void *)wine_wgl.p_wglGetProcAddress("wglFinish"); wine_wgl.p_wglFlush = (void *)wine_wgl.p_wglGetProcAddress("wglFlush"); + wine_wgl.p_wglShareLists = (void *)wine_wgl.p_wglGetProcAddress("wglShareLists"); if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\OpenGL", &hkey)) { if (!RegQueryValueExA( hkey, "DisabledExtensions", 0, NULL, NULL, &size)) { diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index c102508..3e178db7 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -5359,9 +5359,11 @@ static BOOL InitAdapters(struct wined3d *wined3d) #ifdef USE_WIN32_OPENGL wglFinish = (void*)GetProcAddress(mod_gl, "glFinish"); wglFlush = (void*)GetProcAddress(mod_gl, "glFlush"); + pwglShareLists = (void*)GetProcAddress(mod_gl, "wglShareLists"); #else wglFinish = (void*)pwglGetProcAddress("wglFinish"); wglFlush = (void*)pwglGetProcAddress("wglFlush"); + pwglShareLists = (void*)pwglGetProcAddress("wglShareLists"); #endif glEnableWINE = glEnable; diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index d9a88db..ee4a133 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -1717,8 +1717,7 @@ BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN; USE_WGL_FUNC(wglGetCurrentContext) \ USE_WGL_FUNC(wglGetCurrentDC) \ USE_WGL_FUNC(wglGetProcAddress) \ - USE_WGL_FUNC(wglMakeCurrent) \ - USE_WGL_FUNC(wglShareLists) + USE_WGL_FUNC(wglMakeCurrent) /* OpenGL extensions. */ enum wined3d_gl_extension diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index b475af0..61f1791 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1948,11 +1948,11 @@ static BOOL glxdrv_wglMakeContextCurrentARB( PHYSDEV draw_dev, PHYSDEV read_dev, } /** - * glxdrv_wglShareLists + * X11DRV_wglShareLists * * For OpenGL32 wglShareLists. */ -static BOOL glxdrv_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) +static BOOL WINAPI X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) { Wine_GLContext *org = (Wine_GLContext *) hglrc1; Wine_GLContext *dest = (Wine_GLContext *) hglrc2; @@ -3254,6 +3254,7 @@ static const WineGLExtension WGL_internal_functions = { "wglGetIntegerv", X11DRV_wglGetIntegerv }, { "wglFinish", X11DRV_wglFinish }, { "wglFlush", X11DRV_wglFlush }, + { "wglShareLists", X11DRV_wglShareLists }, } }; @@ -3762,7 +3763,7 @@ static const struct gdi_dc_funcs glxdrv_funcs = glxdrv_wglMakeContextCurrentARB, /* pwglMakeContextCurrentARB */ glxdrv_wglMakeCurrent, /* pwglMakeCurrent */ glxdrv_wglSetPixelFormatWINE, /* pwglSetPixelFormatWINE */ - glxdrv_wglShareLists, /* pwglShareLists */ + NULL, /* pwglShareLists */ NULL, /* pwglUseFontBitmapsA */ NULL, /* pwglUseFontBitmapsW */ GDI_PRIORITY_GRAPHICS_DRV + 20 /* priority */
1
0
0
0
Alexandre Julliard : winex11: Move the wglUseFontBitmaps implementation to opengl32, it' s no longer driver-dependent.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 1bca4fb5aeff73740a3cb89b878d8f42bdc55719 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1bca4fb5aeff73740a3cb89b8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 25 11:58:53 2012 +0200 winex11: Move the wglUseFontBitmaps implementation to opengl32, it's no longer driver-dependent. --- dlls/opengl32/wgl.c | 143 ++++++++++++++++++++++++++++++++++++++------ dlls/winex11.drv/opengl.c | 139 +------------------------------------------- 2 files changed, 125 insertions(+), 157 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1bca4fb5aeff73740a3cb…
1
0
0
0
Dmitry Timoshkov : windowscodecs: Implement ImagingFactory_CreateDecoder.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: cdc8e59be5c24e133cea0b4d03f7e8aab4168202 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cdc8e59be5c24e133cea0b4d0…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Jun 22 18:22:36 2012 +0900 windowscodecs: Implement ImagingFactory_CreateDecoder. --- dlls/windowscodecs/imgfactory.c | 78 +++++++++++++++++++++++++++++++++- dlls/windowscodecs/tests/bmpformat.c | 28 ++++++++++++ 2 files changed, 104 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/imgfactory.c b/dlls/windowscodecs/imgfactory.c index efcf1b0..9ef8bbb 100644 --- a/dlls/windowscodecs/imgfactory.c +++ b/dlls/windowscodecs/imgfactory.c @@ -252,9 +252,83 @@ static HRESULT WINAPI ComponentFactory_CreateDecoder(IWICComponentFactory *iface REFGUID guidContainerFormat, const GUID *pguidVendor, IWICBitmapDecoder **ppIDecoder) { - FIXME("(%p,%s,%s,%p): stub\n", iface, debugstr_guid(guidContainerFormat), + IEnumUnknown *enumdecoders; + IUnknown *unkdecoderinfo; + IWICBitmapDecoderInfo *decoderinfo; + IWICBitmapDecoder *decoder = NULL, *preferred_decoder = NULL; + GUID vendor; + HRESULT res; + ULONG num_fetched; + + TRACE("(%p,%s,%s,%p)\n", iface, debugstr_guid(guidContainerFormat), debugstr_guid(pguidVendor), ppIDecoder); - return E_NOTIMPL; + + if (!guidContainerFormat || !ppIDecoder) return E_INVALIDARG; + + res = CreateComponentEnumerator(WICDecoder, WICComponentEnumerateDefault, &enumdecoders); + if (FAILED(res)) return res; + + while (!preferred_decoder) + { + res = IEnumUnknown_Next(enumdecoders, 1, &unkdecoderinfo, &num_fetched); + if (res != S_OK) break; + + res = IUnknown_QueryInterface(unkdecoderinfo, &IID_IWICBitmapDecoderInfo, (void **)&decoderinfo); + if (SUCCEEDED(res)) + { + GUID container_guid; + + res = IWICBitmapDecoderInfo_GetContainerFormat(decoderinfo, &container_guid); + if (SUCCEEDED(res) && IsEqualIID(&container_guid, guidContainerFormat)) + { + IWICBitmapDecoder *new_decoder; + + res = IWICBitmapDecoderInfo_CreateInstance(decoderinfo, &new_decoder); + if (SUCCEEDED(res)) + { + if (pguidVendor) + { + res = IWICBitmapDecoderInfo_GetVendorGUID(decoderinfo, &vendor); + if (SUCCEEDED(res) && IsEqualIID(&vendor, pguidVendor)) + { + preferred_decoder = new_decoder; + new_decoder = NULL; + } + } + + if (new_decoder && !decoder) + { + decoder = new_decoder; + new_decoder = NULL; + } + + if (new_decoder) IWICBitmapDecoder_Release(new_decoder); + } + } + + IWICBitmapDecoderInfo_Release(decoderinfo); + } + + IUnknown_Release(unkdecoderinfo); + } + + IEnumUnknown_Release(enumdecoders); + + if (preferred_decoder) + { + *ppIDecoder = preferred_decoder; + if (decoder) IWICBitmapDecoder_Release(decoder); + return S_OK; + } + + if (decoder) + { + *ppIDecoder = decoder; + return S_OK; + } + + *ppIDecoder = NULL; + return WINCODEC_ERR_COMPONENTNOTFOUND; } static HRESULT WINAPI ComponentFactory_CreateEncoder(IWICComponentFactory *iface, diff --git a/dlls/windowscodecs/tests/bmpformat.c b/dlls/windowscodecs/tests/bmpformat.c index f264533..39820b3 100644 --- a/dlls/windowscodecs/tests/bmpformat.c +++ b/dlls/windowscodecs/tests/bmpformat.c @@ -1119,6 +1119,33 @@ static void test_gif_notrailer(void) IWICImagingFactory_Release(factory); } +static void test_create_decoder(void) +{ + IWICBitmapDecoder *decoder; + IWICImagingFactory *factory; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICImagingFactory, (void **)&factory); + ok(hr == S_OK, "CoCreateInstance error %#x\n", hr); + + hr = IWICImagingFactory_CreateDecoder(factory, NULL, NULL, NULL); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + + hr = IWICImagingFactory_CreateDecoder(factory, NULL, NULL, &decoder); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + + hr = IWICImagingFactory_CreateDecoder(factory, &GUID_ContainerFormatBmp, NULL, &decoder); + ok(hr == S_OK, "CreateDecoder error %#x\n", hr); + IWICBitmapDecoder_Release(decoder); + + hr = IWICImagingFactory_CreateDecoder(factory, &GUID_ContainerFormatBmp, &GUID_VendorMicrosoft, &decoder); + ok(hr == S_OK, "CreateDecoder error %#x\n", hr); + IWICBitmapDecoder_Release(decoder); + + IWICImagingFactory_Release(factory); +} + START_TEST(bmpformat) { CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); @@ -1131,6 +1158,7 @@ START_TEST(bmpformat) test_componentinfo(); test_createfromstream(); test_gif_notrailer(); + test_create_decoder(); CoUninitialize(); }
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
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