winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
January 2010
----- 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
615 discussions
Start a n
N
ew thread
Jörg Höhle : wine.inf: Correct MCI entries.
by Alexandre Julliard
19 Jan '10
19 Jan '10
Module: wine Branch: master Commit: ac1ad1372dbab6b2efffb0a5cf6bea3370866982 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ac1ad1372dbab6b2efffb0a5c…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Thu Dec 3 21:44:50 2009 +0100 wine.inf: Correct MCI entries. --- tools/wine.inf.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/wine.inf.in b/tools/wine.inf.in index e03a7e4..d1d528c 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -492,6 +492,7 @@ HKLM,%Mci32Str%,"AVIVideo",,"mciavi32.dll" HKLM,%Mci32Str%,"CDAudio",,"mcicda.dll" HKLM,%Mci32Str%,"Sequencer",,"mciseq.dll" HKLM,%Mci32Str%,"WaveAudio",,"mciwave.dll" +HKLM,%Mci32Str%,"MPEGVideo",,"mciqtz32.dll" HKLM,%MciExtStr%,"aifc",,"MPEGVideo" HKLM,%MciExtStr%,"asf",,"MPEGVideo" @@ -514,7 +515,6 @@ HKLM,%MciExtStr%,"mpeg",,"MPEGVideo" HKLM,%MciExtStr%,"mpg",,"MPEGVideo" HKLM,%MciExtStr%,"mpv",,"MPEGVideo" HKLM,%MciExtStr%,"mpv2",,"MPEGVideo" -HKLM,%MciExtStr%,"rmi",,"MPEGVideo" HKLM,%MciExtStr%,"rmi",,"Sequencer" HKLM,%MciExtStr%,"snd",,"MPEGVideo" HKLM,%MciExtStr%,"wav",,"WaveAudio"
1
0
0
0
Nikolay Sivov : xmllite: Add stub implementation of IXmlReader interface.
by Alexandre Julliard
19 Jan '10
19 Jan '10
Module: wine Branch: master Commit: f9c51f8de96a809c857903e217d4f884d2af9b40 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9c51f8de96a809c857903e21…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue Jan 19 00:18:22 2010 +0300 xmllite: Add stub implementation of IXmlReader interface. --- dlls/xmllite/reader.c | 265 ++++++++++++++++++++++++++++++++++++++++++- dlls/xmllite/tests/reader.c | 7 +- 2 files changed, 264 insertions(+), 8 deletions(-) diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c index 76097a5..cd30f48 100644 --- a/dlls/xmllite/reader.c +++ b/dlls/xmllite/reader.c @@ -31,8 +31,269 @@ WINE_DEFAULT_DEBUG_CHANNEL(xmllite); -HRESULT WINAPI CreateXmlReader(REFIID riid, void **pObject, IMalloc *pMalloc) +typedef struct _xmlreader +{ + const IXmlReaderVtbl *lpVtbl; + LONG ref; +} xmlreader; + +static inline xmlreader *impl_from_IXmlReader(IXmlReader *iface) +{ + return (xmlreader *)((char*)iface - FIELD_OFFSET(xmlreader, lpVtbl)); +} + +static HRESULT WINAPI xmlreader_QueryInterface(IXmlReader *iface, REFIID riid, void** ppvObject) +{ + xmlreader *This = impl_from_IXmlReader(iface); + + TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IXmlReader)) + { + *ppvObject = iface; + } + else + { + FIXME("interface %s not implemented\n", debugstr_guid(riid)); + return E_NOINTERFACE; + } + + IXmlReader_AddRef(iface); + + return S_OK; +} + +static ULONG WINAPI xmlreader_AddRef(IXmlReader *iface) +{ + xmlreader *This = impl_from_IXmlReader(iface); + TRACE("%p\n", This); + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI xmlreader_Release(IXmlReader *iface) +{ + xmlreader *This = impl_from_IXmlReader(iface); + LONG ref; + + TRACE("%p\n", This); + + ref = InterlockedDecrement(&This->ref); + if (ref == 0) + { + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI xmlreader_SetInput(IXmlReader* iface, IUnknown *input) +{ + FIXME("(%p %p): stub\n", iface, input); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetProperty(IXmlReader* iface, UINT property, LONG_PTR *value) +{ + FIXME("(%p %u %p): stub\n", iface, property, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_SetProperty(IXmlReader* iface, UINT property, LONG_PTR value) +{ + FIXME("(%p %u %lu): stub\n", iface, property, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_Read(IXmlReader* iface, XmlNodeType *node_type) +{ + FIXME("(%p %p): stub\n", iface, node_type); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetNodeType(IXmlReader* iface, XmlNodeType *node_type) +{ + FIXME("(%p %p): stub\n", iface, node_type); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_MoveToFirstAttribute(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_MoveToNextAttribute(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_MoveToAttributeByName(IXmlReader* iface, + LPCWSTR local_name, + LPCWSTR namespaceUri) +{ + FIXME("(%p %p %p): stub\n", iface, local_name, namespaceUri); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_MoveToElement(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetQualifiedName(IXmlReader* iface, LPCWSTR *qualifiedName, + UINT *qualifiedName_length) +{ + FIXME("(%p %p %p): stub\n", iface, qualifiedName, qualifiedName_length); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetNamespaceUri(IXmlReader* iface, + LPCWSTR *namespaceUri, + UINT *namespaceUri_length) { - FIXME("(%s, %p, %p)\n", wine_dbgstr_guid(riid), pObject, pMalloc); + FIXME("(%p %p %p): stub\n", iface, namespaceUri, namespaceUri_length); return E_NOTIMPL; } + +static HRESULT WINAPI xmlreader_GetLocalName(IXmlReader* iface, + LPCWSTR *local_name, + UINT *local_name_length) +{ + FIXME("(%p %p %p): stub\n", iface, local_name, local_name_length); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetPrefix(IXmlReader* iface, + LPCWSTR *prefix, + UINT *prefix_length) +{ + FIXME("(%p %p %p): stub\n", iface, prefix, prefix_length); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetValue(IXmlReader* iface, + LPCWSTR *value, + UINT *value_length) +{ + FIXME("(%p %p %p): stub\n", iface, value, value_length); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_ReadValueChunk(IXmlReader* iface, + WCHAR *buffer, + UINT chunk_size, + UINT *read) +{ + FIXME("(%p %p %u %p): stub\n", iface, buffer, chunk_size, read); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetBaseUri(IXmlReader* iface, + LPCWSTR *baseUri, + UINT *baseUri_length) +{ + FIXME("(%p %p %p): stub\n", iface, baseUri, baseUri_length); + return E_NOTIMPL; +} + +static BOOL WINAPI xmlreader_IsDefault(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static BOOL WINAPI xmlreader_IsEmptyElement(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetLineNumber(IXmlReader* iface, UINT *lineNumber) +{ + FIXME("(%p %p): stub\n", iface, lineNumber); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetLinePosition(IXmlReader* iface, UINT *linePosition) +{ + FIXME("(%p %p): stub\n", iface, linePosition); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetAttributeCount(IXmlReader* iface, UINT *attributeCount) +{ + FIXME("(%p %p): stub\n", iface, attributeCount); + return E_NOTIMPL; +} + +static HRESULT WINAPI xmlreader_GetDepth(IXmlReader* iface, UINT *depth) +{ + FIXME("(%p %p): stub\n", iface, depth); + return E_NOTIMPL; +} + +static BOOL WINAPI xmlreader_IsEOF(IXmlReader* iface) +{ + FIXME("(%p): stub\n", iface); + return E_NOTIMPL; +} + +static const struct IXmlReaderVtbl xmlreader_vtbl = +{ + xmlreader_QueryInterface, + xmlreader_AddRef, + xmlreader_Release, + xmlreader_SetInput, + xmlreader_GetProperty, + xmlreader_SetProperty, + xmlreader_Read, + xmlreader_GetNodeType, + xmlreader_MoveToFirstAttribute, + xmlreader_MoveToNextAttribute, + xmlreader_MoveToAttributeByName, + xmlreader_MoveToElement, + xmlreader_GetQualifiedName, + xmlreader_GetNamespaceUri, + xmlreader_GetLocalName, + xmlreader_GetPrefix, + xmlreader_GetValue, + xmlreader_ReadValueChunk, + xmlreader_GetBaseUri, + xmlreader_IsDefault, + xmlreader_IsEmptyElement, + xmlreader_GetLineNumber, + xmlreader_GetLinePosition, + xmlreader_GetAttributeCount, + xmlreader_GetDepth, + xmlreader_IsEOF +}; + +HRESULT WINAPI CreateXmlReader(REFIID riid, void **pObject, IMalloc *pMalloc) +{ + xmlreader *reader; + + TRACE("(%s, %p, %p)\n", wine_dbgstr_guid(riid), pObject, pMalloc); + + if (pMalloc) FIXME("custom IMalloc not supported yet\n"); + + if (!IsEqualGUID(riid, &IID_IXmlReader)) + { + ERR("Unexpected IID requested -> (%s)\n", wine_dbgstr_guid(riid)); + return E_FAIL; + } + + reader = HeapAlloc(GetProcessHeap(), 0, sizeof (*reader)); + if(!reader) return E_OUTOFMEMORY; + + reader->lpVtbl = &xmlreader_vtbl; + reader->ref = 1; + + *pObject = &reader->lpVtbl; + + TRACE("returning iface %p\n", *pObject); + + return S_OK; +} diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c index 4d95353..18eed5c 100644 --- a/dlls/xmllite/tests/reader.c +++ b/dlls/xmllite/tests/reader.c @@ -65,12 +65,7 @@ static void test_reader_create(void) } hr = pCreateXmlReader(&IID_IXmlReader, (LPVOID*)&reader, NULL); - todo_wine ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - if (hr != S_OK) - { - skip("Failed to create IXmlReader instance\n"); - return; - } + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); hr = CoGetMalloc(1, &imalloc); ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
1
0
0
0
Nikolay Sivov : xmllite/tests: Add basic test structure for IXmlReader.
by Alexandre Julliard
19 Jan '10
19 Jan '10
Module: wine Branch: master Commit: 80a546cad5ed23c3b430180ed4c943631b1d85a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=80a546cad5ed23c3b430180ed…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue Jan 19 00:05:53 2010 +0300 xmllite/tests: Add basic test structure for IXmlReader. --- configure | 9 ++++ configure.ac | 1 + dlls/xmllite/Makefile.in | 1 + dlls/xmllite/reader.c | 38 +++++++++++++++ dlls/xmllite/tests/Makefile.in | 13 +++++ dlls/xmllite/tests/reader.c | 100 ++++++++++++++++++++++++++++++++++++++++ dlls/xmllite/xmllite.spec | 2 +- 7 files changed, 163 insertions(+), 1 deletions(-) diff --git a/configure b/configure index b92e426..018a237 100755 --- a/configure +++ b/configure @@ -17409,6 +17409,14 @@ dlls/xmllite/Makefile: dlls/xmllite/Makefile.in dlls/Makedll.rules" ac_config_files="$ac_config_files dlls/xmllite/Makefile" ALL_MAKEFILES="$ALL_MAKEFILES \\ + dlls/xmllite/tests/Makefile" +test "x$enable_tests" != xno && ALL_TEST_DIRS="$ALL_TEST_DIRS \\ + xmllite/tests" +ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS +dlls/xmllite/tests/Makefile: dlls/xmllite/tests/Makefile.in dlls/Maketest.rules" +ac_config_files="$ac_config_files dlls/xmllite/tests/Makefile" + +ALL_MAKEFILES="$ALL_MAKEFILES \\ documentation/Makefile" test "x$enable_documentation" != xno && ALL_TOP_DIRS="$ALL_TOP_DIRS \\ documentation" @@ -19218,6 +19226,7 @@ do "dlls/xinput1_3/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/xinput1_3/tests/Makefile" ;; "dlls/xinput9_1_0/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/xinput9_1_0/Makefile" ;; "dlls/xmllite/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/xmllite/Makefile" ;; + "dlls/xmllite/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/xmllite/tests/Makefile" ;; "documentation/Makefile") CONFIG_FILES="$CONFIG_FILES documentation/Makefile" ;; "fonts/Makefile") CONFIG_FILES="$CONFIG_FILES fonts/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; diff --git a/configure.ac b/configure.ac index 943938b..01cf3a7 100644 --- a/configure.ac +++ b/configure.ac @@ -2587,6 +2587,7 @@ WINE_CONFIG_MAKEFILE([dlls/xinput1_3/Makefile],[dlls/Makedll.rules],[dlls],[ALL_ WINE_CONFIG_MAKEFILE([dlls/xinput1_3/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests]) WINE_CONFIG_MAKEFILE([dlls/xinput9_1_0/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/xmllite/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) +WINE_CONFIG_MAKEFILE([dlls/xmllite/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests]) WINE_CONFIG_MAKEFILE([documentation/Makefile],[Make.rules],[],[ALL_TOP_DIRS]) WINE_CONFIG_MAKEFILE([fonts/Makefile],[Make.rules],[],[ALL_TOP_DIRS]) WINE_CONFIG_MAKEFILE([include/Makefile],[Make.rules],[],[ALL_TOP_DIRS]) diff --git a/dlls/xmllite/Makefile.in b/dlls/xmllite/Makefile.in index 17d8dd1..9268f7d 100644 --- a/dlls/xmllite/Makefile.in +++ b/dlls/xmllite/Makefile.in @@ -6,6 +6,7 @@ MODULE = xmllite.dll IMPORTS = kernel32 C_SRCS = \ + reader.c \ xmllite_main.c @MAKE_DLL_RULES@ diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c new file mode 100644 index 0000000..76097a5 --- /dev/null +++ b/dlls/xmllite/reader.c @@ -0,0 +1,38 @@ +/* + * IXmlReader implementation + * + * Copyright 2010 Nikolay Sivov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "initguid.h" +#include "objbase.h" +#include "xmllite.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(xmllite); + +HRESULT WINAPI CreateXmlReader(REFIID riid, void **pObject, IMalloc *pMalloc) +{ + FIXME("(%s, %p, %p)\n", wine_dbgstr_guid(riid), pObject, pMalloc); + return E_NOTIMPL; +} diff --git a/dlls/xmllite/tests/Makefile.in b/dlls/xmllite/tests/Makefile.in new file mode 100644 index 0000000..250c493 --- /dev/null +++ b/dlls/xmllite/tests/Makefile.in @@ -0,0 +1,13 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = xmllite.dll +IMPORTS = kernel32 ole32 + +CTESTS = \ + reader.c + +@MAKE_TEST_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c new file mode 100644 index 0000000..4d95353 --- /dev/null +++ b/dlls/xmllite/tests/reader.c @@ -0,0 +1,100 @@ +/* + * XMLLite IXmlReader tests + * + * Copyright 2010 (C) Nikolay Sivov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "ole2.h" +#include "xmllite.h" +#include "initguid.h" +#include "wine/test.h" + +DEFINE_GUID(IID_IXmlReader, 0x7279fc81, 0x709d, 0x4095, 0xb6, 0x3d, 0x69, + 0xfe, 0x4b, 0x0d, 0x90, 0x30); + +HRESULT WINAPI (*pCreateXmlReader)(REFIID riid, void **ppvObject, IMalloc *pMalloc); + +static BOOL init_pointers(void) +{ + /* don't free module here, it's to be unloaded on exit */ + HMODULE mod = LoadLibraryA("xmllite.dll"); + + if (!mod) + { + win_skip("xmllite library not available\n"); + return FALSE; + } + + pCreateXmlReader = (void*)GetProcAddress(mod, "CreateXmlReader"); + if (!pCreateXmlReader) return FALSE; + + return TRUE; +} + +static void test_reader_create(void) +{ + HRESULT hr; + IXmlReader *reader; + IMalloc *imalloc; + + /* crashes native */ + if (0) + { + hr = pCreateXmlReader(&IID_IXmlReader, NULL, NULL); + hr = pCreateXmlReader(NULL, (LPVOID*)&reader, NULL); + } + + hr = pCreateXmlReader(&IID_IXmlReader, (LPVOID*)&reader, NULL); + todo_wine ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + if (hr != S_OK) + { + skip("Failed to create IXmlReader instance\n"); + return; + } + + hr = CoGetMalloc(1, &imalloc); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + hr = IMalloc_DidAlloc(imalloc, reader); + ok(hr != 1, "Expected 0 or -1, got %08x\n", hr); + + IXmlReader_Release(reader); +} + +START_TEST(reader) +{ + HRESULT r; + + r = CoInitialize( NULL ); + ok( r == S_OK, "failed to init com\n"); + + if (!init_pointers()) + { + CoUninitialize(); + return; + } + + test_reader_create(); + + CoUninitialize(); +} diff --git a/dlls/xmllite/xmllite.spec b/dlls/xmllite/xmllite.spec index cf43637..9b5a84a 100644 --- a/dlls/xmllite/xmllite.spec +++ b/dlls/xmllite/xmllite.spec @@ -1,4 +1,4 @@ -@ stub CreateXmlReader +@ stdcall CreateXmlReader(ptr ptr ptr) @ stub CreateXmlReaderInputWithEncodingCodePage @ stub CreateXmlReaderInputWithEncodingName @ stub CreateXmlWriter
1
0
0
0
Nikolay Sivov : include: Add IXmlReader interface definition.
by Alexandre Julliard
19 Jan '10
19 Jan '10
Module: wine Branch: master Commit: ea762fd2a420e53f89bd1d1f7a53f90d0fc5c7ed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ea762fd2a420e53f89bd1d1f7…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Jan 18 23:43:11 2010 +0300 include: Add IXmlReader interface definition. --- .gitignore | 1 + include/Makefile.in | 3 +- include/xmllite.idl | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 1 deletions(-) diff --git a/.gitignore b/.gitignore index 7dd1f9d..f2a0bd8 100644 --- a/.gitignore +++ b/.gitignore @@ -212,6 +212,7 @@ include/wtypes.h include/wuapi.h include/xmldom.h include/xmldso.h +include/xmllite.h libs/wpp/ppl.yy.c libs/wpp/ppy.tab.c libs/wpp/ppy.tab.h diff --git a/include/Makefile.in b/include/Makefile.in index f957a7b..0c01cfd 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -96,7 +96,8 @@ PUBLIC_IDL_H_SRCS = \ wtypes.idl \ wuapi.idl \ xmldom.idl \ - xmldso.idl + xmldso.idl \ + xmllite.idl IDL_TLB_SRCS = \ stdole2.idl diff --git a/include/xmllite.idl b/include/xmllite.idl new file mode 100644 index 0000000..9ba429f --- /dev/null +++ b/include/xmllite.idl @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2010 Nikolay Sivov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "objidl.idl"; +import "oaidl.idl"; + +typedef enum XmlNodeType { + XmlNodeType_None = 0, + XmlNodeType_Element = 1, + XmlNodeType_Attribute = 2, + XmlNodeType_Text = 3, + XmlNodeType_CDATA = 4, + XmlNodeType_ProcessingInstruction = 7, + XmlNodeType_Comment = 8, + XmlNodeType_DocumentType = 10, + XmlNodeType_Whitespace = 13, + XmlNodeType_EndElement = 15, + XmlNodeType_XmlDeclaration = 17, + _XmlNodeType_Last = 17 +} XmlNodeType; + +/* IXmlReader */ +[ + local, + object, + uuid(7279fc81-709d-4095-b63d-69fe4b0d9030), + pointer_default(unique) +] +interface IXmlReader : IUnknown +{ + HRESULT SetInput( [in] IUnknown *input); + HRESULT GetProperty( [in] UINT property, [out] LONG_PTR *value); + HRESULT SetProperty( [in] UINT property, [in] LONG_PTR value); + HRESULT Read( [out] XmlNodeType *node_type); + HRESULT GetNodeType( [out] XmlNodeType *node_type); + HRESULT MoveToFirstAttribute(void); + HRESULT MoveToNextAttribute(void); + HRESULT MoveToAttributeByName( [in] LPCWSTR local_name, + [in] LPCWSTR namespaceUri); + HRESULT MoveToElement(void); + HRESULT GetQualifiedName( [out] LPCWSTR *qualifiedName, + [out] UINT *qualifiedName_length); + HRESULT GetNamespaceUri( [out] LPCWSTR *namespaceUri, + [out] UINT *nnamespaceUri_length); + HRESULT GetLocalName( [out] LPCWSTR *local_name, + [out] UINT *locale_name_length); + HRESULT GetPrefix( [out] LPCWSTR *prefix, + [out] UINT *prefix_length); + HRESULT GetValue( [out] LPCWSTR *value, + [out] UINT *value_length); + HRESULT ReadValueChunk( [out] WCHAR *buffer, + [in] UINT chunk_size, + [in,out] UINT *read); + HRESULT GetBaseUri( [out] LPCWSTR *baseUri, + [out] UINT *baseUri_length); + BOOL IsDefault(void); + BOOL IsEmptyElement(void); + HRESULT GetLineNumber( [out] UINT *lineNumber); + HRESULT GetLinePosition( [out] UINT *linePosition); + HRESULT GetAttributeCount( [out] UINT *attributeCount); + HRESULT GetDepth( [out] UINT *depth); + BOOL IsEOF(void); +} + +/* IXmlReader construction */ +cpp_quote("STDAPI CreateXmlReader(REFIID riid, void **ppvObject, IMalloc *pMalloc);")
1
0
0
0
Nikolay Sivov : msxml3: Use a helper to check for created content handler.
by Alexandre Julliard
19 Jan '10
19 Jan '10
Module: wine Branch: master Commit: ff992282aa49efd23c5d537b77ba281d2fa7141f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff992282aa49efd23c5d537b7…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Jan 18 23:30:50 2010 +0300 msxml3: Use a helper to check for created content handler. --- dlls/msxml3/saxreader.c | 24 +++++++++++------------- 1 files changed, 11 insertions(+), 13 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 2573e84..ff8b41a 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -126,6 +126,11 @@ static inline saxattributes *impl_from_ISAXAttributes( ISAXAttributes *iface ) return (saxattributes *)((char*)iface - FIELD_OFFSET(saxattributes, lpSAXAttributesVtbl)); } +static inline BOOL has_content_handler(const saxlocator *locator) +{ + return (locator->vbInterface && locator->saxreader->vbcontentHandler) || + (!locator->vbInterface && locator->saxreader->contentHandler); +} static HRESULT namespacePush(saxlocator *locator, int ns) { @@ -978,8 +983,7 @@ static void libxmlStartDocument(void *ctx) saxlocator *This = ctx; HRESULT hr; - if((This->vbInterface && This->saxreader->vbcontentHandler) - || (!This->vbInterface && This->saxreader->contentHandler)) + if(has_content_handler(This)) { if(This->vbInterface) hr = IVBSAXContentHandler_startDocument(This->saxreader->vbcontentHandler); @@ -1003,8 +1007,7 @@ static void libxmlEndDocument(void *ctx) if(This->ret != S_OK) return; - if((This->vbInterface && This->saxreader->vbcontentHandler) - || (!This->vbInterface && This->saxreader->contentHandler)) + if(has_content_handler(This)) { if(This->vbInterface) hr = IVBSAXContentHandler_endDocument(This->saxreader->vbcontentHandler); @@ -1039,8 +1042,7 @@ static void libxmlStartElementNS( update_position(This, (xmlChar*)This->pParserCtxt->input->cur+1); hr = namespacePush(This, nb_namespaces); - if(hr==S_OK && ((This->vbInterface && This->saxreader->vbcontentHandler) - || (!This->vbInterface && This->saxreader->contentHandler))) + if(hr==S_OK && has_content_handler(This)) { for(index=0; index<nb_namespaces; index++) { @@ -1119,8 +1121,7 @@ static void libxmlEndElementNS( nsNr = namespacePop(This); - if((This->vbInterface && This->saxreader->vbcontentHandler) - || (!This->vbInterface && This->saxreader->contentHandler)) + if(has_content_handler(This)) { NamespaceUri = bstr_from_xmlChar(URI); LocalName = bstr_from_xmlChar(localname); @@ -1186,9 +1187,7 @@ static void libxmlCharacters( xmlChar *end; BOOL lastEvent = FALSE; - if((This->vbInterface && !This->saxreader->vbcontentHandler) - || (!This->vbInterface && !This->saxreader->contentHandler)) - return; + if(!(has_content_handler(This))) return; cur = (xmlChar*)ch; if(*(ch-1)=='\r') cur--; @@ -1384,8 +1383,7 @@ static void libxmlCDataBlock(void *ctx, const xmlChar *value, int len) if(change) *end = '\n'; - if((This->vbInterface && This->saxreader->vbcontentHandler) || - (!This->vbInterface && This->saxreader->contentHandler)) + if(has_content_handler(This)) { Chars = bstr_from_xmlCharN(cur, end-cur+1); if(This->vbInterface)
1
0
0
0
Nikolay Sivov : msxml3: Implement IXMLDOMElement::removeAttribute().
by Alexandre Julliard
19 Jan '10
19 Jan '10
Module: wine Branch: master Commit: 7724b053e24d974b8a0005b5cb921e18cb30541c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7724b053e24d974b8a0005b5c…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Jan 18 23:29:21 2010 +0300 msxml3: Implement IXMLDOMElement::removeAttribute(). --- dlls/msxml3/element.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c index b698042..e6f2f76 100644 --- a/dlls/msxml3/element.c +++ b/dlls/msxml3/element.c @@ -598,8 +598,19 @@ static HRESULT WINAPI domelem_removeAttribute( IXMLDOMElement *iface, BSTR p) { - FIXME("\n"); - return E_NOTIMPL; + domelem *This = impl_from_IXMLDOMElement( iface ); + IXMLDOMNamedNodeMap *attr; + HRESULT hr; + + TRACE("(%p)->(%s)", This, debugstr_w(p)); + + hr = IXMLDOMElement_get_attributes(iface, &attr); + if (hr != S_OK) return hr; + + hr = IXMLDOMNamedNodeMap_removeNamedItem(attr, p, NULL); + IXMLDOMNamedNodeMap_Release(attr); + + return hr; } static HRESULT WINAPI domelem_getAttributeNode(
1
0
0
0
Ilya Shpigor : gdi32: Additional checking in the test for font creation with the OEM charset.
by Alexandre Julliard
19 Jan '10
19 Jan '10
Module: wine Branch: master Commit: 91a1321a97af2162bb663c3dd9a5958d63ab5d50 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91a1321a97af2162bb663c3dd…
Author: Ilya Shpigor <shpigor(a)etersoft.ru> Date: Mon Jan 18 12:08:26 2010 +0300 gdi32: Additional checking in the test for font creation with the OEM charset. --- dlls/gdi32/tests/font.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 904f0d0..87ca494 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -2848,7 +2848,7 @@ static void test_orientation(void) static void test_oemcharset(void) { HDC hdc; - LOGFONTA lf; + LOGFONTA lf, clf; HFONT hfont, old_hfont; int charset; @@ -2863,7 +2863,12 @@ static void test_oemcharset(void) charset = GetTextCharset(hdc); todo_wine ok(charset == OEM_CHARSET, "expected %d charset, got %d\n", OEM_CHARSET, charset); - SelectObject(hdc, old_hfont); + hfont = SelectObject(hdc, old_hfont); + GetObjectA(hfont, sizeof(clf), &clf); + ok(!lstrcmpA(clf.lfFaceName, lf.lfFaceName), "expected %s face name, got %s\n", lf.lfFaceName, clf.lfFaceName); + ok(clf.lfPitchAndFamily == lf.lfPitchAndFamily, "expected %x family, got %x\n", lf.lfPitchAndFamily, clf.lfPitchAndFamily); + ok(clf.lfCharSet == lf.lfCharSet, "expected %d charset, got %d\n", lf.lfCharSet, clf.lfCharSet); + ok(clf.lfHeight == lf.lfHeight, "expected %d height, got %d\n", lf.lfHeight, clf.lfHeight); DeleteObject(hfont); DeleteDC(hdc); }
1
0
0
0
Alexandre Julliard : ntdll: Fix the NtCreateEvent prototype.
by Alexandre Julliard
19 Jan '10
19 Jan '10
Module: wine Branch: master Commit: 3b67ad9bd47b553c82a85bdf6b205555acc496d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3b67ad9bd47b553c82a85bdf6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jan 18 20:34:54 2010 +0100 ntdll: Fix the NtCreateEvent prototype. It takes an event type, not a manual reset flag. --- dlls/kernel32/console.c | 2 +- dlls/kernel32/except.c | 2 +- dlls/kernel32/sync.c | 3 ++- dlls/krnl386.exe16/task.c | 2 +- dlls/ntdll/reg.c | 2 +- dlls/ntdll/serial.c | 2 +- dlls/ntdll/sync.c | 10 +++------- dlls/ntdll/threadpool.c | 8 ++++---- include/winternl.h | 2 +- 9 files changed, 15 insertions(+), 18 deletions(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 4aa0b44..eb3e21d 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -1195,7 +1195,7 @@ static BOOL start_console_renderer(STARTUPINFOA* si) attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; - NtCreateEvent(&hEvent, EVENT_ALL_ACCESS, &attr, TRUE, FALSE); + NtCreateEvent(&hEvent, EVENT_ALL_ACCESS, &attr, NotificationEvent, FALSE); if (!hEvent) return FALSE; /* first try environment variable */ diff --git a/dlls/kernel32/except.c b/dlls/kernel32/except.c index 701f921..d6dea99 100644 --- a/dlls/kernel32/except.c +++ b/dlls/kernel32/except.c @@ -366,7 +366,7 @@ static int start_debugger_atomic(PEXCEPTION_POINTERS epointers) /* ask for manual reset, so that once the debugger is started, * every thread will know it */ - NtCreateEvent( &hEvent, EVENT_ALL_ACCESS, &attr, TRUE, FALSE ); + NtCreateEvent( &hEvent, EVENT_ALL_ACCESS, &attr, NotificationEvent, FALSE ); if (InterlockedCompareExchangePointer( &hRunOnce, hEvent, 0 ) == 0) { /* ok, our event has been set... we're the winning thread */ diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c index 8918f3d..fbe055d 100644 --- a/dlls/kernel32/sync.c +++ b/dlls/kernel32/sync.c @@ -489,7 +489,8 @@ HANDLE WINAPI CreateEventExW( SECURITY_ATTRIBUTES *sa, LPCWSTR name, DWORD flags attr.RootDirectory = get_BaseNamedObjects_handle(); } - status = NtCreateEvent( &ret, access, &attr, (flags & CREATE_EVENT_MANUAL_RESET) != 0, + status = NtCreateEvent( &ret, access, &attr, + (flags & CREATE_EVENT_MANUAL_RESET) ? NotificationEvent : SynchronizationEvent, (flags & CREATE_EVENT_INITIAL_SET) != 0 ); if (status == STATUS_OBJECT_NAME_EXISTS) SetLastError( ERROR_ALREADY_EXISTS ); diff --git a/dlls/krnl386.exe16/task.c b/dlls/krnl386.exe16/task.c index 06f9d94..1b252e9 100644 --- a/dlls/krnl386.exe16/task.c +++ b/dlls/krnl386.exe16/task.c @@ -350,7 +350,7 @@ static TDB *TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, LPCSTR cmdline, BYT /* Create scheduler event for 16-bit tasks */ if ( !(pTask->flags & TDBF_WIN32) ) - NtCreateEvent( &pTask->hEvent, EVENT_ALL_ACCESS, NULL, TRUE, FALSE ); + NtCreateEvent( &pTask->hEvent, EVENT_ALL_ACCESS, NULL, NotificationEvent, FALSE ); if (!initial_task) initial_task = hTask; diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index cb214a7..50ec081 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -651,7 +651,7 @@ NTSTATUS WINAPI NtNotifyChangeKey( { OBJECT_ATTRIBUTES attr; InitializeObjectAttributes( &attr, NULL, 0, NULL, NULL ); - ret = NtCreateEvent( &Event, EVENT_ALL_ACCESS, &attr, FALSE, FALSE ); + ret = NtCreateEvent( &Event, EVENT_ALL_ACCESS, &attr, SynchronizationEvent, FALSE ); if (ret != STATUS_SUCCESS) return ret; } diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c index 1936428..0c00303 100644 --- a/dlls/ntdll/serial.c +++ b/dlls/ntdll/serial.c @@ -1363,7 +1363,7 @@ NTSTATUS COMM_DeviceIoControl(HANDLE hDevice, attr.Attributes = OBJ_CASE_INSENSITIVE | OBJ_OPENIF; attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; - status = NtCreateEvent(&hev, EVENT_ALL_ACCESS, &attr, FALSE, FALSE); + status = NtCreateEvent(&hev, EVENT_ALL_ACCESS, &attr, SynchronizationEvent, FALSE); if (status) goto done; } diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index f3f969a..3e27d09 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -247,12 +247,8 @@ NTSTATUS WINAPI NtReleaseSemaphore( HANDLE handle, ULONG count, PULONG previous * NtCreateEvent (NTDLL.@) * ZwCreateEvent (NTDLL.@) */ -NTSTATUS WINAPI NtCreateEvent( - OUT PHANDLE EventHandle, - IN ACCESS_MASK DesiredAccess, - IN const OBJECT_ATTRIBUTES *attr, - IN BOOLEAN ManualReset, - IN BOOLEAN InitialState) +NTSTATUS WINAPI NtCreateEvent( PHANDLE EventHandle, ACCESS_MASK DesiredAccess, + const OBJECT_ATTRIBUTES *attr, EVENT_TYPE type, BOOLEAN InitialState) { DWORD len = attr && attr->ObjectName ? attr->ObjectName->Length : 0; NTSTATUS ret; @@ -274,7 +270,7 @@ NTSTATUS WINAPI NtCreateEvent( { req->access = DesiredAccess; req->attributes = (attr) ? attr->Attributes : 0; - req->manual_reset = ManualReset; + req->manual_reset = (type == NotificationEvent); req->initial_state = InitialState; wine_server_add_data( req, &objattr, sizeof(objattr) ); if (objattr.sd_len) wine_server_add_data( req, sd, objattr.sd_len ); diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index 31a1a56..44afb01 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -440,7 +440,7 @@ NTSTATUS WINAPI RtlRegisterWait(PHANDLE NewWaitObject, HANDLE Object, wait_work_item->DeleteCount = 0; wait_work_item->CompletionEvent = NULL; - status = NtCreateEvent( &wait_work_item->CancelEvent, EVENT_ALL_ACCESS, NULL, TRUE, FALSE ); + status = NtCreateEvent( &wait_work_item->CancelEvent, EVENT_ALL_ACCESS, NULL, NotificationEvent, FALSE ); if (status != STATUS_SUCCESS) { RtlFreeHeap( GetProcessHeap(), 0, wait_work_item ); @@ -485,7 +485,7 @@ NTSTATUS WINAPI RtlDeregisterWaitEx(HANDLE WaitHandle, HANDLE CompletionEvent) { if (CompletionEvent == INVALID_HANDLE_VALUE) { - status = NtCreateEvent( &CompletionEvent, EVENT_ALL_ACCESS, NULL, TRUE, FALSE ); + status = NtCreateEvent( &CompletionEvent, EVENT_ALL_ACCESS, NULL, NotificationEvent, FALSE ); if (status != STATUS_SUCCESS) return status; interlocked_xchg_ptr( &wait_work_item->CompletionEvent, CompletionEvent ); @@ -778,7 +778,7 @@ NTSTATUS WINAPI RtlCreateTimerQueue(PHANDLE NewTimerQueue) RtlInitializeCriticalSection(&q->cs); list_init(&q->timers); q->quit = FALSE; - status = NtCreateEvent(&q->event, EVENT_ALL_ACCESS, NULL, FALSE, FALSE); + status = NtCreateEvent(&q->event, EVENT_ALL_ACCESS, NULL, SynchronizationEvent, FALSE); if (status != STATUS_SUCCESS) { RtlFreeHeap(GetProcessHeap(), 0, q); @@ -1013,7 +1013,7 @@ NTSTATUS WINAPI RtlDeleteTimer(HANDLE TimerQueue, HANDLE Timer, return STATUS_INVALID_PARAMETER_1; q = t->q; if (CompletionEvent == INVALID_HANDLE_VALUE) - status = NtCreateEvent(&event, EVENT_ALL_ACCESS, NULL, FALSE, FALSE); + status = NtCreateEvent(&event, EVENT_ALL_ACCESS, NULL, SynchronizationEvent, FALSE); else if (CompletionEvent) event = CompletionEvent; diff --git a/include/winternl.h b/include/winternl.h index 315becf..6860950 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1902,7 +1902,7 @@ NTSYSAPI NTSTATUS WINAPI NtCompleteConnectPort(HANDLE); NTSYSAPI NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG); NTSYSAPI NTSTATUS WINAPI NtContinue(PCONTEXT,BOOLEAN); NTSYSAPI NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES); -NTSYSAPI NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,BOOLEAN,BOOLEAN); +NTSYSAPI NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,EVENT_TYPE,BOOLEAN); NTSYSAPI NTSTATUS WINAPI NtCreateEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES); NTSYSAPI NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG); NTSYSAPI NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
1
0
0
0
Maarten Lankhorst : mmdevapi: Dump device id in test.
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: 6299544cdd731925eea0c960fcd1a57fab846a18 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6299544cdd731925eea0c960f…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Jan 17 13:38:32 2010 +0100 mmdevapi: Dump device id in test. --- dlls/mmdevapi/tests/mmdevenum.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/dlls/mmdevapi/tests/mmdevenum.c b/dlls/mmdevapi/tests/mmdevenum.c index 35e0152..fa26b75 100644 --- a/dlls/mmdevapi/tests/mmdevenum.c +++ b/dlls/mmdevapi/tests/mmdevenum.c @@ -90,6 +90,18 @@ static void test_collection(IMMDeviceEnumerator *mme, IMMDeviceCollection *col) hr = IMMDeviceCollection_Item(col, 0, &dev); ok(hr == S_OK, "Valid Item returned 0x%08x\n", hr); ok(dev != NULL, "Device is null!\n"); + if (dev != NULL) + { + char temp[128]; + WCHAR *id = NULL; + if (IMMDevice_GetId(dev, &id) == S_OK) + { + temp[sizeof(temp)-1] = 0; + WideCharToMultiByte(CP_ACP, 0, id, -1, temp, sizeof(temp)-1, NULL, NULL); + trace("Device found: %s\n", temp); + CoTaskMemFree(id); + } + } if (dev) IUnknown_Release(dev); }
1
0
0
0
Maarten Lankhorst : mmdevapi: Add code to enumerate NOTPRESENT devices.
by Alexandre Julliard
18 Jan '10
18 Jan '10
Module: wine Branch: master Commit: abd9627d9228070db1f6671b90ac33d940d4f773 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=abd9627d9228070db1f6671b9…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Jan 17 13:38:31 2010 +0100 mmdevapi: Add code to enumerate NOTPRESENT devices. --- dlls/mmdevapi/devenum.c | 83 ++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 78 insertions(+), 5 deletions(-) diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index 40e296e..a708573 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -24,6 +24,8 @@ #define COBJMACROS #include "windef.h" #include "winbase.h" +#include "winnls.h" +#include "winreg.h" #include "wine/debug.h" #include "ole2.h" @@ -33,6 +35,24 @@ WINE_DEFAULT_DEBUG_CHANNEL(mmdevapi); +static const WCHAR software_mmdevapi[] = + { 'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'M','M','D','e','v','i','c','e','s','\\', + 'A','u','d','i','o',0}; +static const WCHAR reg_render[] = + { 'R','e','n','d','e','r',0 }; +static const WCHAR reg_capture[] = + { 'C','a','p','t','u','r','e',0 }; +static const WCHAR reg_devicestate[] = + { 'D','e','v','i','c','e','S','t','a','t','e',0 }; +static const WCHAR reg_alname[] = + { 'A','L','N','a','m','e',0 }; +static const WCHAR reg_properties[] = + { 'P','r','o','p','e','r','t','i','e','s',0 }; + typedef struct MMDevEnumImpl { const IMMDeviceEnumeratorVtbl *lpVtbl; @@ -41,27 +61,35 @@ typedef struct MMDevEnumImpl static MMDevEnumImpl *MMDevEnumerator; static const IMMDeviceEnumeratorVtbl MMDevEnumVtbl; +static const IMMDeviceCollectionVtbl MMDevColVtbl; typedef struct MMDevColImpl { const IMMDeviceCollectionVtbl *lpVtbl; LONG ref; - MMDevEnumImpl *parent; EDataFlow flow; DWORD state; } MMDevColImpl; -static const IMMDeviceCollectionVtbl MMDevColVtbl; -static HRESULT MMDevCol_Create(IMMDeviceCollection **ppv, MMDevEnumImpl *parent, EDataFlow flow, DWORD state) +/* Creates or updates the state of a device + * If GUID is null, a random guid will be assigned + * and the device will be created + */ +static void MMDevice_Create(WCHAR *name, GUID *id, EDataFlow flow, DWORD state) +{ + FIXME("stub\n"); +} + +static HRESULT MMDevCol_Create(IMMDeviceCollection **ppv, EDataFlow flow, DWORD state) { MMDevColImpl *This; + This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); *ppv = NULL; if (!This) return E_OUTOFMEMORY; This->lpVtbl = &MMDevColVtbl; This->ref = 1; - This->parent = parent; This->flow = flow; This->state = state; *ppv = (IMMDeviceCollection*)This; @@ -143,6 +171,10 @@ HRESULT MMDevEnum_Create(REFIID riid, void **ppv) if (!This) { + DWORD i = 0; + HKEY root, cur, key_capture = NULL, key_render = NULL; + LONG ret; + This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); *ppv = NULL; if (!This) @@ -150,6 +182,47 @@ HRESULT MMDevEnum_Create(REFIID riid, void **ppv) This->ref = 1; This->lpVtbl = &MMDevEnumVtbl; MMDevEnumerator = This; + + ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, software_mmdevapi, 0, KEY_READ, &root); + if (ret == ERROR_SUCCESS) + ret = RegOpenKeyExW(root, reg_capture, 0, KEY_READ, &key_capture); + if (ret == ERROR_SUCCESS) + ret = RegOpenKeyExW(root, reg_render, 0, KEY_READ, &key_render); + cur = key_capture; + if (ret != ERROR_SUCCESS) + { + RegCloseKey(key_capture); + RegCloseKey(key_render); + TRACE("Couldn't open key: %u\n", ret); + } + else do { + WCHAR guidvalue[39]; + WCHAR alname[128]; + GUID guid; + DWORD len; + + len = sizeof(guidvalue); + ret = RegEnumKeyExW(cur, i++, guidvalue, &len, NULL, NULL, NULL, NULL); + if (ret == ERROR_NO_MORE_ITEMS) + { + if (cur == key_capture) + { + cur = key_render; + i = 0; + continue; + } + break; + } + if (ret != ERROR_SUCCESS) + continue; + len = sizeof(alname); + RegGetValueW(cur, guidvalue, reg_alname, RRF_RT_REG_SZ, NULL, alname, &len); + if (SUCCEEDED(CLSIDFromString(guidvalue, &guid))) + MMDevice_Create(alname, &guid, + cur == key_capture ? eCapture : eRender, + DEVICE_STATE_NOTPRESENT); + } while (1); + RegCloseKey(root); } return IUnknown_QueryInterface((IUnknown*)This, riid, ppv); } @@ -206,7 +279,7 @@ static HRESULT WINAPI MMDevEnum_EnumAudioEndpoints(IMMDeviceEnumerator *iface, E return E_INVALIDARG; if (mask & ~DEVICE_STATEMASK_ALL) return E_INVALIDARG; - return MMDevCol_Create(devices, This, flow, mask); + return MMDevCol_Create(devices, flow, mask); } static HRESULT WINAPI MMDevEnum_GetDefaultAudioEndpoint(IMMDeviceEnumerator *iface, EDataFlow flow, ERole role, IMMDevice **device)
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
62
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
Results per page:
10
25
50
100
200