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
October 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
783 discussions
Start a n
N
ew thread
Marcus Meissner : kernel32: Avoid shadowing "buffer" variable.
by Alexandre Julliard
24 Oct '11
24 Oct '11
Module: wine Branch: master Commit: bba0180e56326233fe376b2c484b3adbfd3e55ea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bba0180e56326233fe376b2c4…
Author: Marcus Meissner <meissner(a)suse.de> Date: Fri Oct 21 08:18:48 2011 +0200 kernel32: Avoid shadowing "buffer" variable. --- dlls/kernel32/except.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/except.c b/dlls/kernel32/except.c index de07442..6b68057 100644 --- a/dlls/kernel32/except.c +++ b/dlls/kernel32/except.c @@ -190,7 +190,7 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent) STARTUPINFOA startup; char* format = NULL; BOOL ret = FALSE; - char buffer[256]; + char buffer[256]; static const WCHAR AeDebugW[] = {'M','a','c','h','i','n','e','\\', 'S','o','f','t','w','a','r','e','\\', @@ -214,7 +214,6 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent) if (!NtOpenKey( &hDbgConf, KEY_READ, &attr )) { - char buffer[64]; KEY_VALUE_PARTIAL_INFORMATION *info; DWORD format_size = 0; @@ -286,7 +285,6 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent) if (pMessageBoxA) { static const char msg[] = ".\nDo you wish to debug it?"; - char buffer[256]; format_exception_msg( epointers, buffer, sizeof(buffer)-sizeof(msg) ); strcat( buffer, msg );
1
0
0
0
Marcus Meissner : kernel32: Avoid shadowing variables "a", "nt" and "fd".
by Alexandre Julliard
24 Oct '11
24 Oct '11
Module: wine Branch: master Commit: 615e9572f163151bf23c826476dbb7c63fcd17d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=615e9572f163151bf23c82647…
Author: Marcus Meissner <meissner(a)suse.de> Date: Fri Oct 21 08:19:17 2011 +0200 kernel32: Avoid shadowing variables "a", "nt" and "fd". --- dlls/kernel32/process.c | 30 ++++++++++++++---------------- 1 files changed, 14 insertions(+), 16 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index f67e438..6d42696 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -804,7 +804,6 @@ static BOOL build_command_line( WCHAR **argv ) *p++='"'; if (has_quote) { int bcount; - WCHAR* a; bcount=0; a=*arg; @@ -1510,17 +1509,16 @@ static int fork_and_exec( const char *filename, const WCHAR *cmdline, const WCHA if (flags & (CREATE_NEW_PROCESS_GROUP | CREATE_NEW_CONSOLE | DETACHED_PROCESS)) { - int pid; if (!(pid = fork())) { - int fd = open( "/dev/null", O_RDWR ); + int nullfd = open( "/dev/null", O_RDWR ); setsid(); /* close stdin and stdout */ - if (fd != -1) + if (nullfd != -1) { - dup2( fd, 0 ); - dup2( fd, 1 ); - close( fd ); + dup2( nullfd, 0 ); + dup2( nullfd, 1 ); + close( nullfd ); } } else if (pid != -1) _exit(0); /* parent */ @@ -2250,14 +2248,14 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A if (env && !(flags & CREATE_UNICODE_ENVIRONMENT)) /* convert environment to unicode */ { - char *p = env; + char *e = env; DWORD lenW; - while (*p) p += strlen(p) + 1; - p++; /* final null */ - lenW = MultiByteToWideChar( CP_ACP, 0, env, p - (char*)env, NULL, 0 ); + while (*e) e += strlen(e) + 1; + e++; /* final null */ + lenW = MultiByteToWideChar( CP_ACP, 0, env, e - (char*)env, NULL, 0 ); envW = HeapAlloc( GetProcessHeap(), 0, lenW * sizeof(WCHAR) ); - MultiByteToWideChar( CP_ACP, 0, env, p - (char*)env, envW, lenW ); + MultiByteToWideChar( CP_ACP, 0, env, e - (char*)env, envW, lenW ); flags |= CREATE_UNICODE_ENVIRONMENT; } @@ -3206,11 +3204,11 @@ DWORD WINAPI GetProcessVersion( DWORD pid ) if (!pid || pid == GetCurrentProcessId()) { - IMAGE_NT_HEADERS *nt; + IMAGE_NT_HEADERS *pnt; - if ((nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress ))) - return ((nt->OptionalHeader.MajorSubsystemVersion << 16) | - nt->OptionalHeader.MinorSubsystemVersion); + if ((pnt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress ))) + return ((pnt->OptionalHeader.MajorSubsystemVersion << 16) | + pnt->OptionalHeader.MinorSubsystemVersion); return 0; }
1
0
0
0
Marcus Meissner : kernel32: Avoid shadowing "ret" variable.
by Alexandre Julliard
24 Oct '11
24 Oct '11
Module: wine Branch: master Commit: 69b713618b5e4b22d3d2761b7bf5e54e1a79987c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=69b713618b5e4b22d3d2761b7…
Author: Marcus Meissner <meissner(a)suse.de> Date: Fri Oct 21 08:18:21 2011 +0200 kernel32: Avoid shadowing "ret" variable. --- dlls/kernel32/console.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index bab2322..e66e9b8 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -1448,16 +1448,16 @@ static BOOL start_console_renderer_helper(const char* appname, STARTUPINFOA* NULL, NULL, si, &pi)) { HANDLE wh[2]; - DWORD ret; + DWORD res; wh[0] = hEvent; wh[1] = pi.hProcess; - ret = WaitForMultipleObjects(2, wh, FALSE, INFINITE); + res = WaitForMultipleObjects(2, wh, FALSE, INFINITE); CloseHandle(pi.hThread); CloseHandle(pi.hProcess); - if (ret != WAIT_OBJECT_0) return FALSE; + if (res != WAIT_OBJECT_0) return FALSE; TRACE("Started wineconsole pid=%08x tid=%08x\n", pi.dwProcessId, pi.dwThreadId);
1
0
0
0
Alexandre Julliard : winex11: Add error checks around every XF86VidMode call.
by Alexandre Julliard
24 Oct '11
24 Oct '11
Module: wine Branch: master Commit: 36420d2286bab13c8b138575f8643320684414db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36420d2286bab13c8b138575f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 24 11:19:28 2011 +0200 winex11: Add error checks around every XF86VidMode call. --- dlls/winex11.drv/xvidmode.c | 41 +++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 20 deletions(-) diff --git a/dlls/winex11.drv/xvidmode.c b/dlls/winex11.drv/xvidmode.c index 1f13737..e279b70 100644 --- a/dlls/winex11.drv/xvidmode.c +++ b/dlls/winex11.drv/xvidmode.c @@ -203,32 +203,33 @@ void X11DRV_XF86VM_Init(void) /* see if XVidMode is available */ wine_tsx11_lock(); ok = pXF86VidModeQueryExtension(gdi_display, &xf86vm_event, &xf86vm_error); - if (ok) + wine_tsx11_unlock(); + if (!ok) return; + + X11DRV_expect_error(gdi_display, XVidModeErrorHandler, NULL); + ok = pXF86VidModeQueryVersion(gdi_display, &xf86vm_major, &xf86vm_minor); + if (X11DRV_check_error() || !ok) return; + +#ifdef X_XF86VidModeSetGammaRamp + if (xf86vm_major > 2 || (xf86vm_major == 2 && xf86vm_minor >= 1)) { X11DRV_expect_error(gdi_display, XVidModeErrorHandler, NULL); - ok = pXF86VidModeQueryVersion(gdi_display, &xf86vm_major, &xf86vm_minor); - if (X11DRV_check_error()) ok = FALSE; + pXF86VidModeGetGammaRampSize(gdi_display, DefaultScreen(gdi_display), + &xf86vm_gammaramp_size); + if (X11DRV_check_error()) xf86vm_gammaramp_size = 0; + if (xf86vm_gammaramp_size == 256) + xf86vm_use_gammaramp = TRUE; } - if (ok) - { -#ifdef X_XF86VidModeSetGammaRamp - if (xf86vm_major > 2 || (xf86vm_major == 2 && xf86vm_minor >= 1)) - { - pXF86VidModeGetGammaRampSize(gdi_display, DefaultScreen(gdi_display), - &xf86vm_gammaramp_size); - if (xf86vm_gammaramp_size == 256) - xf86vm_use_gammaramp = TRUE; - } #endif /* X_XF86VidModeSetGammaRamp */ - /* retrieve modes */ - if (usexvidmode && root_window == DefaultRootWindow( gdi_display )) - ok = pXF86VidModeGetAllModeLines(gdi_display, DefaultScreen(gdi_display), &nmodes, &real_xf86vm_modes); - else - ok = FALSE; /* In desktop mode, do not switch resolution... But still use the Gamma ramp stuff */ + /* retrieve modes */ + if (usexvidmode && root_window == DefaultRootWindow( gdi_display )) + { + X11DRV_expect_error(gdi_display, XVidModeErrorHandler, NULL); + ok = pXF86VidModeGetAllModeLines(gdi_display, DefaultScreen(gdi_display), &nmodes, &real_xf86vm_modes); + if (X11DRV_check_error() || !ok) return; } - wine_tsx11_unlock(); - if (!ok) return; + else return; /* In desktop mode, do not switch resolution... But still use the Gamma ramp stuff */ TRACE("XVidMode modes: count=%d\n", nmodes);
1
0
0
0
Nikolay Sivov : msxml3: Add stub IEnumVARIANT support for IXMLDOMSelection.
by Alexandre Julliard
24 Oct '11
24 Oct '11
Module: wine Branch: master Commit: a3a1f4e3fb62178bcb67a0016cb50079b4d31ad4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a3a1f4e3fb62178bcb67a0016…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Oct 23 22:54:20 2011 +0400 msxml3: Add stub IEnumVARIANT support for IXMLDOMSelection. --- dlls/msxml3/selection.c | 149 +++++++++++++++++++++++++++++++++++++++++++- dlls/msxml3/tests/domdoc.c | 83 ++++++++++++++++++++++++- 2 files changed, 228 insertions(+), 4 deletions(-) diff --git a/dlls/msxml3/selection.c b/dlls/msxml3/selection.c index e0f30c3..c90c8c2 100644 --- a/dlls/msxml3/selection.c +++ b/dlls/msxml3/selection.c @@ -58,6 +58,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml); int registerNamespaces(xmlXPathContextPtr ctxt); xmlChar* XSLPattern_to_XPath(xmlXPathContextPtr ctxt, xmlChar const* xslpat_str); +typedef struct _enumvariant +{ + IEnumVARIANT IEnumVARIANT_iface; + LONG ref; + + IXMLDOMSelection *selection; + BOOL own; +} enumvariant; + typedef struct _domselection { DispatchEx dispex; @@ -66,6 +75,7 @@ typedef struct _domselection xmlNodePtr node; xmlXPathObjectPtr result; int resultPos; + IEnumVARIANT *enumvariant; } domselection; static inline domselection *impl_from_IXMLDOMSelection( IXMLDOMSelection *iface ) @@ -73,6 +83,13 @@ static inline domselection *impl_from_IXMLDOMSelection( IXMLDOMSelection *iface return CONTAINING_RECORD(iface, domselection, IXMLDOMSelection_iface); } +static inline enumvariant *impl_from_IEnumVARIANT( IEnumVARIANT *iface ) +{ + return CONTAINING_RECORD(iface, enumvariant, IEnumVARIANT_iface); +} + +static HRESULT create_enumvariant(IXMLDOMSelection*, BOOL, IUnknown**); + static HRESULT WINAPI domselection_QueryInterface( IXMLDOMSelection *iface, REFIID riid, @@ -91,7 +108,17 @@ static HRESULT WINAPI domselection_QueryInterface( { *ppvObject = &This->IXMLDOMSelection_iface; } - else if(dispex_query_interface(&This->dispex, riid, ppvObject)) + else if (IsEqualGUID( riid, &IID_IEnumVARIANT )) + { + if (!This->enumvariant) + { + HRESULT hr = create_enumvariant(iface, FALSE, (IUnknown**)&This->enumvariant); + if (FAILED(hr)) return hr; + } + + return IEnumVARIANT_QueryInterface(This->enumvariant, &IID_IEnumVARIANT, ppvObject); + } + else if (dispex_query_interface(&This->dispex, riid, ppvObject)) { return *ppvObject ? S_OK : E_NOINTERFACE; } @@ -127,6 +154,7 @@ static ULONG WINAPI domselection_Release( { xmlXPathFreeObject(This->result); xmldoc_release(This->node->doc); + if (This->enumvariant) IEnumVARIANT_Release(This->enumvariant); heap_free(This); } @@ -293,8 +321,10 @@ static HRESULT WINAPI domselection_get__newEnum( IUnknown** ppUnk) { domselection *This = impl_from_IXMLDOMSelection( iface ); - FIXME("(%p)->(%p)\n", This, ppUnk); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, ppUnk); + + return create_enumvariant(iface, TRUE, ppUnk); } static HRESULT WINAPI domselection_get_expr( @@ -425,6 +455,118 @@ static const struct IXMLDOMSelectionVtbl domselection_vtbl = domselection_setProperty }; +/* IEnumVARIANT support */ +static HRESULT WINAPI enumvariant_QueryInterface( + IEnumVARIANT *iface, + REFIID riid, + void** ppvObject ) +{ + enumvariant *This = impl_from_IEnumVARIANT( iface ); + + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); + + *ppvObject = NULL; + + if ( IsEqualGUID( riid, &IID_IUnknown ) || + IsEqualGUID( riid, &IID_IEnumVARIANT )) + { + *ppvObject = &This->IEnumVARIANT_iface; + } + else + return IXMLDOMSelection_QueryInterface(This->selection, riid, ppvObject); + + IEnumVARIANT_AddRef( iface ); + + return S_OK; +} + +static ULONG WINAPI enumvariant_AddRef(IEnumVARIANT *iface ) +{ + enumvariant *This = impl_from_IEnumVARIANT( iface ); + ULONG ref = InterlockedIncrement( &This->ref ); + TRACE("(%p)->(%d)\n", This, ref); + return ref; +} + +static ULONG WINAPI enumvariant_Release(IEnumVARIANT *iface ) +{ + enumvariant *This = impl_from_IEnumVARIANT( iface ); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(%d)\n", This, ref); + if ( ref == 0 ) + { + if (This->own) IXMLDOMSelection_Release(This->selection); + heap_free(This); + } + + return ref; +} + +static HRESULT WINAPI enumvariant_Next( + IEnumVARIANT *iface, + ULONG celt, + VARIANT *rgvar, + ULONG *pceltFetched) +{ + enumvariant *This = impl_from_IEnumVARIANT( iface ); + FIXME("(%p)->(%u %p %p): stub\n", This, celt, rgvar, pceltFetched); + return E_NOTIMPL; +} + +static HRESULT WINAPI enumvariant_Skip( + IEnumVARIANT *iface, + ULONG celt) +{ + enumvariant *This = impl_from_IEnumVARIANT( iface ); + FIXME("(%p)->(%u): stub\n", This, celt); + return E_NOTIMPL; +} + +static HRESULT WINAPI enumvariant_Reset(IEnumVARIANT *iface) +{ + enumvariant *This = impl_from_IEnumVARIANT( iface ); + FIXME("(%p): stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI enumvariant_Clone( + IEnumVARIANT *iface, IEnumVARIANT **ppenum) +{ + enumvariant *This = impl_from_IEnumVARIANT( iface ); + FIXME("(%p)->(%p): stub\n", This, ppenum); + return E_NOTIMPL; +} + +static const struct IEnumVARIANTVtbl EnumVARIANTVtbl = +{ + enumvariant_QueryInterface, + enumvariant_AddRef, + enumvariant_Release, + enumvariant_Next, + enumvariant_Skip, + enumvariant_Reset, + enumvariant_Clone +}; + +static HRESULT create_enumvariant(IXMLDOMSelection *selection, BOOL own, IUnknown **penum) +{ + enumvariant *This; + + This = heap_alloc(sizeof(enumvariant)); + if (!This) return E_OUTOFMEMORY; + + This->IEnumVARIANT_iface.lpVtbl = &EnumVARIANTVtbl; + This->ref = 0; + This->selection = selection; + This->own = own; + + if (This->own) + IXMLDOMSelection_AddRef(selection); + + return IEnumVARIANT_QueryInterface(&This->IEnumVARIANT_iface, &IID_IUnknown, (void**)penum); +} + static HRESULT domselection_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID *dispid) { domselection *This = impl_from_IXMLDOMSelection( (IXMLDOMSelection*)iface ); @@ -622,6 +764,7 @@ HRESULT create_selection(xmlNodePtr node, xmlChar* query, IXMLDOMNodeList **out) This->ref = 1; This->resultPos = 0; This->node = node; + This->enumvariant = NULL; xmldoc_add_ref(This->node->doc); ctxt->error = query_serror; diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index c12aa5c..0acfa25 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -9964,7 +9964,9 @@ static void test_get_attributes(void) static void test_selection(void) { - IXMLDOMSelection *selection; + IXMLDOMSelection *selection, *selection2; + IEnumVARIANT *enum1, *enum2, *enum3; + IDispatch *disp; IXMLDOMNodeList *list; IXMLDOMDocument *doc; VARIANT_BOOL b; @@ -9982,6 +9984,85 @@ static void test_selection(void) EXPECT_HR(hr, S_OK); IXMLDOMSelection_Release(selection); + /* IEnumVARIANT tests */ + enum1 = NULL; + hr = IXMLDOMSelection_QueryInterface(selection, &IID_IEnumVARIANT, (void**)&enum1); + EXPECT_HR(hr, S_OK); + ok(enum1 != NULL, "got %p\n", enum1); + EXPECT_REF(enum1, 2); + + enum3 = NULL; + hr = IXMLDOMSelection_QueryInterface(selection, &IID_IEnumVARIANT, (void**)&enum3); + EXPECT_HR(hr, S_OK); + ok(enum3 != NULL, "got %p\n", enum3); + ok(enum1 == enum3, "got %p and %p\n", enum1, enum3); + EXPECT_REF(enum1, 3); + IEnumVARIANT_Release(enum3); + + EXPECT_REF(selection, 1); + EXPECT_REF(enum1, 2); + + enum2 = NULL; + hr = IXMLDOMSelection_get__newEnum(selection, (IUnknown**)&enum2); + EXPECT_HR(hr, S_OK); + ok(enum2 != NULL, "got %p\n", enum2); + + EXPECT_REF(selection, 2); + EXPECT_REF(enum1, 2); + EXPECT_REF(enum2, 1); + + ok(enum1 != enum2, "got %p, %p\n", enum1, enum2); + + selection2 = NULL; + hr = IEnumVARIANT_QueryInterface(enum1, &IID_IXMLDOMSelection, (void**)&selection2); + EXPECT_HR(hr, S_OK); + ok(selection2 == selection, "got %p and %p\n", selection, selection2); + EXPECT_REF(selection, 3); + EXPECT_REF(enum1, 2); + + IXMLDOMSelection_Release(selection2); + + hr = IEnumVARIANT_QueryInterface(enum1, &IID_IDispatch, (void**)&disp); + EXPECT_HR(hr, S_OK); + EXPECT_REF(selection, 3); + IDispatch_Release(disp); + + hr = IEnumVARIANT_QueryInterface(enum1, &IID_IEnumVARIANT, (void**)&enum3); + EXPECT_HR(hr, S_OK); + ok(enum3 == enum1, "got %p and %p\n", enum3, enum1); + EXPECT_REF(selection, 2); + EXPECT_REF(enum1, 3); + + IEnumVARIANT_Release(enum1); + IEnumVARIANT_Release(enum2); + + enum1 = NULL; + hr = IXMLDOMSelection_get__newEnum(selection, (IUnknown**)&enum1); + EXPECT_HR(hr, S_OK); + ok(enum1 != NULL, "got %p\n", enum1); + EXPECT_REF(enum1, 1); + EXPECT_REF(selection, 2); + + enum2 = NULL; + hr = IXMLDOMSelection_get__newEnum(selection, (IUnknown**)&enum2); + EXPECT_HR(hr, S_OK); + ok(enum2 != NULL, "got %p\n", enum2); + EXPECT_REF(enum2, 1); + EXPECT_REF(selection, 3); + + ok(enum1 != enum2, "got %p, %p\n", enum1, enum2); + + IEnumVARIANT_AddRef(enum1); + EXPECT_REF(selection, 3); + EXPECT_REF(enum1, 2); + EXPECT_REF(enum2, 1); + IEnumVARIANT_Release(enum1); + + IEnumVARIANT_Release(enum1); + IEnumVARIANT_Release(enum2); + + EXPECT_REF(selection, 1); + IXMLDOMNodeList_Release(list); hr = IXMLDOMDocument_get_childNodes(doc, &list);
1
0
0
0
Nikolay Sivov : msxml3: Don't try to use null interface pointer.
by Alexandre Julliard
24 Oct '11
24 Oct '11
Module: wine Branch: master Commit: ae6ea94bb3233c1339098dd4e9c4881fcea55e70 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ae6ea94bb3233c1339098dd4e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Oct 22 21:22:05 2011 +0400 msxml3: Don't try to use null interface pointer. --- dlls/msxml3/node.c | 7 +++++-- dlls/msxml3/tests/domdoc.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 681cd44..7219bd3 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -311,8 +311,11 @@ HRESULT node_insert_before(xmlnode *This, IXMLDOMNode *new_child, const VARIANT case VT_UNKNOWN: case VT_DISPATCH: - hr = IUnknown_QueryInterface(V_UNKNOWN(ref_child), &IID_IXMLDOMNode, (void**)&before); - if(FAILED(hr)) return hr; + if (V_UNKNOWN(ref_child)) + { + hr = IUnknown_QueryInterface(V_UNKNOWN(ref_child), &IID_IXMLDOMNode, (void**)&before); + if(FAILED(hr)) return hr; + } break; default: diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index a758880..c12aa5c 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -9341,12 +9341,32 @@ static void test_insertBefore(void) hr = IXMLDOMDocument_createElement(doc, _bstr_("elem3"), &elem3); ok(hr == S_OK, "got 0x%08x\n", hr); + hr = IXMLDOMDocument_createElement(doc, _bstr_("elem3"), &elem3); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXMLDOMDocument_createElement(doc, _bstr_("elem4"), &elem4); + ok(hr == S_OK, "got 0x%08x\n", hr); + EXPECT_NO_CHILDREN(elem1); EXPECT_NO_CHILDREN(elem2); EXPECT_NO_CHILDREN(elem3); todo_wine EXPECT_REF(elem2, 2); + V_VT(&v) = VT_DISPATCH; + V_DISPATCH(&v) = NULL; + node = NULL; + hr = IXMLDOMElement_insertBefore(elem1, (IXMLDOMNode*)elem4, v, &node); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(node == (void*)elem4, "got %p\n", node); + + EXPECT_CHILDREN(elem1); + hr = IXMLDOMElement_removeChild(elem1, (IXMLDOMNode*)elem4, NULL); + EXPECT_HR(hr, S_OK); + IXMLDOMElement_Release(elem4); + + EXPECT_NO_CHILDREN(elem1); + V_VT(&v) = VT_NULL; node = NULL; hr = IXMLDOMElement_insertBefore(elem1, (IXMLDOMNode*)elem2, v, &node);
1
0
0
0
Nikolay Sivov : shlwapi: Fix window style set with SHSetParentHwnd().
by Alexandre Julliard
24 Oct '11
24 Oct '11
Module: wine Branch: master Commit: 762aa854ca5cf720870ac61c7a3370f289291dcc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=762aa854ca5cf720870ac61c7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Oct 22 01:45:23 2011 +0400 shlwapi: Fix window style set with SHSetParentHwnd(). --- dlls/shlwapi/ordinal.c | 8 ++-- dlls/shlwapi/tests/ordinal.c | 85 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 4 deletions(-) diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 7d63899..01adaa9 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -1136,14 +1136,14 @@ HWND WINAPI SHSetParentHwnd(HWND hWnd, HWND hWndParent) TRACE("%p, %p\n", hWnd, hWndParent); if(GetParent(hWnd) == hWndParent) - return 0; + return NULL; if(hWndParent) - SHSetWindowBits(hWnd, GWL_STYLE, WS_CHILD, WS_CHILD); + SHSetWindowBits(hWnd, GWL_STYLE, WS_CHILD | WS_POPUP, WS_CHILD); else - SHSetWindowBits(hWnd, GWL_STYLE, WS_POPUP, WS_POPUP); + SHSetWindowBits(hWnd, GWL_STYLE, WS_CHILD | WS_POPUP, WS_POPUP); - return SetParent(hWnd, hWndParent); + return hWndParent ? SetParent(hWnd, hWndParent) : NULL; } /************************************************************************* diff --git a/dlls/shlwapi/tests/ordinal.c b/dlls/shlwapi/tests/ordinal.c index 40ee62e..0cb0518 100644 --- a/dlls/shlwapi/tests/ordinal.c +++ b/dlls/shlwapi/tests/ordinal.c @@ -67,6 +67,7 @@ static HRESULT (WINAPI *pSKGetValueW)(DWORD, LPCWSTR, LPCWSTR, DWORD*, void*, DW static HRESULT (WINAPI *pSKSetValueW)(DWORD, LPCWSTR, LPCWSTR, DWORD, void*, DWORD); static HRESULT (WINAPI *pSKDeleteValueW)(DWORD, LPCWSTR, LPCWSTR); static HRESULT (WINAPI *pSKAllocValueW)(DWORD, LPCWSTR, LPCWSTR, DWORD*, void**, DWORD*); +static HWND (WINAPI *pSHSetParentHwnd)(HWND, HWND); static HMODULE hmlang; static HRESULT (WINAPI *pLcidToRfc1766A)(LCID, LPSTR, INT); @@ -2925,6 +2926,7 @@ static void init_pointers(void) MAKEFUNC(SHFreeShared, 10); MAKEFUNC(GetAcceptLanguagesA, 14); MAKEFUNC(SHSetWindowBits, 165); + MAKEFUNC(SHSetParentHwnd, 167); MAKEFUNC(ConnectToConnectionPoint, 168); MAKEFUNC(SHSearchMapInt, 198); MAKEFUNC(SHCreateWorkerWindowA, 257); @@ -2949,6 +2951,88 @@ static void init_pointers(void) #undef MAKEFUNC } +static void test_SHSetParentHwnd(void) +{ + HWND hwnd, hwnd2, ret; + DWORD style; + + if (!pSHSetParentHwnd) + { + win_skip("SHSetParentHwnd not available\n"); + return; + } + + hwnd = CreateWindowA("Button", "", WS_VISIBLE, 0, 0, 10, 10, NULL, NULL, NULL, NULL); + ok(hwnd != NULL, "got %p\n", hwnd); + + hwnd2 = CreateWindowA("Button", "", WS_VISIBLE | WS_CHILD, 0, 0, 10, 10, hwnd, NULL, NULL, NULL); + ok(hwnd2 != NULL, "got %p\n", hwnd2); + + /* null params */ + ret = pSHSetParentHwnd(NULL, NULL); + ok(ret == NULL, "got %p\n", ret); + + /* set to no parent while already no parent present */ + ret = GetParent(hwnd); + ok(ret == NULL, "got %p\n", ret); + style = GetWindowLongA(hwnd, GWL_STYLE); + ok((style & (WS_POPUP|WS_CHILD)) == 0, "got style 0x%08x\n", style); + ret = pSHSetParentHwnd(hwnd, NULL); + ok(ret == NULL, "got %p\n", ret); + style = GetWindowLongA(hwnd, GWL_STYLE); + ok((style & (WS_POPUP|WS_CHILD)) == 0, "got style 0x%08x\n", style); + + /* reset to null parent from not null */ + ret = GetParent(hwnd2); + ok(ret == hwnd, "got %p\n", ret); + style = GetWindowLongA(hwnd2, GWL_STYLE); + ok((style & (WS_POPUP|WS_CHILD)) == WS_CHILD, "got style 0x%08x\n", style); + ret = pSHSetParentHwnd(hwnd2, NULL); + ok(ret == NULL, "got %p\n", ret); + style = GetWindowLongA(hwnd2, GWL_STYLE); + ok((style & (WS_POPUP|WS_CHILD)) == WS_POPUP, "got style 0x%08x\n", style); + ret = GetParent(hwnd2); + ok(ret == NULL, "got %p\n", ret); + + /* set parent back */ + style = GetWindowLongA(hwnd2, GWL_STYLE); + SetWindowLongA(hwnd2, GWL_STYLE, style & ~(WS_CHILD|WS_POPUP)); + style = GetWindowLongA(hwnd2, GWL_STYLE); + ok((style & (WS_CHILD|WS_POPUP)) == 0, "got 0x%08x\n", style); + + ret = pSHSetParentHwnd(hwnd2, hwnd); + todo_wine ok(ret == NULL, "got %p\n", ret); + + style = GetWindowLongA(hwnd2, GWL_STYLE); + ok((style & (WS_POPUP|WS_CHILD)) == WS_CHILD, "got style 0x%08x\n", style); + ret = GetParent(hwnd2); + ok(ret == hwnd, "got %p\n", ret); + + /* try to set same parent again */ + /* with WS_POPUP */ + style = GetWindowLongA(hwnd2, GWL_STYLE); + SetWindowLongA(hwnd2, GWL_STYLE, style | WS_POPUP); + ret = pSHSetParentHwnd(hwnd2, hwnd); + todo_wine ok(ret == NULL, "got %p\n", ret); + style = GetWindowLongA(hwnd2, GWL_STYLE); + ok((style & (WS_CHILD|WS_POPUP)) == WS_CHILD, "got 0x%08x\n", style); + ret = GetParent(hwnd2); + ok(ret == hwnd, "got %p\n", ret); + + /* without WS_POPUP */ + style = GetWindowLongA(hwnd2, GWL_STYLE); + SetWindowLongA(hwnd2, GWL_STYLE, style | ~WS_POPUP); + ret = pSHSetParentHwnd(hwnd2, hwnd); + todo_wine ok(ret == hwnd, "got %p\n", ret); + style = GetWindowLongA(hwnd2, GWL_STYLE); + ok((style & (WS_CHILD|WS_POPUP)) == WS_CHILD, "got 0x%08x\n", style); + ret = GetParent(hwnd2); + ok(ret == hwnd, "got %p\n", ret); + + DestroyWindow(hwnd); + DestroyWindow(hwnd2); +} + START_TEST(ordinal) { hShlwapi = GetModuleHandleA("shlwapi.dll"); @@ -2988,6 +3072,7 @@ START_TEST(ordinal) test_SHGetIniString(); test_SHSetIniString(); test_SHGetShellKey(); + test_SHSetParentHwnd(); FreeLibrary(hshell32); FreeLibrary(hmlang);
1
0
0
0
Juan Lang : wintrust: Add FindCertsByIssuer stub.
by Alexandre Julliard
24 Oct '11
24 Oct '11
Module: wine Branch: master Commit: 398b62ba32feee1b324205fade3ff7b06f78be5f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=398b62ba32feee1b324205fad…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Sun Oct 23 11:50:36 2011 -0700 wintrust: Add FindCertsByIssuer stub. --- dlls/wintrust/wintrust.spec | 2 +- dlls/wintrust/wintrust_main.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/dlls/wintrust/wintrust.spec b/dlls/wintrust/wintrust.spec index 53a2468..b0332cf 100644 --- a/dlls/wintrust/wintrust.spec +++ b/dlls/wintrust/wintrust.spec @@ -45,7 +45,7 @@ @ stdcall DriverCleanupPolicy(ptr) @ stdcall DriverFinalPolicy(ptr) @ stdcall DriverInitializePolicy(ptr) -@ stub FindCertsByIssuer +@ stdcall FindCertsByIssuer(ptr ptr ptr ptr long wstr long) @ stdcall GenericChainCertificateTrust(ptr) @ stdcall GenericChainFinalProv(ptr) @ stdcall HTTPSCertificateTrust(ptr) diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c index 302b2bd..9b8dd85 100644 --- a/dlls/wintrust/wintrust_main.c +++ b/dlls/wintrust/wintrust_main.c @@ -1216,3 +1216,16 @@ BOOL WINAPI IsCatalogFile(HANDLE hFile, WCHAR *pwszFileName) return FALSE; return IsEqualGUID(&guid, &catGUID); } + +/*********************************************************************** + * FindCertsByIssuer + */ +HRESULT WINAPI FindCertsByIssuer(PCERT_CHAIN pCertChains, DWORD *pcbCertChains, + DWORD *pcCertChains, BYTE* pbEncodedIssuerName, DWORD cbEncodedIssuerName, + LPCWSTR pwszPurpose, DWORD dwKeySpec) +{ + FIXME("(%p, %p, %p, %p, %d, %s, %d): stub\n", pCertChains, pcbCertChains, + pcCertChains, pbEncodedIssuerName, cbEncodedIssuerName, + debugstr_w(pwszPurpose), dwKeySpec); + return E_FAIL; +}
1
0
0
0
Juan Lang : wincrypt.h: Add FindCertsByIssuer declaration.
by Alexandre Julliard
24 Oct '11
24 Oct '11
Module: wine Branch: master Commit: 259dc8c17c87c90b412da1528b8947f2d236d006 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=259dc8c17c87c90b412da1528…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Sun Oct 23 11:50:19 2011 -0700 wincrypt.h: Add FindCertsByIssuer declaration. --- include/wincrypt.h | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/include/wincrypt.h b/include/wincrypt.h index 1e02247..843e09d 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -833,6 +833,12 @@ typedef struct _CTL_VERIFY_USAGE_STATUS { #define CERT_VERIFY_ALLOW_MORE_USAGE_FLAG 0x8 #define CERT_VERIFY_UPDATED_CTL_FLAG 0x1 +typedef struct _CERT_CHAIN { + DWORD cCerts; + PCERT_BLOB certs; + CRYPT_KEY_PROV_INFO keyLocatorInfo; +} CERT_CHAIN, *PCERT_CHAIN; + typedef struct _CERT_REVOCATION_STATUS { DWORD cbSize; DWORD dwIndex; @@ -4528,6 +4534,11 @@ BOOL WINAPI CryptRetrieveObjectByUrlW(LPCWSTR pszURL, LPCSTR pszObjectOid, PCRYPT_RETRIEVE_AUX_INFO pAuxInfo); #define CryptRetrieveObjectByUrl WINELIB_NAME_AW(CryptRetrieveObjectByUrl) +/* Not found in crypt32.dll but in softpub.dll */ +HRESULT WINAPI FindCertsByIssuer(PCERT_CHAIN pCertChains, DWORD *pcbCertChains, + DWORD *pcCertChains, BYTE* pbEncodedIssuerName, DWORD cbEncodedIssuerName, + LPCWSTR pwszPurpose, DWORD dwKeySpec); + #ifdef __cplusplus } #endif
1
0
0
0
Henri Verbeet : wined3d: Make the device parameter to SetupForBlit() const.
by Alexandre Julliard
24 Oct '11
24 Oct '11
Module: wine Branch: master Commit: 284ba950ef164dce77d86637ac75f50012e7dd04 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=284ba950ef164dce77d86637a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Oct 23 18:24:01 2011 +0200 wined3d: Make the device parameter to SetupForBlit() const. --- dlls/wined3d/context.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 2742b54..66460d9 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1717,7 +1717,7 @@ static inline void set_blit_dimension(UINT width, UINT height) { * *****************************************************************************/ /* Context activation is done by the caller. */ -static void SetupForBlit(struct wined3d_device *device, struct wined3d_context *context) +static void SetupForBlit(const struct wined3d_device *device, struct wined3d_context *context) { int i; const struct wined3d_gl_info *gl_info = context->gl_info;
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
79
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
Results per page:
10
25
50
100
200